Static IP [solved]



  • Hi, would anyone care to share the part of their config.g (for a duet wifi) which enables static IP (I'm running 1.21 rc5 but I presume any 1.21 rcx version will work the same).

    I have up until now been running 3 machines with DHCP, and have setup router reservations for them, but wanted to neaten things up.

    Thanks in advance.



  • Okay so I solved my own problem. In case it helps here's how I did it.

    I made a file using my pc on the SD card in macros called setnetwork:

    M552 S0					;stop wifi
    G4 P1000				;pause
    M587 S"3DP" P"********" I192.168.0.4 J192.168.0.1 K255.255.255.0		;add my network and IP address,gateway,netmask
    

    Then changed my config.g networking section to just

    ;networking
    M540 P**************************; MAC Address
    M552 S1 				;start wifi
    
    

    -Reinserted the sd card into the duetwifi and hit the reset button
    -Connect the machine by USB and opened console in pronterface.
    -Sent M558 S"*" which forgets all known networks, send it like that the * means all networks
    -Then M98 P/macros/setnetwork

    Then restarted the machine now its IP address is 192.168.0.4 as I wanted it to be.

    (obviously the data in the fields above refers to my network and machine, I have replaced anything sensitive with ***** - I know this is obvious to most, but just in case)



  • This is an Ethernet model, but I would think they would be essentially the same.

    ; Communication and general
    M111 S0                        	
    M550 PRostock MAX V2	
    M551 Pxxxxxxxxxx                	
    ;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED 	; MAC Address
    M552 S1					; Turn network on
    
    ;*** Ethernet networking: Adjust the IP address and gateway in the following 2 lines to suit your network
    M552 P192.168.1.119			; (0 = DHCP)
    M554 P192.168.1.1			; Gateway
    M553 P255.255.255.0			; Netmask
    
    


  • Thanks, so there are several methods.


  • administrators

    The Duet Ethernet and the older Ethernet Duets use M552/554/553 to set the IP address, gateway and netmask because you only need one set. On the Duet WiFi, you may need a different set depending on which WiFi network you connect to. That's why the parameters are included in the M587 command for the Duet WiFi.



  • Another way is to set the Mac address in the router to have a specific address. I had to do this due to not being able to access the internet through my pi for updates. And it's easy as to do.


Locked
 

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