RPi 3B+ sound and wifi

FreeBSD on RPI3B is 10x faster than the raspbian stuff!!!!!
How did you measure that? I simply don't believe it. I have run the same Pi3 with both FreeBSD and then with Raspbian, and while I didn't perform any measurements, both seemed adequately fast to me.

I don't want embedded WiFi chip on my embedded computer.
Of the two Rpi I have in production, the first one absolutely needs WiFi (there is no wired Ethernet nearby, and trying to run a wire would be impractical, as it would take drilling through 4" of concrete twice, and running an underground conduit). The second does not need it, but it would be a nice to have. Alas, I can't use it right now anyway, since it needs an external antenna (with a small connector and coax cable), because it is mounted in a metal box.

Why pay for something you don't want or need.
Well, I happen to want and/or need it.

Plus you can use a supported module ...
In some cases I could use a USB WiFi. Problem is: Those use extra power, and it is one more thing to keep track off, buy, and configure; the "native" WiFi works right out of the box (with Raspbian). In other cases, I can not use USB WiFi: On a RPi0W there is only one USB port, and it is already in use (to interface to hardware).

It does not matter to have wifi.
Ethernet works, and you can use dongle usb wifi.
See above, the generalization is just nonsense. In some cases, wired Ethernet simply isn't available, in my examples because of physical isolation (the RPi is many dozen of feet away from the nearest wired network, with two concrete walls), or on a RPi0w due to lack of Ethernet hardware. And using a USB WiFi will sometimes work, sometimes it is a hassle, and sometimes it won't work.

It is better to have BSD than anything else.
In my case, it's better to have Raspbian that actually works, instead of FreeBSD that would not even work for my two installations.
 
When I copy or do anything on the Raspbian Linux PI, it takes time and likely will hangs for seconds to minutes. Especially for large files.
Even login on tty0 takes ages on the Raspbian PI.

You may anytime go to buy one belkin.

1.) Find the right location in the hall of shops, not so easy.
2.) If it still exists, Belkin will save your PI with FreeBSD ;)
3.) Take about 10$ to 60$ with you ... invest for usb dongle for BSD...
4.) Install FreeBSD ;)
5.) FreeBSD on PI with Wifi !

6624


I might be surely possible to compile a driver for your PI to get wifi.

Power, go for this with a RPI3b if possible:
6625


Hopefully, you will fully replace all your Linux machines by FreeBSD.
I hope that it works out.

For how long have you been using Linux actually?
 
When I copy or do anything on the Raspbian Linux PI, it takes time and likely will hangs for seconds to minutes.
Never seen that problem. Just tried it to both of my Pi that are in "production", and logging in is nearly instantaneous. Normal shell commands (ls, cd, cat, mkdir, copy files around) is as fast as I can type. I don't use them with big files. OK, just for a test, I decided to mess with big files: On one of them, I get a daily data file (it contains measurement of water pressures, tank fill levels, and such), and each file is ~300K on average. Decided to bzip2 all of the ones for 2017 and 2018, about 450 files. Took about 2 minutes, and was completely CPU limited. No IO problem, no unreasonable delays.


You may anytime go to buy one Belkin.
You didn't read my message above. If I wanted to use a USB WiFi dongle, I would probably find one in the box of random USB parts in the basement. But I don't want to, or can't. On one of the production Pis, there is no free USB port (it is a RPi0W, and the only USB port is already in use). On the other one (a RPi3B), 2 of the 4 ports are in use, and I really don't feel like increasing the power consumption by plugging more USB hardware in. That Pi runs on a 12V battery, which is charged when there is normal electricity, but has to feed the RPi and a few other things when there is a power outage, which too often happens at night, when solar cells don't work. So there I try to run as lean and mean as possible, as far as hardware is concerned.

Power, go for this with a RPI3b if possible:
Which is exactly what I use for the Pi when it is on the lab bench, or being used on wall power. But see above: power is much more complicated than finding a power supply.

