New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No error message printed when not using an AP supporting wifi card #476
Comments
Hi @tmuehlhoff, are you saying that tuya-convert is not working with a wifi adapter that does not support AP mode? This is expected as AP mode is required to, well, create an AP. |
Yeah sure, but what I'm after is an according error output.... nl80211: Could not configure driver mode Could cause to output one, or ? Also it could issue an rfkill unblock.... |
Sorry I don't understand what you are asking. If your card does not support AP mode, you will get errors if you try anyway. None of the services can start if that first step fails. |
What about an error message if the wifi chip isn't supported ? |
We do this already. Can you specify what you think it should do differently? |
well, as you can see from above, I didn't receive any, only took that info from the logs... my shell output: |
obviously my intel card doesn't produce that error message you're matching on... Let me try to reproduce it, I will come back with some more info on why this isn't catched. |
Got it: if you just grep for "AP" in iw list it will find the string "AP" even though it's not supported by the adapter:
but:
does not list AP mode. On top of that, if I plug in the 2nd Wifi adapter, "iw list" will print all capabilities for BOTH adapters! Attaching my iw list output for only the Intel adapter as reference.
|
How about
Yes, this is a known issue with how |
Yes, suggestion works well here, thanks for fixing.... The other thing: if the device is RFKILLED... you could run an rfkill unblock over it ?! Or do you want me to file another ticket ? |
You do not need to file another ticket. A wifi device wouldn't normally be |
well, MY device WAS rfkilled, the only thing I did is enable Ethernet in NetworkManager (which implicitly disables Wifi, thus rfkills it). |
(Forgive me the meaningless title, I hit Enter mistakenly ;) )
Tried to use the tool on a Thinkpad T500, Ubuntu Bionic, e1000e driver of kernel 4.15.0-73.
The Wifi HW is:
03:00.0 Network controller: Intel Corporation Ultimate N WiFi Link 5300 (8086:4236)
Obviously this adapter doesn't allow AP mode... it's been set to master, but the rest doesn't seem to work
console:
Starting smart config pairing procedure
Waiting for the device to install the intermediate firmware
Put device in EZ config mode (blinking fast)
Sending SSID vtrust-flash
Sending wifiPassword
Sending token 00000000
Sending secret 0101
Traceback (most recent call last):
File "./smartconfig/main.py", line 26, in
smartconfig( passwd, ssid, region, token, secret )
File "/home/to/tuya-convert/scripts/smartconfig/smartconfig.py", line 46, in smartconfig
sock = SmartConfigSocket()
File "/home/to/tuya-convert/scripts/smartconfig/smartconfig.py", line 29, in init
self._socket.bind((address, 0))
OSError: [Errno 99] Cannot assign requested address
.......................................
smarthack-wifi.log
Attempting to stop wpa_supplicant
Stopping NetworkManager...
Configuring AP interface...
RTNETLINK answers: File exists
Starting DNSMASQ server...
Starting AP on wlp3s0...
Configuration file: /dev/stdin
nl80211: Could not configure driver mode
nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlp3s0: interface state UNINITIALIZED->DISABLED
wlp3s0: AP-DISABLED
hostapd_free_hapd_data: Interface wlp3s0 wasn't started
AP closed
Stopping DNSMASQ server...
Restarting NetworkManager...
I later used a USB stick (idVendor=0bda, idProduct=8176
....
rtl8192cu: Chip version 0x10
rtl8192cu: Board Type 0
....
rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
....
which worked ok, thus I suspect the Intel not to like the master mode
Pre-Condition was to "rfkill unblock" the devices previous to starteing the script. This could be captured in the script, I think ;)
Nice work!!! /To
The text was updated successfully, but these errors were encountered: