Duet WiFi in access point mode

  • administrators

    I have put an experimental build of DuetWiFiServer at https://www.dropbox.com/s/5cp3w947vonp36s/DuetWiFiServer-1.20b8.bin?dl=0. Access point mode is working in this build. To run the Duet WiFi in access point mode:

    • Install this version of DuetWiFiServer (1.20beta8), also install DuetWiFiFirmware 1.20beta4 or 1.20beta6
    • Use the M589 command to specify the SSID, password and IP address to use, see https://duet3d.com/wiki/G-code#M589:_Configure_access_point_parameters. Please note, you must specify an IP address, but M589 doesn't yet warn you if you leave it out.
    • Send M552 S2 to start up in access point mode (if it is already running in station mode then you need to send M552 S0 first).
    • Use your smartphone or laptop to scan for the SSID you specified and connect to it. Please note, your smartphone may complain that there is no Internet access, and as a result may try to reconnect to another wifi network instead. So you may have to stop it connecting to your router to get it to stay connected to the Duet WiFi.

    Please report successes and failures to use this facility here.

  • Just wanted to drop a note that I was able to get this working.

    I fumbled around a bit, but in the end it would appear the only issue I had was that the Wifi Password must be 8 characters. The M589 command didn't give any feedback when I tried something else, but once that was taken care of I was all set.

    As an aside, it would be most helpful if this could be extended to allow broadcasting of the SSID to be turned off. Company policy states that unregistered broadcasting Wifi AP's must be turned off.

  • administrators

    I'm glad it's working for you. 8 characters is the minimum allowed for WPA. I'll add putting a check on that to the work list, also an option to not broadcast the SSID.

    I recommend you use RRF 1.20beta11 and DWS 1.20beta10 now.

  • I updated the firmware, wifi server and web interface to version 1.20. I was able to successfully initiate and utilize the access point mode, nearly flawlessly. When I cut power to the printer and turned it on again, the Duet forgot the settings.

    Is there a way to write these settings to EEPROM, or should they already be saved by using the M589 command?

  • administrators

    The settings are already saved by the M589 command. You can retrieve them (except the password) by sending M598 with no parameters. You should only need to put M552 S2 in config.g to have it always start in access point mode.

  • I have tried the M552 S2 command in config.g by:
    1. changing line 3 in config.g from M552 S1 to M552 S2
    2. changing line 3 in config.g from M552 S1 to M552 S0, then adding M552 S2 immediately after or at the very end
    3. using G4 S120 at the end of the code followed by M552 S2

    Each of these results in the same issue:
    After powering down, On startup the duet broadcasts an open wifi access point named "AI-THINKER_2FBDDD"
    To get my custom access point to initiate, I have to wait about 30-60 seconds after power on, then open a terminal and send M552 S2

    Any suggestions?

  • administrators

    How strange! It's working fine for me, although I am using a later version of DuetWiFiServer. My suggestions:

    1. Upgrade to DuetWiFiServer.bin 1.21RC2. Also upgrade main firmware to 1.21RC2 because I am not certain whether the new WiFi firmware is compatible with the older main firmware.

    2. If that doesn't solve the problem, send M588 S"*" to clear the flash memory, then use M589 to set the access point details again.

    HTH David

  • I upgraded to 1.21RC2 and tried clearing the flash but I am still struggling with the same problem. A simple send from the terminal activates the access point, but it will still not connect on startup.

    How and where in the config.g do you have your M552 S2 command?

  • administrators

    I have M552 S2 near the beginning, after setting the machine name. It shouldn't matter where because the network is not activated until config.g has been fully processed.

    I'll review the network startup code.

  • Currently running (downloaded today):

    Firmware Version:	1.21 RC2 (2018-02-15 build 2))
    WiFi Server Version:	1.21 RC2 
    Web Interface Version:	1.20

    I configured M589 like said here , like so:

    file config.g:
    ; network
    M552 S0 ;
    M589 S"MY_PRINTER" P"psswrd123456" I192.168.2.100 ;  access point
    M586 P0 S1                      ; Enable HTTP
    M552 S2   

    But this only works, when I send "M552 S2" AGAIN via console, after the board booted. I did put "M552 S2" into the config.g, but appearently, this doesn't help?! Do I have to put the M552 S2 somewhere else?
    Before I do send M552 S2 via console, the DUET creates an unsecured network called "AI-THINKER_0AEB5B", which I can connect to, but can not reach the web-interface. After sending M552 S2, the network "MY_PRINTER" is available (and the blue LED on the wifi-module is on) and the "AI-THINKER…" network disappears.

  • administrators

    What happens if you remove the M552 S0 and M589 commands from config.g? The M589 parameters are saved on the WiFi module so no need to keep resetting them.

  • ok, changed config.g to:

    ; network
    M586 P0 S1                      ; Enable HTTP
    M552 S2                         ; Enable network
    M586 P1 S0                      ; Disable FTP
    M586 P2 S0                      ; Disable Telnet

    Restarted (from the prompt in the webinterface after changing the config). Then:

    SENT: M552
    READ: WiFi module is idle

    If I put M552 S1, the Duet connects to my homenetwork, if I put M552 S2, the duet starts the accesspoint (wifi module is providing accesspoint…).
    But it does not start it on its own after bootup.

  • administrators

    I don't know if it will help, but please try putting the M586 parameters before the M552. Or omit them, because the default is to enable HTTP only anyway.

  • I did remove all M586 commands, but everything is still the same.

    Is there a way to call a macro automatically after boot up? This way I could force to load a macro with M552 S2 in it after the boot up…

  • administrators

    Even though I haven't yet been able to reproduce this, I've added it to the list of issues to investigate before the 1.21 firmware release.

  • @dc42:

    Even though I haven't yet been able to reproduce this, I've added it to the list of issues to investigate before the 1.21 firmware release.

    ok, thank you.

  • ^^^ This is the exact same problem I have been having. No matter how I change the config.g, The access point will not start automatically after Boot up. I have to manually enter M552 S2 through the console to turn it on. Once on, though, it has been flawless.

  • Ok, i fiddled around this evening and found out, that the accesspoint works EVERY TIME, when using:

    8 caps letters for SSID and 8 caps letters for the password. Example:

    M589 S"MEINDUET" P"MEINWIFI" I192.168.178.250;

    As soon as the SSID contains lowcase-letters or numbers, it doesn't work anymore. Same for the password. And using less or more digits than 8 doesn't work too.

  • administrators

    Have you tried firmware 1.21RC3 yet? I made a change that should improve it, see the release notes.

  • @dc42:

    Have you tried firmware 1.21RC3 yet? I made a change that should improve it, see the release notes.

    I updated to RC3 on firmware and webserver, and RC4 on the interface, and a quick test with:

    M589 S"test123" P"test123" I192.168.178.250;

    didn't work. Back to all capital letters and 8 per parameter and it is functional again.

Log in to reply