SOLVED Duet Wifi M587 Command
I just updated my Duet Wifi to the latest FW. I now receive an error that the "P" parameter is missing in the M587 command. I read in the forum that M587 needs to be sent to the controller with a macro now.
How do you send the macro if the controller Wifi connection isn't established?
Can someone send me an example of their M587 macro or let me know if there is a better way to have the controller automatically connect to my computer over Wifi when it is powered ON?
This is what has worked previously for me prior to updating the FW.
M587 S"AM LAB"
M551 P"Z75" ; set password
M552 S0 ; Turn on Wifi
;M552 P192.168.1.0 ; enable network and set static IP - doesn't work, Static IP needs to be setup in Router
@code7 Follow the Getting Connected guide to add an SSID to the remembered networks list (using M587): https://duet3d.dozuki.com/Guide/1.)+Getting+Connected+to+your+Duet/7
If you want to do it via a macro, you'll have to write the macro in a text editor, save it, and copy it to the SD card, then put the SD card back in the Duet.
M587 https://duet3d.dozuki.com/Wiki/Gcode#Section_M587_Add_WiFi_host_network_to_remembered_list_or_list_remembered_networks writes the SSID and password to the flash memory of the WiFi module. If it's in your config.g, it's doing this every time you start up, which is not good for the flash memory of the WiFi module. You don't need to do this every time you start up, just once, so it is stored. So in more recent firmware it is ignored in config.g.
If the SSID is already stored you actually want
M552 S1in config.g to enable the WiFi and connect. If you want it to connect to a specific SSID, you send
M552 S1 P"AM LAB".
Once the Duet Wifi is connected to the network as verified through sending the M552 S1 P"password" command and receiving a response of "ok", how do I find the IP address that is being used?
Sending "M552 S1" returns the following:
Turn off the current WiFi mode before selecting a new one
@code7 M552 with no parameters reports the current network state and IP address.
Maybe the picture in step 10 of the Guide is outdated then.
Sending M552 responds with the following:
WiFi module is being started
@code7 No, M552 does report correctly (Duet 2 WiFi on RRF 3.3RC1):
M552 WiFi module is connected to access point BT-3HATHX, IP address 192.168.1.134
Your WiFi is reporting that it is still starting up. The 'ok' response is just that the command was accepted. It can take around from 5 to 30 seconds to connect and get IP address. If it's not connecting after that sort of time, I'd expect an error message. Send M122 and post the response, making sure you can see the last part about the WiFi network.
If you are still having problems, it's possible the firmware update of the WiFi module failed. Connect via USB and send M997 S1 to flash the WiFi firmware to the WiFi module.
Thanks - reflashing the WiFi firmware fixed the problem.