4.) Install FreeBSD ;)
5.) FreeBSD on PI with Wifi !
I have done that. I ran FreeBSD on the Pi for about two months. There were problems left and right. The lack of WiFi was the killer one, which made all other problems seem irrelevant. The other problems involved audio (which is not really important), some hassle with Dallas 1-wire (I already forgot the details), and the need to do bizarre kernel compile and configuration exercises for using parallel GPIO port pins which on Raspbian are trivial. I just don't have time to tinker with these things.

The real difference is this. To me, the RPi are a tool to get a job done. If something gets in the way, that something either gets worked on and solved, or replaced if solving it is too much work. On the RPi, FreeBSD was getting in the way, so it was replaced with Raspbian. Do I like Linux? No, but I can live with it, and use it productively. I can even configure and manage a new service using systemd (requires a little bit of gritting my teeth, but it gets the job done). Do I like FreeBSD? Yes, but I don't run around claiming nonsense like "FreeBSD is perfect and the solution to everything".

For how long have you been using Linux actually?
Since about 1993 or 94, starting with kernel 0.99.13. On a 386-40 without FPU. I think my first contribution to the Linux kernel even happened before version 1.0 (I happened to be the only person on the planet using an Exabyte tape drive with a SCSI card that used the Apple 25-pin connector on Linux, so I had to do a minor patch to the kernel right away). I remember going to drink beer with Linus in 1994, before he even had a steady girlfriend (but he was heavily into beer, we went to "99 bottles of beer" in Santa Cruz). I remember one time HPA joined us too.

In those days, I used the SLS distribution, then Yggdrasil, then Slackware, and a few random others. Each of them was a stack of floppies several inches tall. I think the first time I ran X may have been on that 386 (although I had to get an FPU, since font rendering is actually floating-point intensive), but I quickly got a 486-33 and a network between the two (initially it was PLIP, with the two parallel ports connected to each other, until I could afford ethernet cards that were supported). With that one could do a kernel compile on one machine, while the other was doing production work (data analysis). The house we lived in was built very strangely, and there were de-facto no electrical outlets in the living room. But the spare bedroom that had the two computers had no heating, and in the winter got ridiculously cold. So I ran a serial wire and extension cord to the living room, and in the winter my wife and me took shifts to do computing on a VT200 emulator in the living room. Fortunately, my work gave me a "really fast" modem (9600 baud!), so we could be quite productive with two phone lines.

I have been running Linux at work continuously since the late 90s (in addition to a slew of other OSes that cost real money).

I don't remember how long I've been using *BSD. I never logged into a real BSD 4.2 or 4.3 machine for serious work, although I used a friend's account on a VAX 11-750 running 4.2 for a few days. I started using Ultrix (which was in reality nothing but a rebranded BSD) on a MIPS-based DECstation in the late 80s. Then I switched to SysV based Unixes for a long time, all through the 90s (with a bizarre interlude of having a NeXT on my desk for a year or two, most annoying computer ever). When I bought my 386-40 for home in the mid 90s, I was attempting to purchase BSD for it (at the time, there was no free option of running BSD on a x86, Bill Jolitz hadn't made 386BSD production-worthy yet). But the BSDi people were unable to deliver a functioning version of X that worked with any graphics card that existed in the real world (like the Tseng ET4000), which is why I ended up installing Linux instead. I only returned to running *BSD at home in the early 2000s, because of OpenBSD.

For about 10 years (from roughly 2005 to 2017 or 18), there were no Linux machines at home, because the laptops had migrated to MacOS, while the servers and firewalls were *BSD. The Raspberry Pi machines were the first time I went back to using a flavor of Linux at home, simply because FreeBSD was not workable.
 
Never seen that problem. Just tried it to both of my Pi that are in "production", and logging in is nearly instantaneous. Normal shell commands (ls, cd, cat, mkdir, copy files around) is as fast as I can type. I don't use them with big files. OK, just for a test, I decided to mess with big files: On one of them, I get a daily data file (it contains measurement of water pressures, tank fill levels, and such), and each file is ~300K on average. Decided to bzip2 all of the ones for 2017 and 2018, about 450 files. Took about 2 minutes, and was completely CPU limited. No IO problem, no unreasonable delays.



You didn't read my message above. If I wanted to use a USB WiFi dongle, I would probably find one in the box of random USB parts in the basement. But I don't want to, or can't. On one of the production Pis, there is no free USB port (it is a RPi0W, and the only USB port is already in use). On the other one (a RPi3B), 2 of the 4 ports are in use, and I really don't feel like increasing the power consumption by plugging more USB hardware in. That Pi runs on a 12V battery, which is charged when there is normal electricity, but has to feed the RPi and a few other things when there is a power outage, which too often happens at night, when solar cells don't work. So there I try to run as lean and mean as possible, as far as hardware is concerned.


Which is exactly what I use for the Pi when it is on the lab bench, or being used on wall power. But see above: power is much more complicated than finding a power supply.


I have done that. I ran FreeBSD on the Pi for about two months. There were problems left and right. The lack of WiFi was the killer one, which made all other problems seem irrelevant. The other problems involved audio (which is not really important), some hassle with Dallas 1-wire (I already forgot the details), and the need to do bizarre kernel compile and configuration exercises for using parallel GPIO port pins which on Raspbian are trivial. I just don't have time to tinker with these things.

The real difference is this. To me, the RPi are a tool to get a job done. If something gets in the way, that something either gets worked on and solved, or replaced if solving it is too much work. On the RPi, FreeBSD was getting in the way, so it was replaced with Raspbian. Do I like Linux? No, but I can live with it, and use it productively. I can even configure and manage a new service using systemd (requires a little bit of gritting my teeth, but it gets the job done). Do I like FreeBSD? Yes, but I don't run around claiming nonsense like "FreeBSD is perfect and the solution to everything".


Since about 1993 or 94, starting with kernel 0.99.13. On a 386-40 without FPU. I think my first contribution to the Linux kernel even happened before version 1.0 (I happened to be the only person on the planet using an Exabyte tape drive with a SCSI card that used the Apple 25-pin connector on Linux, so I had to do a minor patch to the kernel right away). I remember going to drink beer with Linus in 1994, before he even had a steady girlfriend (but he was heavily into beer, we went to "99 bottles of beer" in Santa Cruz). I remember one time HPA joined us too.

In those days, I used the SLS distribution, then Yggdrasil, then Slackware, and a few random others. Each of them was a stack of floppies several inches tall. I think the first time I ran X may have been on that 386 (although I had to get an FPU, since font rendering is actually floating-point intensive), but I quickly got a 486-33 and a network between the two (initially it was PLIP, with the two parallel ports connected to each other, until I could afford ethernet cards that were supported). With that one could do a kernel compile on one machine, while the other was doing production work (data analysis). The house we lived in was built very strangely, and there were de-facto no electrical outlets in the living room. But the spare bedroom that had the two computers had no heating, and in the winter got ridiculously cold. So I ran a serial wire and extension cord to the living room, and in the winter my wife and me took shifts to do computing on a VT200 emulator in the living room. Fortunately, my work gave me a "really fast" modem (9600 baud!), so we could be quite productive with two phone lines.

I have been running Linux at work continuously since the late 90s (in addition to a slew of other OSes that cost real money).

I don't remember how long I've been using *BSD. I never logged into a real BSD 4.2 or 4.3 machine for serious work, although I used a friend's account on a VAX 11-750 running 4.2 for a few days. I started using Ultrix (which was in reality nothing but a rebranded BSD) on a MIPS-based DECstation in the late 80s. Then I switched to SysV based Unixes for a long time, all through the 90s (with a bizarre interlude of having a NeXT on my desk for a year or two, most annoying computer ever). When I bought my 386-40 for home in the mid 90s, I was attempting to purchase BSD for it (at the time, there was no free option of running BSD on a x86, Bill Jolitz hadn't made 386BSD production-worthy yet). But the BSDi people were unable to deliver a functioning version of X that worked with any graphics card that existed in the real world (like the Tseng ET4000), which is why I ended up installing Linux instead. I only returned to running *BSD at home in the early 2000s, because of OpenBSD.

For about 10 years (from roughly 2005 to 2017 or 18), there were no Linux machines at home, because the laptops had migrated to MacOS, while the servers and firewalls were *BSD. The Raspberry Pi machines were the first time I went back to using a flavor of Linux at home, simply because FreeBSD was not workable.

