How to develop a wireless driver?

Old though this thread is (wow, almost a year) it was one of the first hits I got when searching for FreeBSD 8188ce.

So, it may be worth mentioning that the card is now working in FreeBSD-11-BETA4 (probably earlier, but I didn't try) if one follows the instructions in the man page for rtwn(4). (I didn't put it in tags, because that leads to a page saying no man page, and indeed, on my 10.3 box, there isn't.

Anyway, if running FreeBSD-11.x, the man page instructs you to put the following into /boot/loader.conf.

Code:
if_rtwn_load="YES"
legal.realtek.license_ack="1"
rtwn-rtl8192cfwU_load="YES"
rtwn-rtl8192cfwU_B_load="YES"

Upon doing this, running pciconf -vl shows a driver attached to the card. Note that in 11.x, running ifconfig won't show wireless cards, you have to run net.wlan.devices.

Again, I realize this thread is old, but as I said, it was one of the first that came up when googled the card. Up till now, I've been using an Edimax USB adapter for my L420 laptop, but FreeBSD-11 gets it working. Thanks to A. Chadd and whoever else worked on it.


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203105
 
Old though this thread is (wow, almost a year) it was one of the first hits I got when searching for FreeBSD 8188ce.

So, it may be worth mentioning that the card is now working in FreeBSD-11-BETA4 (probably earlier, but I didn't try) if one follows the instructions in the man page for rtwn(4). (I didn't put it in tags, because that leads to a page saying no man page, and indeed, on my 10.3 box, there isn't.

Anyway, if running FreeBSD-11.x, the man page instructs you to put the following into /boot/loader.conf.

Code:
if_rtwn_load="YES"
legal.realtek.license_ack="1"
rtwn-rtl8192cfwU_load="YES"
rtwn-rtl8192cfwU_B_load="YES"

Upon doing this, running pciconf -vl shows a driver attached to the card. Note that in 11.x, running ifconfig won't show wireless cards, you have to run net.wlan.devices.

Again, I realize this thread is old, but as I said, it was one of the first that came up when googled the card. Up till now, I've been using an Edimax USB adapter for my L420 laptop, but FreeBSD-11 gets it working. Thanks to A. Chadd and whoever else worked on it.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203105
I'm not sure about the Realtek 8192ce adapter, but neither 8188eu, nor 8192cu require signing the license in /boot/loader.conf anymore (as of 11.x). Also, ifconfig will list wireless adapters (wlan0, wlan1, etc.) in 11.0-RC1. Maybe this option will get deprecated in favor of net.wlan.devices, though for now it works.

Sorry for assisting in thread-archeology, though I thought the part about Realtek adapters might be useful, in case someone is considering buying a dongle with one of these. After all, the OP seems to be concerned with compatibility with his wireless adapter, rather than venturing into the realm of driver coding :).
 
IMLTHO (Less Than Humble) sometimes, it's quite worthwhile resurrecting old threads when they're still relevant, as when, for example, one does a google search and it's one of the first hits. :)
And yeah, code it yourself is not an answer for an end user, but as there's lots of developer types on these forums, they don't realize how hard it is for the rest of us. :)

As for your other comments. I removed the license line, and then, when I ran ifconfig to create the wlan device, got an error message, could not load firmware image. I am also still finding that ifconfig (unless I have something in /etc/rc.conf that already defines the wlandev as using the rtwn0 card, in which case, ifconfig will show me wlan0) will not show me rtwn0. I only see it after running the ifconfig command to create a wlandev. This is an old Thinkpad L420, and pciconf tells me that it's an 8188CE. So, maybe it's an 8188CE thing? This is also 11.0-RC1
 
My apologies then, sorry! It might indeed be as you say, a special case for 8188ce with the Realtek firmware.

In respect to ifconfig, I wrongly assumed everyone uses the wlan0 link in /etc/rc.conf so that the interface gets created automatically when the netif service is launched. Probably not the best thing to do when multiple wireless devices and interfaces are on-board :P. Also, running sysctl -a | grep net.wlan.devices prints my wireless devices as intended:
Code:
net.wlan.devices: iwn0

Seeing as how much needs to be done in the WiFi department, I would like to get involved with writing wireless device drivers at some point, though way after I figure out how to port & maintain FreeBSD software first ;).
 
Back
Top