Problem with 1.18 to 1.19 Update
-
Hello!
I'm in the midst of setting up a new Duet Wifi board. It arrived with 1.18 firmware, which I was able to get up and running quickly with no issues. I've tried to update it to 1.19 following the 1.18>1.19 update guide on the wiki with no success.
It appears to be updating the software fine but can't connect to the network with the macro command (or manual command line codes). Specifically it gives me a "Bad Parameter in M587" error. I've copied the macro file directly from the supplied version with just my SSID and PW changed, and also manually created one to ensure it's clean with no luck. I'm running OSX on a macbook. Below is the command line output in Pronterface when I run the update and macro.
When I try connecting to the wifi network with a M552 S1 it says the password is wrong, which is definitely is not. I'm using the same password which worked fine with 1.18, and I've confirmed in the router software that it's correct. Also below is a copy of the macro script I've been using, with the password replaced with stars. The password does not contain any special characters, only lower-case letters and numbers.
I'm not sure what else I can try now so any help would be much appreciated…
Cheers,
Ben[[language]] Connecting... Printer is now online. >>> M997 S0:1 SENDING:M997 S0:1 Trying to connect at 460800 baud: success Erasing 244400 bytes... Uploading file... 5% complete 10% complete 15% complete 20% complete 25% complete 30% complete 35% complete 40% complete 45% complete 50% complete 55% complete 60% complete 65% complete 70% complete 75% complete 80% complete 85% complete 90% complete 95% complete Upload successful [ERROR] Can't read from printer (disconnected?) (OS Error 6): Device not configured [ERROR] Can't write to printer (disconnected?) (SerialException): write failed: [Errno 6] Device not configured Disconnected. Connecting... Printer is now online. >>> M98 P/macros/SETNETWORK SENDING:M98 P/MACROS/SETNETWORK WiFi module started Bad parameter in M587 command Remembered networks: NETGEAR89WiFi module is changing mode WiFi reported error: Wrong password while trying to connect to NETGEAR89 Wifi module is idle
[[language]] M552 S0 G4 P1000 M587 S”NETGEAR89” P”******”
-
Not sure, but think M552 S0, disable network… Try M552 S1
-
Is your SSID really all caps?
The SSID is case sensitive.
The pass is case sensitive too, so if yours is all lowercase you need to make sure you are using the correct syntax when sending. -
Yep SSID is definitely all caps and the password is correct. There was no issues using the same credentials to get the Wi-Fi working on 1.18.
I'm pretty the problem is related to the "bad parameter" error, since the M587 command doesn't check the credential validity anyway (or so I believe…).
Also the S1 command gets the module to attempt to connect to the network, so I'm pretty sure the credentials need to be entered under S0.
-
Yes, you are correct. You need to run M587 AFTER issuing a M552 S0.
Is that second snippet of code in you config.g file? If it is, just comment it out for now.
using Pronterface(or w/e) try this:
M558 S""
M552 S0
M587 S"NETGEAR89" P"******"
M552 S1That will remove any current config, put the module idle, send the new configs, and finally initialize and hopefully connect the wifi!
Sorry if you know all this, just going on what i have in front of me for info from your post.
-
Wrong password while trying to connect to NETGEAR89
Wifi module is idleUppercase? Log say wrong password
-
Yes, you are correct. You need to run M587 AFTER issuing a M552 S0.
Is that second snippet of code in you config.g file? If it is, just comment it out for now.
using Pronterface(or w/e) try this:
M558 S""
M552 S0
M587 S"NETGEAR89" P"******"
M552 S1That will remove any current config, put the module idle, send the new configs, and finally initialize and hopefully connect the wifi!
Sorry if you know all this, just going on what i have in front of me for info from your post.
All good. The second code snippet is the macro I'm running to set the network credentials, copied from the instructions in the wiki. The enable WiFi line in the config.g file is commented out.
Unfortunately I've tried those (and several permutations) commands to set the credentials and turn on the Wi-Fi module with no success.
-
and you are 1,000,000,000,000% sure you have the case sensitivity correct in your M587 command? This is where I failed several times my first attempts.
-
and you are 1,000,000,000,000% sure you have the case sensitivity correct in your M587 command? This is where I failed several times my first attempts.
Yep definitely. I'm pretty sure it doesn't check if the credentials are correct when you run the M587 command anyway, so I don't think an incorrect password or SSID would cause the "bad parameter" error…
-
True. hmmmm
Copy your M587 line here. Redact the password, but if you could someone keep it so we can see which should be caps/lower that may help.
-
True. hmmmm
Copy your M587 line here. Redact the password, but if you could someone keep it so we can see which should be caps/lower that may help.
The last code snippet in my first post is the exact macro I've been using, just with the password replaced by stars. The password is definitely correct, so unless there's a syntax error in the M587 command somewhere it's probably a firmware issue I think.
-
Pronterface forces all characters in the commands you send to upper case, including the characters in your password. It may also fail to send special characters in your password, which main explain the "Bad parameter" errors.. Therefore, do not use Pronterface to send the M587 command. Use a terminal emulator (e.g. YAT if your PC runs Windows) instead.
-
Woohoo I think I'm back up and running!
Setting the credentials through the terminal interface seemed to work. I'm confused as to why running the macro didn't work then, I would've thought the macro would bypass the convert-to-uppercase problem?
Thanks for the help all
-
Yes, running the macro should have worked if you had the correct commands in it i.e. M552 S0 to enable the WiFi module, G4 … to give it time to start up, then the M587 command.