I am happy to have PI RPI3B and RPI3B+ FreeBSD ;)
Just fine with BSD ;)
 
Hello,
I traed to control GPIO via gpioctl().
I have connected LED to PINs
Although I can change pin status, change it to 0 or 1 via gpioctl(). Change it to IN or OUT status ...
But LED status is not changed, it is always ON.

I opened that thread, but it seems that nobody tried to use GPIO on RPI 3B+
raspberry-pi-3-b-gpio-control

I haven't tried FreeBSD with GPIO, I had hard enough time using Linux for my temperature sensor and fan I made for it.
Anyway, take a look at this:

The pins are not a one-to-one relationship with the GPIO, refer here:
 
You asked whether anyone tried it.

I did attempt it with FreeBSD, about a year or two ago. What I wanted to do was: a half dozen pins for polling / bit-banging IO, and a few pins for Dallas 1-wire. No interrupts required. Discovered that in FreeBSD, this would require complex configuration, and I think a kernel recompile (or compiling something similarly complex, perhaps some setup file, I forget the details). If you care about the details, there should be posts about that here in the forum. Decided that it wasn't worth the effort. Switched to using Raspbian, where it all worked with a few dozen lines of python from userspace in an hour. Since I had to switch to Raspbian anyway (for support of the built-in WiFi), I didn't bother following up whether there would have been an easier way to do it in FreeBSD.

Ultimately, the GPIO stuff didn't go into production anyway; instead I am now connecting different hardware via USB. For the Dallas 1-wire, I bought a hat with a dedicated interface chip, and that is much more reliable electrically. That has nothing to do with the choice of OS, but with the fact that with GPIO ports (in particular 3.3V GPIO ports), the Dallas 1-wire interface can only be used on really well behaved cabling for short cable runs, and my situation is ill-behaved, sometimes unterminated, and long cables.
 
The website you quoted is an excellent source.
When you manipulate a pin(ON/OFF) does the state work according to gpioctl output?
I am weary of your GPIO output from the other post. It looks like pin states are unknown.
I have not used the RPi3B+ though to say for sure.
 
When you manipulate a pin(ON/OFF) does the state work according to gpioctl output?
When i bought RPi 3B+ in the box there was a small fan.
And seller explained that this fan can be connected to pin 4 (+ 5v) and Pin 6 (ground).
Fan has started to work.
And that was my first test of gpioctl().

I have tried changing the status of Pin 4 to ON and OFF. I have tried changing the mode to IN and OUT.
But fan was still working.
Then I thought that pin numbers are different that the physical pin numbers.
I have made a small script that changes status of all pins to OFF or ON.
Unsuccessfully... fan was still working.

But I found that FreeBSD GPIO Pin 29 --> This is green LED on motherboard of RPi 3B+
And I control it via gpioctl(), I can switch off or on this LED.
 
Pin 4 (5v) and 6 (Ground) aren't GPIOs, they're power and earth. You cannot switch them on/off by toggling bits on a GPIO. If you want to switch them on/off then you need something like an N-Channel FET. This will act as a switch. Something like the IRLZ44N. (refer: https://www.el-component.com/mosfets/irlz44n)

Pin S of FET goes to Pi's Ground (pin 6)
Pin D of FET goes to Fan's Ground.
Pin G of FET goes to your nominated GPIO control pin (say GPIO 2). This pin, say GPIO 2 is then the one you toggle on/off to get the fan to start/stop.

Fan power goes direct to Pin 4 (5v)

Then you can switch on/off the fan.
The IRLZ44N is rather bulky but easy to solder with. You can use smaller scale ones, of course. There are many alternatives, but this one is easy to solder and you can screw it to the Pi's case if it has one.
 
Thanks mark_j
I understand you well.

You cannot switch them on/off by toggling bits on a GPIO.
I thought I can, I'm new on Raspberry.
I thought this is "realy" ON and OFF, but this is toggling bits, of course it's doesn't work for Pin +5V

Now I understand my problem, the first:
- Phishfry said in another post: "pin numbers are different that the physical pin numbers"
and second that you said "You cannot switch them on/off by toggling bits on a GPIO"

From here to come all my confusions and erroneous tests.

Thanks mark_j and Phishfry for explaining it.
 
No problems. Of course, some pins (all those labelled as GPIO) can be toggled on/off and some (many) have alternative uses.

In the link I posted earlier there contains a picture of the 40 pin connector which has various pins labelled as GPIO or not:
6660

(image from https://www.electronicwings.com/raspberry-pi/raspberry-pi-gpio-access)

Note the ones NOT GPIO and those that are.
So, for example, suppose you want to toggle your fan on/off using the method I described, but attach the gate pin (pin G of the FET) to pin 13 of the 40 pin connector. Then in software, you would turn on/off GPIO27. Note how the actual pins in the connector DO NOT correlate/match the GPIO "mapping". This can be confusing. You access GPIO27 in software but it's pin 13 in hardware.
Hope this helps.

(If you are interested in expanding your knowledge of circuitry can I also suggest you purchase an arduino (a clone or real, it doesn't matter). They make a great learning tool. They are great for getting to know how circuits work because there are literally hundreds of maker projects out there. It's also cheap to do.)
 
Thanks again mark_j
(If you are interested in expanding your knowledge of circuitry can I also suggest you purchase an arduino (a clone or real, it doesn't matter). They make a great learning tool. They are great for getting to know how circuits work because there are literally hundreds of maker projects out there. It's also cheap to do.)
Yes, I have Arduino and do some little thinks on it.
Now I'm understand, you explain me well!
 
Last edited:
When I copy or do anything on the Raspbian Linux PI, it takes time and likely will hangs for seconds to minutes. Especially for large files.
Even login on tty0 takes ages on the Raspbian PI.

You may anytime go to buy one belkin.

1.) Find the right location in the hall of shops, not so easy.
2.) If it still exists, Belkin will save your PI with FreeBSD ;)
3.) Take about 10$ to 60$ with you ... invest for usb dongle for BSD...
4.) Install FreeBSD ;)
5.) FreeBSD on PI with Wifi !

View attachment 6624

I might be surely possible to compile a driver for your PI to get wifi.

Hello Spartrekus,

What USB dongle you use for FreeBSD on RPi3?
You mean that NETGEAR N300 can be work out of box?
Or what Belkin model you recommend for FreeBSD on RPi3 B+?

Best regards,
 
Hi,

Is anyone running OPNsense on a Rpi3B+?

I have ordered an RPI4, but it's not due to November. My RPi3B+ is in use, but can be replaced by the Pi4. So I will have hardware to play with (either is possible).

I have no significant experience of OPNsense or pfSense. But I'm guessing that the Ethernet chipset might be an issue?

Cheers,
 
Hi,

Is anyone running OPNsense on a Rpi3B+?

I have ordered an RPI4, but it's not due to November. My RPi3B+ is in use, but can be replaced by the Pi4. So I will have hardware to play with (either is possible).

I have no significant experience of OPNsense or pfSense. But I'm guessing that the Ethernet chipset might be an issue?

Cheers,
(Well putting aside we really shouldn't be conversing about non-FreeBSD stuff)

I am not running either but I cannot see any reason, regarding CPU or RAM limitations, that it cannot run.

PROVIDING, that a FreeBSD version is built to run on it (none are as yet). I am not sure of the status of a FreeBSD RPI4 build. Ask around.

Not due to November? Oh well, you have plenty of time to plan... ;)
 
How used "SDIO interface WiFi Bluetooth 2-in-1 RTL8723AS module RL-UM02WBS-8723VAU-V1.4" aliexpress?
 

Attachments

  • Interfaz-SDIO-WiFi-Bluetooth-2-en-1-RTL8723AS-para-RL-UM02WBS-8723VAU-V1-4.jpg_640x640q70.jpg
    Interfaz-SDIO-WiFi-Bluetooth-2-en-1-RTL8723AS-para-RL-UM02WBS-8723VAU-V1-4.jpg_640x640q70.jpg
    37.3 KB · Views: 348
Back
Top