Connecting to Wifi Network after Access Point enabled.

  • Duet 2 Wifi not connecting to Networks after Access Point used previously. @dc42 Do you know the solution to this?

    Have tried M552 S3, M552 S0 Followed by M588 S"*" then the new SSID and Password, YAT Returns OK, Send M552 S1 - No Known Networks Found

  • Moderator

    For correct usage of relevant gcodes, see:

    M552 S3 isn't a valid command. What are you trying to do there?
    Make sure YAT is set up correctly, especially if your Wifi password is case sensitive.

    To delete remembered networks, send (via USB):
    M552 S0 ; disables network
    Wait 10 seconds
    M588 S"*" ; deletes all saved SSIDs
    Wait 10 seconds
    M552 S1 ; enable network

    To add a new network (must be 2.4GHz, not 5G, WPA2 encryption) send (via USB)
    M587 S"networkname" P"password"
    M587 ; list stored networks
    M552 ; list network connections

    NOTE: M587 should NOT be in config.g

    Try pinging the ip address if you get one. If it pings, but you still can't reach the DWC, I'd suspect a corrupt SD card (or corrupt DWC files), assuming firmware is up to date.

    Also, please send M115 so we can see firmware version. Is the Wifi firmware and DWC up to date/compatible version?


  • Hi Ian, Thanks for your reply! I will give that another go waiting 10 seconds inbetween sending the M Commands, that is the process I went through, It was my understanding that M552 S3 Stops the Module Completly and David showed me this at the 3D Meetup a few months back.

    At Ooznest we have had a few controllers with the same issue, have you seen anything wrong with the Wifi Module that causes this or is it complete user error?

  • Moderator

    I'm pretty sure it's M552 S-1 that disables the Wifi module completely. I'm not sure if you can get it to store SSIDs when it's disabled, as these are stored on the WiFi module, which is... disabled. Probably a good thing to test.

    I don't think the WiFi module itself is the issue; they are generally pretty reliable. It's often interference (eg failing PSUs), shielding (metal box printers are becoming more popular), or (occasionally) people forgetting that they have a WiFi repeater/booster in another part of the house with the same SSID and a weak signal that the Duet is determined to attach to (something similar happened to Thomas Sanladerer during a youtube live blog)! There's a couple of firmware issues with beta/RC firmware we're trying to iron out (there's been other posts about this), but if the problem can't be replicated it makes it difficult to track down where the issue is.


  • Thanks again Ian for the quick reply, I will Teamviewer our Customer and try the method you have mentioned, so to confirm the commands to configure the Wifi Network would they conflict with an existing Access Point Parameter?

    As our Customer is currently set up in that mode working fine but we are unable to get them back onto their home Wifi? Would your method work or is there something I'm missing?

  • Moderator

    Not sure; I haven't used Duet in access point mode, so another one to test! M552 S2 followed by M589 with S, P, I and C settings configures the Duet as an access point, and M589 can't be in config.g, so it's settings are most likely stored on the WiFi module, so I think erasing the WiFi module will delete access point settings (need to check with @dc42 ). I think if you DON'T erase the module, the settings should still be there even if you connect to a different WiFi network. Maybe send M587 to list stored networks, I'd think the access point settings would show up (will test, also). You can delete individual stored networks, of course.

    Edit: M589 on it's own shows stored access point settings.


  • Moderator

    Okay, just tested. M587 doesn't list Duet access point settings, only WiFi hosts. So:

    M589 S"DUET" P"DUETTEST" I192.168.2.1 ; creates an AP network
    M589 ; lists AP network
    M589 S"*" ; deletes AP network

    M589 S"DUET" P"DUETTEST" I192.168.2.1
    SENDING:M589 S"DUET" P"DUETTEST" I192.168.2.1
    Own SSID: DUET IP= GW= NM=
    M589 S"*"
    SENDING:M589 S"*"
    M589: Own SSID not configured
    Remembered networks:
    VM596525-2G IP= GW= NM=

    This does not seem to effect the stored WiFi hosts. I'm sure it's the same the other way around, in that you can delete all stored WiFi hosts, and it won't delete the Duet access point settings. Will update M589 documentation to reflect this.


  • @droftarts Thanks again for your input Ian, I will give this a try tomorrow with our Customer and see how we get on! Out of curiosity what program do you have the Duet open in? We mainly use YAT is that the best Terminal Emulator to use? Look forward to hearing from you,

  • Moderator

    YAT is the best option, mainly because it can send upper and lower case characters to the Duet, which is important if you need to send case-sensitive passwords. You can also set it up to convert the <LF> line endings, so responses from Duet look sensible. See:

    I generally use a Mac, and connect either by Terminal, or Pronterface (10Mar2014 version is most stable for me, haven't tried newer versions), which is what I was using today.


  • Hi,

    Somewhat related:

    My goto app for serial communication with a device like a Duet is Docklight Scripting

    It's not a general purpose "console" like tool.

    It is aimed at testing and simulation which works well when configuring and testing a Duet.

    Highly recommended.

  • There was another similar thing in another thread. I believe having the SSID hidden was causing issues, if you haven't looked at exposing the SSID.

  • administrators

    @RyanChristy, two suggestions:

    1. Run M587 without parameters from YAT to list the access points that the WiFi module knows about. It should list the one that you entered using the full M587 command. Check that the SSID is exactly right.

    2. Can you see that WiFi network if you do a network scan on a smartphone or similar? If not, then perhaps the access point is hiding the SSID. You can still connect to it using this form of M552 command:

    M552 S1 P"myssid"

    substituting the correct SSID.

Log in to reply