Wifi module keeps disconnecting
-
Yes, done that. Anyhow, more pressing issues…
We've just upgraded to a new broadband provider. Had to change the wifi password. Sadly, the only way for me to do this on a chromebook was via a chrome extension called Beagle Term. This is painful, as you can't see what you type, but you see the output of M commands and it connects ok to the Duet, and with this I can mess about with the wifi module.
However, the Duet keeps claiming that it is connected, when it is not. It states on M552
WiFi module started
Wifi module is connected to access point Littlefish, IP address 192.168.0.100But that's a duff address. The router shows nothing connected, you can't ping it. I have to shut it down and restart it. After literally dozens of attempts, I finally managed a connection yesterday. Saved the new wifi settings in the config file. Somewhat surprised this morning to turn the printer on and have it fail to connect.
Again, various M587 attempts mostly don't work, sometimes they claim to work, as above, but don't really connect.
WiFi signal strength -52dBm.
-
If M552 claims it is connected and gives an IP address, that can only mean that your router assigned it that IP address and it was connected, however briefly. You can send M552 again, without parameters, to see if it still thinks it is connected.
A signal strength of -52db is good enough, but interference from another device could still swamp the signal.
Which main firmware and wifi firmware versions are you running?
-
FIRMWARE_NAME: RepRapFirmware for Duet WiFi FIRMWARE_VERSION: 1.20 ELECTRONICS: Duet WiFi 1.0 FIRMWARE_DATE: 2017-12-23
M552 claims it is connected, but the router does not show it connected. You cannot ping it. You send M552 again and again it claims it is connected.
One of them has to be wrong - I think it's the Duet.
–-
Been trying all morning with this, wasted hours. Cannot get this issue sorted. Can't connect to the Duet. It keeps claiming it's connected when it isn't. It's so frustrating.
-
Tried adding an IP address…
M552 S0
M587 S"Littlefish" P"xxx" I192.168.0.15M552 S1
M552 gives:
WiFi: connected with Littlefish, channel 1
Wifi module is connected to access point Littlefish, IP address 192.168.0.15
WiFi: ip:192.168.0.15,mask:0.0.0.0,gw:0.0.0.0
WiFi: pm open,type:2 0
WiFi module is connected to access point Littlefish, IP address 192.168.0.15
ok
WiFi module is connected to access point Littlefish, IP address 192.168.0.15
okBut there are no devices connected with that IP address. It's just as bad as the spurious 192.168.0.100
I'm totally lost now. Please help! -
And more info:
I have tried setting the P parameter on M587 in several ways, as it generally reports the wrong password. e.g. assuming the first is correct, but fails to connect:
M587 S"Littlefish" P"TestPass"
M587 S"Littlefish" P"T'e's'tP'a's's"
M587 S"Littlefish" P"T'E'S'TP'A'S'S"
M587 S"Littlefish" P"t'e's'tp'a's's"
When I try the bottom variant, I get the (false) connected message, with the non-existent IP address.
Anyone got any ideas?
-
Tried adding an IP address…
M552 S0
M587 S"Littlefish" P"xxx" I192.168.0.15M552 S1
M552 gives:
WiFi: connected with Littlefish, channel 1
Wifi module is connected to access point Littlefish, IP address 192.168.0.15
WiFi: ip:192.168.0.15,mask:0.0.0.0,gw:0.0.0.0
WiFi: pm open,type:2 0
WiFi module is connected to access point Littlefish, IP address 192.168.0.15
ok
WiFi module is connected to access point Littlefish, IP address 192.168.0.15
okBut there are no devices connected with that IP address. It's just as bad as the spurious 192.168.0.100
I'm totally lost now. Please help!It appears that there is a compatibility problem between the WiFi module and your router. I am fairly certain that your router is accepting the low-level connection from the wifi module, and allocating it an IP address if you don't assign it a static IP address, but it is then refusing the connection at some other level. What router are you using?
-
And more info:
I have tried setting the P parameter on M587 in several ways, as it generally reports the wrong password. e.g. assuming the first is correct, but fails to connect:
M587 S"Littlefish" P"TestPass"
M587 S"Littlefish" P"T'e's'tP'a's's"
M587 S"Littlefish" P"T'E'S'TP'A'S'S"
M587 S"Littlefish" P"t'e's'tp'a's's"
When I try the bottom variant, I get the (false) connected message, with the non-existent IP address.
Anyone got any ideas?
How are you sending those M587 commands?
-
If you send them from a terminal emulator or similar that doesn't force all characters to upper case, then the first 3 are equivalent. The last one is different because the password will be testpass instead of TestPass
-
If you send them from a program that does force the characters to uppercase, then in all cases the SSID will be LITTLEFISH not Littlefish. In the first case the password will be TESTPASS and in the other 3 it will be TestPass.
So did you set testpass or TestPass as the password on your router?
-
-
The router is a new Virgin Media Hub 3.0 All our other devices work fine and connect fine.
I'm sending the M587 commands via the Chrome extension UARTool. I don't know if it converts to uppercase - I don't think so as the SSID name is always correct. I'm just trying everything I can.
The virgin router forces you to use at least one uppercase letter.
Prior to this I didn't have any, and didn't have any problems.What is bizarre, at least to me, is that I somehow got connected yesterday, after many, many attempts. I immediately changed the config using the DWC to the correct password thinking it would be solved. But today, when I switched it on it failed to connect using those values. And since then I have been unable to connect any other way.
I've lost the whole day, just trying to get the printer to connect.
-
I can confirm that the final variant always results in the false connected message. I repeated it lots of times, it always claims it's connected and it never is.
-
I really don't think the connected message is false, because the wifi module doesn't lie about whether the access point has allocated it an IP address and accepted the connection. If you turn off wifi on your router and run M552 a little while later, I think you will find that the Duet reports it has lost the connection.
You could try upgrading firmware and wifi module to 1.21RC3, or just upgrade DuetWiFiServer to 1.21RC1 and keep the main firmware at 1.20, because 1.21RC1 and later use new WiFi firmware form the manufacturers of the wifi chip.
-
You could try upgrading firmware and wifi module to 1.21RC3, or just upgrade DuetWiFiServer to 1.21RC1 and keep the main firmware at 1.20, because 1.21RC1 and later use new WiFi firmware form the manufacturers of the wifi chip.
How? I have no way of doing that if I can't connect it to the WiFi, do I?
-
See Fallback procedire #1 at https://duet3d.dozuki.com/Wiki/Installing_and_Updating_Firmware.
-
Ok thanks, I'll try that tomorrow.
My wife also suggested an interesting solution, which is to use my phone as a WiFi hotspot, which would test the WiFi module without the pernicious influence of our new router.
-
Yes, that's a good idea.
-
OK, tried with my phone as a hotspot and the Duet connected first time to my phone, I could view the DWC via the same hotspot on my laptop.
So there's seems to be a problem with the router.
Next I tried to upgrade just the DuetWiFiServer to 1.21RC1. It did this, then disconnected. I now I can't connect at all to the wifi module. It's throwing up all kinds of errors that weren't there before. the M587 command keeps failing with
Turn off the current WiFi mode before selecting a new one
and M587: Failed to add SSID to remembered list.
God I'm growing weary of this.
-
I feel your pain - been there (not with the Duet, yet, TG!). Have you tried turning off all other WIFI devices? I was having similar fits with an IoT device and it turned out to be a different device (Arduino Yun) not playing nice . When I unplugged that all my problems went away.
-
OK, tried with my phone as a hotspot and the Duet connected first time to my phone, I could view the DWC via the same hotspot on my laptop.
So there's seems to be a problem with the router.
Next I tried to upgrade just the DuetWiFiServer to 1.21RC1. It did this, then disconnected. I now I can't connect at all to the wifi module. It's throwing up all kinds of errors that weren't there before. the M587 command keeps failing with
Turn off the current WiFi mode before selecting a new one
and M587: Failed to add SSID to remembered list.
God I'm growing weary of this.
There seems to be a bug in 1.21RC3 whereby you may need to send M552 S0 twice to get out of the current WiFi mode, or maybe you just need to wait longer after sending it. It's on my list to investigate. I wasn't aware of the same issue with 1.21RC1, but perhaps it's in that version too.
-
Might just be my weakish WiFi signal but after updating from 1.20 to 1.21RC3 I seem to be getting more random disconnections than I did prior to the upgrade.
Hitting connect usually gets me straight back in though there have been a couple of occasions where I struggled a bit.
Relevant bit of M122 diags in case there's anything in there that's of any use (as you can see the signal strength is weak but not that bad):
- WiFi -
Network state is running
WiFi module is connected to access point
Failed messages: pending 0, notready 0, noresp 0
WiFi firmware version 1.21RC3(28b1)
WiFi MAC address ec:fa:bc:0b:f7:33
WiFi Vcc 3.47, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 14952
WiFi IP address 192.168.0.25
WiFi signal strength -71dBm, reconnections 0, sleep mode modem
Socket states: 2 0 0 0 0 0 0 0
- WiFi -
-
Thanks. Your reported signal strength of -71dBm is rather low and likely to be a contributory factor.
1.21RC1 and later use a different wifi SDK version than 1.20 and earlier did, and there appear to have been major changes between the two versions. So it is quite likely that one will work better than the other in a particular environment. We had to make the change to get the fix for the KRACK vulnerability.
-
Nope, tried sending M552 S0 twice, with a pause. There's something wrong with that version, it doesn't write the SSID when you send M587, even though it replies "ok". When you ask it to list the SSIDs, it fails to retrieve them.
Looks like the SD card is my next option.
But I'd like to know how the printer connected to my phone's wifi hotspot with a glitch, but still fails to connect to my router's wifi. Every other device in our house works perfectly with the router. I put capital letters in my phone's hotspot password just to test it - worked fine. The Duet just cannot connect the main router for some reason. We have laptop, chromebook, chromecast, Nintendo Switch, TV, etc all connect fine. The only one that won't is the Duet. And this is with the correct network name and password in the config file.