I see my mistake, I believe I was testing RTL8188CUS but I reported that RT5370. This is my big mistake. I use RTL8188CUS, that was WiFi that worked with RPI in the past. I played with several WiFi dongles and working on several issues at that time, it took me much longer than I expected and I just did it wrong… I use RT5370 in client mode only, I think it doesn’t support AP mode in Linux (but there was software for Windows that can can run it in SoftAP mode…; I never tried that)
I try it again, this time with FriendlyELEC R2S running IPfire CU189.
First, I tried to use USB dongle RTL8188CUS (TP-Link TL-WN725N V1.0) as red0 interface and it worked.
lsusb
output:
ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Second, I tried to use USB dongle as blue0 interface and I was able to enter Wireless Access Point menu but I was not able to start AP (hostapd).
When I tried to start hostapd from CLI, it was clear what is wrong:
[root@ffire ~]# /etc/init.d/hostapd start
Starting hostapd...
Line 4: Invalid country_code '00'
Cannot enable IEEE 802.11d without setting the country_code
2 errors found in configuration file '/etc/hostapd.conf'
Failed to set up interface with /etc/hostapd.conf
Failed to initialize interface
I changed country code from default 00
to correct country code and after that hostpad
was started, it looks OK but there is no WiFi in the air…
It would be good that web form could check for country code, it was not clear that value 00
is wrong and I missed it…
Config looks OK, hostapd
is running (green in web gui) but no WiFi.
When I run ifconfig
, I see only red0, green0 and lo, when I run ifconfig blue0
, I see blue0 interface, it has IP address.
I see that green0
and blue0
have broadcast address 0.0.0.0, is it OK? red0 has broadcast address limited to assigned network, (192.168.111.255) but this interface runs dhcp client. Broadcast address for red0 is OK, but I do not like green0 and blue0 (0.0.0.0)… But I see the same on my main router (IPfire) and it works OK…
Back to hostapd. It is not running, web form that reported it green was not correct.
[root@ffire ~]# /etc/init.d/hostapd start
Starting hostapd...
blue0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
blue0: interface state COUNTRY_UPDATE->ACS
blue0: ACS-STARTED
[root@ffire ~]# /etc/init.d/hostapd restart
Stopping hostapd... Not running. [ OK ]
Starting hostapd...
blue0: interface state UNINITIALIZED->COUNTRY_UPDATE
ACS: Automatic channel selection started, this may take a bit
blue0: interface state COUNTRY_UPDATE->ACS
blue0: ACS-STARTED [ OK ]
I can run this command again and again and WiFi is not working.
This is reported in dmesg
:
...
[ 1181.562159] rtl8192cu: MAC auto ON okay!
[ 1181.598200] rtl8192cu: Tx queue select: 0x05
[ 1182.045546] rtl8192c_common: chksum report fail! REG_MCUFWDL:0x00030000 .
[ 1182.045589] rtl8192c_common: Firmware is not ready to run!
[ 1207.641533] rtl8192cu: MAC auto ON okay!
[ 1207.676575] rtl8192cu: Tx queue select: 0x05
[ 1208.124046] rtl8192c_common: chksum report fail! REG_MCUFWDL:0x00030000 .
[ 1208.124089] rtl8192c_common: Firmware is not ready to run!
[ 1964.597529] rtl8192cu: MAC auto ON okay!
[ 1964.632687] rtl8192cu: Tx queue select: 0x05
[ 1965.079796] rtl8192c_common: chksum report fail! REG_MCUFWDL:0x00030000 .
[ 1965.079871] rtl8192c_common: Firmware is not ready to run!
After several tries I fixed it. Other problem was that channel was set to “AUTO”, the default value in the form. Trouble with this field is that in many cases there was no other option, that AUTO was the only value in the list. Sometimes I found there AUTO followed with channels 1-13… Once I changed channel configuration from AUTO to number, WiFi AP was started. This is a black magic…
I am going to replicate this configuration with RPI…
I was so happy when I saw WiFi AP in the air that I forgot to test it. Another big mistake. BSID is visible but devices cannot connect to “blue” WiFi… So, it is not working…
dmesg
output:
[ 2564.608746] rtl8192c_common: chksum report fail! REG_MCUFWDL:0x00030000 .
[ 2564.608789] rtl8192c_common: Firmware is not ready to run!
[ 2605.152799] rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
[ 2687.516557] rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
[ 2727.109539] rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
[ 2766.807460] rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
[ 2805.787411] rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
I am not sure but it is possible that even USB dongle RT5370 was working in my RPI as AP (blue) in the past. I did so many tests this week, I changed configuration several times and I am not sure what was the original configuration. To verify it, I has to install some older version of IPfire but it is a lot of work and I do not have time for that task just now…