What is command for turning off wifi?



  • Hi,

    I'm using Cncjs and I constantly get message about failed connection and wifi being idle. How can I turn it off?

    Cheers



  • I know that command M552 S0 works for turning on wifi so I tried M552 S1 but it doesn't work.



  • M552 S0 turns off the WiFi for a Duet, is that what you are trying to achieve?
    Or M552 S-1 disables the WiFi module, according to this; https://duet3d.dozuki.com/Wiki/Gcode#Section_M552_Set_IP_address_enable_disable_network_interface

    HTH Paul.


  • administrators

    M552 S-1 resets the WiFi module (it stays reset until you send another M552 command)
    M552 S0 puts the wifi module in idle mode
    M552 S1 tries to connect to one of the known networks (use M587 to set them up)
    M552 S2 runs as an access point (use M589 to set up the AP parameters)

    Are you running DuetWiFiServer version 1.23?



  • Thanks, both answers worked for me M552 S-1 it was.

    I'm not sure which is my duetwifiserver version:
    FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.02(RTOS) ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2018-12-24b1<LF>ok<LF>


  • administrators

    To check the DuetWiFServer version, turn the WiFi module on (idle mode will do), send M122 and look at the WiFi section of the report. If using USB/YAT then change the line terminator in YAT to LF only.



  • Its covered in the wiki
    https://duet3d.dozuki.com/Wiki/Gcode#Section_M552_Set_IP_address_enable_disable_network_interface

    (too late, never mind, post got flagged for spam and when it went through there were more replies..)



  • @dc42 I tried your method but I'm still not sure what duetwifiserver version I'm running:
    === Diagnostics ===<LF>RepRapFirmware for Duet 2 WiFi/Ethernet version 2.02(RTOS) running on Duet WiFi 1.02 or later<LF>Board ID: 08DGM-917DA-G4MS8-6J9D6-3S46N-9TT7B<LF>Used output buffers: 1 of 20 (4 max)<LF>=== RTOS ===<LF>Static ram: 25524<LF>Dynamic ram: 98424 of which 0 recycled<LF>Exception stack ram used: 320<LF>Never used ram: 6804<LF>Tasks: NETWORK(ready,1260) HEAT(blocked,1232) MAIN(running,3844) IDLE(ready,200)<LF>Owned mutexes:<LF>=== Platform ===<LF>

    I managed to put wifi into idle, but I have to do it every time I start machine otherwise I'm constantly getting annoying message "wifi reported error"

    How can I disable wifi completely ?



  • @bearer

    Section in link you provided is misleading, it says that S0 will disable wifi where it only puts wifi into idle:

    Parameters for Duet 2 Ethernet and 06/085

    Pnnn IP address, 0.0.0.0 means acquire an IP address using DHCP
    Snnn 0 = disable networking, 1 = enable networking
    Rnnn (optional, RepRapFirmware 1.17 and earlier only) HTTP port, default 80

    I don't know what you mean with post being flagged.



  • @arkadiusz said in What is command for turning off wifi?:

    Section in link you provided is misleading, it says that S0 will disable wifi where it only puts wifi into idle:

    Not really, if you read the section pertaining to the wifi board you'll see S-1 disables it.

    I don't know what you mean with post being flagged.

    Forum initially didn't allow the reply because it thought it was spam, so I tried again later and did't see it had been answered already.



  • You're right, I copied wrong section, I tried S-1 as suggested before but it only works at the beginning after executing command.
    When duet is rebooted it goes back to idle and keep searching for wifi.



  • @arkadiusz said in What is command for turning off wifi?:

    I managed to put wifi into idle, but I have to do it every time I start machine otherwise I'm constantly getting annoying message "wifi reported error"
    How can I disable wifi completely ?

    try adding the disable command to your config.g file? (at least it will run the disable command automatically on boot).



  • @arkadiusz said in What is command for turning off wifi?:

    When duet is rebooted it goes back to idle and keep searching for wifi.

    You need to edit config.g. There is probably M552 S1 in there already to start wifi at bootup. Either remove it, or change it to M552 S-1



  • Thanks for help everyone, I'm still beginner here and I appreciate all help provided.
    Like bearer and Phaedrux said I had to modify config.g.


Log in to reply