How to select USB Wifi Adapter (wlan1) for indigosky

Questions, bug reports, requests for enhancements, etc.
iMustBcrazy
Posts: 338
Joined: Sun Jun 02, 2019 3:52 pm

How to select USB Wifi Adapter (wlan1) for indigosky

Post by iMustBcrazy »

I bought a USB Wifi adapter for Linux and installed it one my indigosky RPi successfully. I can see now that wlan1 exists - but Access Point: Not-Associated.

How do I set it as the default device for the wifi hotspot? (I've read many versions on how to do this but it's just confusing. Seems to depend on many different factors so given that we have indigosky, how would this be done?)

Thanks
rumen
Posts: 133
Joined: Wed Feb 22, 2017 7:31 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by rumen »

You can try replacing all wlan0 references with wlan1 in the flowing files:
/etc/hostapd/hostapd.conf
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/dhcpcd.conf

Please note:
1. It will not survive if you change the wifi settings from the control panel - maybe this configuration will come to the next version of indigosly
2. not all wifi dogles can work in Access point mode.
iMustBcrazy
Posts: 338
Joined: Sun Jun 02, 2019 3:52 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by iMustBcrazy »

rumen wrote: Thu Jul 22, 2021 4:13 pm You can try replacing all wlan0 references with wlan1 in the flowing files:
/etc/hostapd/hostapd.conf
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/dhcpcd.conf

Please note:
1. It will not survive if you change the wifi settings from the control panel - maybe this configuration will come to the next version of indigosly
2. not all wifi dogles can work in Access point mode.
Thanks @rumen, this is easy enough to do, but I found a reference that also talks about changing /etc/dnsmasq.conf. Is this not required?
(https://iotgadgets.com/2018/01/tutorial ... ess-point/)

I'm afraid the dongle I bought may not work at a hotspot like you mention :( I'll have to investigate more.
iMustBcrazy
Posts: 338
Joined: Sun Jun 02, 2019 3:52 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by iMustBcrazy »

The vendor got back to me and say yes, the adapter is good for wifi hotspot but I still haven't got it working yet.

FYI
https://www.trendtechcn.com/Product.asp ... 2&TypeId=1
iMustBcrazy
Posts: 338
Joined: Sun Jun 02, 2019 3:52 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by iMustBcrazy »

Hi @rumen, I haven't managed to get wlan1 working. It is still "Not-Associated"

If you have any more guidance, I would appreciate it. Thanks
rumen
Posts: 133
Joined: Wed Feb 22, 2017 7:31 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by rumen »

let me try it myself first. The thing is that I will not be available till Tuesday.

untill then you may want to try to disable the onboard WiFi from the firmware add the line:

dtoverlay=disable-wifi

in /boot/config.txt.

this should make the external wifi wlan0
iMustBcrazy
Posts: 338
Joined: Sun Jun 02, 2019 3:52 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by iMustBcrazy »

rumen wrote: Thu Jul 22, 2021 10:57 pm let me try it myself first. The thing is that I will not be available till Tuesday.

untill then you may want to try to disable the onboard WiFi from the firmware add the line:

dtoverlay=disable-wifi

in /boot/config.txt.

this should make the external wifi wlan0
Thanks rumen, I've tried everything and can't get it to work. Your config.txt changed worked as you said but I still couldn't get a hotspot. One thing I'm not entirely sure of is the proper name for the driver in hostapd.conf. I know the adapter driver is rlt8821cu or something close to that but I don't know exactly what it should be.
rumen
Posts: 133
Joined: Wed Feb 22, 2017 7:31 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by rumen »

If it shows as wlan0 then the driver is loaded. Do you see it as wlan0?
rumen
Posts: 133
Joined: Wed Feb 22, 2017 7:31 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by rumen »

See my next post :)
Last edited by rumen on Fri Jul 23, 2021 5:51 am, edited 1 time in total.
rumen
Posts: 133
Joined: Wed Feb 22, 2017 7:31 pm

Re: How to select USB Wifi Adapter (wlan1) for indigosky

Post by rumen »

You owe me a beer :)
I woke up early this morning to try it on a clear indigosky image just before I leave for a short vacation:

1. i plugged my wifi dongle:
2 . and issued dmesg:
[48947.874303] usb 1-1.1: new high-speed USB device number 3 using xhci_hcd
[48947.976227] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[48947.976249] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[48947.976263] usb 1-1.1: Product: 802.11n WLAN Adapter
[48947.976275] usb 1-1.1: Manufacturer: Realtek
[48947.976287] usb 1-1.1: SerialNumber: 00e04c000001
[48948.177577] rtl8192cu: Chip version 0x11
[48948.245338] rtl8192cu: Board Type 0
[48948.245496] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[48948.245552] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[48948.245858] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[48948.250362] usbcore: registered new interface driver rtl8192cu
[48948.400320] rtl8192cu: MAC auto ON okay!
[48948.428934] rtl8192cu: Tx queue select: 0x05
[48949.991178] wlan1: authenticate with dc:a6:32:04:d0:77
[48950.013707] wlan1: send auth to dc:a6:32:04:d0:77 (try 1/3)
[48950.023226] wlan1: authenticated
[48950.023493] rtl8192cu 1-1.1:1.0 wlan1: disabling HT/VHT/HE as WMM/QoS is not supported by the AP
[48950.026336] wlan1: associate with dc:a6:32:04:d0:77 (try 1/3)
[48950.039625] wlan1: RX AssocResp from dc:a6:32:04:d0:77 (capab=0x411 status=0 aid=1)
[48950.041771] wlan1: associated
[48950.069170] wlan1: Limiting TX power to 20 (20 - 0) dBm as advertised by dc:a6:32:04:d0:77
[48950.070290] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready

my dongle is wlan1 as expected

3. then i added:

dtoverlay=disable-wifi
in /boot/config.txt.

4. rebooted the RPi and issued the command:
indigo@indigosky:~ $ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11 Mode:Master Tx-Power=20 dBm
Retry short limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off

So my dongle is wlan0

5. I was able to see the indigosky wifi AP and use it

Rumen
Post Reply