[Solved] Connecting to wifi



  • I'm really struggling to connect to wifi. I've followed all of the getting started instructions but I'm still getting the message "Failed while trying to connect" the wifi module flashes blue when I issue an M552 S1 command but I still can't connect my router has 2.5 and 5GHz channels. I've run out of ideas. I'd really appreciate any help.


  • administrators

    The first step is to run M587 to list the WiFi network(s) that the Duet knows about, and check that the SSID listed exactly matches the SSID of your network.

    Which firmware version is your Duet running?



  • Verify firmware version (as requested by dc42).

    After some time struggling, I found this to be the best method to set Wifi parameters and successfully join a wireless network.

    Verify device is in range of the wifi router
    Avoid close proximity to multiple routers and multiple SSIDs

    Start a terminal session (YAT) connected via USB

    M587 (List ALL stored networks)

    If there are any networks listed that you do not want your device to access they need to be removed from the List of Available Networks (M588 gcode)
    I removed ALL that were listed. Completely clearing the list.
    I had to remove them one by one since the M588 S"*" gcode didn't work for some reason

    M588 "what ever net name is there to be removed" (remove network from the stored network list) (MUST be typed verbatim (letter for letter) and inside quotation marks ("))

    Once the list of stored networks is clean add you wifi network information (M587 gcode)

    M587 S"SSID" P"NetPass" (set YOUR network wifi credentials)(MUST be typed verbatim (letter for letter) and inside quotation marks ("))
    If the SSID or Password has spaces or funky characters (anything other than 0-1, a-z, A-Z) you may experience issues. Make sure the SSID and Password are typed EXACTLY the same as what the router is expecting. To rule out typos, try changing SSID and Password to something less exotic. Remove spaces and funky characters.

    Finally, once the network list is clean (M588) and you have successfully joined the wifi network (M587) Launch network services (M552 gcode)

    M552 S1 (launch wifi, Duet will obtain IP address)

    The terminal session will display the IP of the Duet, connect to DWC via a browser.

    Further reading -

    https://duet3d.dozuki.com/Guide/1.)+Getting+Connected+to+your+Duet/7

    https://duet3d.dozuki.com/Wiki/Gcode#Section_Quoted_strings

    https://duet3d.dozuki.com/Wiki/Gcode#Section_M587_Add_WiFi_host_network_to_remembered_list_or_list_remembered_networks (M588 and M589 also listed)





  • Hey all thanks for your responses. I managed to delete all but one of the networks. I'm currently running 1.21RC2. I re-added the correct network so have two but still can't connect.



  • Do you have the option of disabling the 5ghz network for testing? Or perhaps renaming the 2.4ghz network so you can be sure you're connecting to it?



  • working on it



  • I think it's struggling with lowercase. I've followed the advice using apostrophes but without success. the SSID I cannot remove also contains a lower case letter. I'm unable to create a password without lowercase letters.



  • If you try adding an SSID with just an asterix as the name that should remove all of the networks allowing you to start fresh.

    What happened when you tried sending M588 S"*" ? You said it didn't work.


  • administrators

    @si3 said in Connecting to wifi:

    I think it's struggling with lowercase. I've followed the advice using apostrophes but without success. the SSID I cannot remove also contains a lower case letter. I'm unable to create a password without lowercase letters.

    What terminal emulator are you using to access the Duet over USB? It's best to use one that doesn't force the characters you send to uppercase.



  • I'm using pronterface at the moment which does force to uppercase. I'm using a mac. Is there something better I can try?



  • You could use the method described in the instructions where you create a macro file with the command to enter the SSID and copy it manually to the SD card, then use the terminal to execute the macro. No need to worry about upper or lower case conversion.



  • I've got it working thank you so much for your help. M558 S"*" got rid of the final one. I had deleted the others one at a time because of what @bricor said. After that M587 P"SSID" S"P'a's'sWORD" (with a single apostrophe in front of lower case letters on Pronterface and then M552 S1. Thanks again this has been puzzling me for a week.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.