How to set port on v1.19 Duet Wifi



  • I tried the M552, M586, & M587 - adding the Rxxx parameter (i.e. R8080, etc) as described in the gcode wiki but none seem to work. Always get port=80 message. I have literally dozens of IoT devices that I access through a single static IP so I really need the ability to specify the port.


  • administrators

    M586 should work, although I can't remember whether on the Duet WiFi changing the port number was first supported in 1.19 or in 1.20. You may need to give the M586 command before the M552 S1 command that enables networking.



  • I use this sequence to set my Duet to port 21000:

    [[language]]
    M552 S1                                                ; Enable network
    M586 P0 S1 R21000                              ; Enable HTTP on Port 21000
    M586 P1 S0                                           ; Disable FTP
    M586 P2 S0                                           ; Disable Telnet
    
    


  • Thanks that worked. I was assigning a static IP with P192.168.0.16 and that seemed to be the problem. Going with P0 worked. I have the IP mapped to the MAC in the router as well so this works for me. Thanks!


  • administrators

    Using a static IP address shouldn't make any difference.



  • "shouldn't" being the operative word.

    M586 P0 S1 R8090 worked
    M586 P192.168.0.16 S1 R8090 didn't

    But, as I said, it's not a big deal since I set the IP address elsewhere.



  • you can't set IP with M586, you must use I/J/K parameters in M587 to assign static IP…


  • administrators

    @whosrdaddy:

    you can't set IP with M586, you must use I/J/K parameters in M587 to assign static IP…

    That's correct for the Duet WiFi. For the Duet Ethernet the ip address etc. is set in M552.



  • @whosrdaddy:

    you can't set IP with M586, you must use I/J/K parameters in M587 to assign static IP…

    Ahh. Makes sense, now. It's all there in the Wiki - I was just not reading closely enough. Thanks again.


Log in to reply