Welcome! Log In Create A New Profile

Advanced

DC42 Web Interface duet ip config.g

Posted by D9ve 
DC42 Web Interface duet ip config.g
November 24, 2015 11:50AM
Hi,

I wanted to try the web interface, unfortunately I am not very good with networks, I have a static IP for my printer and my laptop is using the the same gateway and submasknet.

I have downloaded the latest version of both the web interface and the firmware.

if the duet is plugged in via usb and the Ethernet is connect, pronterface will display that the network is active and return the ip address, but the duet web control still will not connect, it cannot find the printer!

How does the duet web interface know what the ip of the printer is?
I cannot seem to find a setting for it. I am running the web interface off my laptop, and the same web interface is on the sd card, if that help at all!

If anyone can show me how to set it up or find out for me what I am doing wrong I would appreciate it very much.

Many thanks

David (A 7DOF printer with integrated scanner!)
Re: DC42 Web Interface duet ip config.g
November 24, 2015 12:37PM
If you are running DHCP:

# network settings
network.enable true # enable the ethernet network services
network.webserver.enable true # enable the webserver
network.telnet.enable true # enable the telnet server
network.ip_address auto # use dhcp to get ip address

If you wish to manually configure then make the change in the last line above in red:
#network.ip_address auto # use dhcp to get ip address

Then you need to manually set up the IP address. You can find out your network address by accessing the cmd prompt on your laptop and typing ipconfig /all which will yield the IP address of your computer as well as the ip mask and gateway address. Change the parameters below to reflect the values you see keeping in mind the IP address should be something different from your laptop. This portion of config.g is at the very bottom of the file.

#uncomment the 3 below to manually setup ip address - THIS IS A STATIC IP ADDRESS METHOD
#network.ip_address 192.168.1.25 # the IP address
#network.ip_mask 255.255.255.0 # the ip mask
#network.ip_gateway 192.168.1.1 # the gateway address
#network.mac_override xx.xx.xx.xx.xx.xx # override the mac address, only do this if you have a conflict

change it to:

#uncomment the 3 below to manually setup ip address - THIS IS A STATIC IP ADDRESS METHOD
network.ip_address 192.168.1.25 # the IP address
network.ip_mask 255.255.255.0 # the ip mask
network.ip_gateway 192.168.1.1 # the gateway address
network.mac_override xx.xx.xx.xx.xx.xx # override the mac address, only do this if you have a conflict

The blue indicates the information you need to change to fit into your network.

If you are just connecting directly to the printer and not through a switch then things will change. Also, if you have a cable modem on your network then you can use DHCP. Other wise you'll get an IP address of 169.168.X.x meaning it's assigning a random IP as no DHCP server is available or you haven't properly set the network IP, mask and gateway to match your static IP.
Re: DC42 Web Interface duet ip config.g
November 24, 2015 01:51PM
1. Please check you are using these web interface files: [github.com]

2. Is the Duet connected directly to your router, or is it connected to your laptop which is connected by WiFi to your router? If the latter, have you bridged the network connections on your laptop?

3. What are the IP addresses of the printer, the router, and your laptop?

btw it's not my web interface, it was written by Christian Hammacher.

Edited 1 time(s). Last edit at 11/24/2015 01:52PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: DC42 Web Interface duet ip config.g
November 25, 2015 06:38AM
Hi and thank you both,

[DC42] the title is a bit misleading, I meant for your firmware, I believe I have set the config.g file correctly.

1) yes definitely
2) assumed both are wired into the router
3) I am not allowed to specify such info. but for all intensive purposes

Laptop
ipv4 abc.axy.tw.111
default gateway abc.axy.tw.250
subnet mask 255.255.255.0
dhcp server abc.axy.z.11
there are also two DNS one of them match the DHCP the last digits have changed

Printer
default ip abc.axy.tw.72
gateway abc.axy.tw.250
subnet mask 255.255.255.0

I have used letters instead of numbers... mostly


[ALL] A am on DHCP on an industrial network but have been assigned a static IP and have used this as default IP address as shown above. Using ipconfig /all on my laptop I have obtained and used the same gateway and submasknet, as you suggested. But the Duet web control still cannot connect, does the web control search for the printer on the network, there are a lot of computers on this network.

Both laptop and printer are wired, ie plugged into the Ethernet port in the wall :\


[VIPER] assuming that you are specifying the firmwares config.g file for the print I believe that is set up correctly doing it the static way.Regarding the DHCP auto detect ' the part which you are uncommenting' where do I find this code.

[all] Lastly, when I plug my printing into the socket in the wall while having it connected via USB to a terminal on the PC I get that the network is active and it return the IP address of my printer. Do I need to modify the firmware, recompile, and re upload the binary?


Thanks you guys

David
Re: DC42 Web Interface duet ip config.g
November 25, 2015 07:38AM
David,

When the printer is connected and the USB has reported that the network is running and the IP address, please check that you whether you can ping the IP address of the Duet from the laptop. If that is successful, disconnect the Duet from the network and check that you can no longer ping it.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: DC42 Web Interface duet ip config.g
November 25, 2015 09:19AM
Also... I wonder if the Sys Admin has included the IP address of the printer in the DNS records... just a thought. Sometimes Sys Admins can eliminate MAC's and IP's if they aren't 'trusted'. Perhaps a word with the Sys Admin is in order?
Re: DC42 Web Interface duet ip config.g
December 03, 2015 05:54AM
Hey guys sorry it's been a while,

I haven't had much luck to be honest, I do not get a reply when pinging the printer. The system/ Admin has have given me a static IP and included the MAC address on their DNS.

as mentioned by viper

Where do I find these settings:

# network settings
network.enable true # enable the ethernet network services
network.webserver.enable true # enable the webserver
network.telnet.enable true # enable the telnet server
network.ip_address auto # use dhcp to get ip address

Thank you for the help guys
Re: DC42 Web Interface duet ip config.g
December 03, 2015 08:00AM
The settings look like they're for smoothie, not RRF.
Are you sure you haven't mixed things up?

If you 're indeed running RRF on Duet, these are the settings it needs:

M550 PPrinterName		        	; Machine name and Netbios name (can be anything you like)
M551 Preprap                        ; Machine password (used for FTP)
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
;*** Adjust the IP address and gateway in the following 2 lines to suit your network
M552 P192.168.1.10					; IP address (0 = use DHCP)
M554 P192.168.1.1                ; Gateway
M553 P255.255.255.0                 ; Netmask

Edited 1 time(s). Last edit at 12/03/2015 08:01AM by mandrav.
Re: DC42 Web Interface duet ip config.g
December 04, 2015 08:54AM
Hi Mandrav, DC, Viper

My CONFIG.g file I presume is set correctly, although I may have set-up the gateway and netmask wrong . I have been through every G and M code for DC42 firmware. The mac address has been registered with IS (information services) my admin. Obviously I am not using smoothie!

My printer has been converted to a 7DOF printer, I am soon to start to write the new slicer software. I am under the impression that the web-server is better than pronterface, hence the reason for the attempt to setup the configuration file.


My printer settings:
M550 PPrinterName		        	; Name has been changed... PNewName
M551 Preprap                        ; Password is the same
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address has been changed and verified by IS
M552 P142.168.1.10					; IP address has been assigned and Assigned by IS
M554 P142.168.1.1                ; Gateway --- I took the gateway from my laptop by using IPCONFIG /all 
M553 P255.255.255.0                 ; Netmask  I got this from my laptop by using IPCONFIG/all

My laptop settings:
142.168.1.18		 ; IP address
142.168.1.1                ; Gateway
255.255.255.0             ; Netmask

My Admin (IS) stated that the printer should obtain the gateway and netmask by default, I have even spoken with the corporations networking engineers! Now I don't belive the firmware can automatically detect the gateway and netmask, can it?

Unless there is a setting/protocol I have to uncomment that I haven't found in the firmware?

Are there any setting for the web server that I need to configure?

Lastly, when the USB is connected and it reports back that the network is running, including the IP address. I cannot PING the printer successfully, I get no response, it timed out! Does DC42 fork or even the RRF support DHCP auto detect for all of the settings specifically for the netmask and gateway?

Would this work given I have been assign a static IP, Example:
M552 P0		   ; IP address (0 = use DHCP)
M554 P0              ; Gateway
M553 P0                ; Netmask

Thank you

David

Edited 1 time(s). Last edit at 12/04/2015 08:56AM by D9ve.
Re: DC42 Web Interface duet ip config.g
December 04, 2015 09:44AM
Your config.g settings look OK to me. The firmware can't obtain the gateway and netmask settings unless you set the IP address to all zeros to enable DHCP. But as long as you are on the same subnet (which you are), then it doesn't actually need them.

Try pinging the Duet, then run arp -a on your laptop to see if the Duet is in the ARP table.

To enable DHCP, use M553 P0:0:0:0.

One possible explanation for failure to respond to a ping is that the routing hardware is objecting to the MAC address, perhaps because it has the "locally administered' bit set. Another possibility is that either the cable, the wall socket or the network interface on the Duet is faulty. Is the Ethernet socket on the Duet showing one green and one amber light?



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: DC42 Web Interface duet ip config.g
December 15, 2015 09:21AM
Hi DC,

The printer does not appear in the ARP table!

The port seems okay (steady orange and flashing green LED), the cable certainly works too.

I will try to enable DHCP...

setting all M552,M553,M554 to equal P0.0.0.0 reported back with "Dud IP address: M552 P0:0:0:0", likewise for the rest!

Trying again:
>>> M554 P0.0.0.0
SENDING:M554 P0.0.0.0
>>> M553 P0.0.0.0
SENDING:M553 P0.0.0.0
>>> M552 P0.0.0.0
SENDING:M552 P0.0.0.0
>>> M552
SENDING:M552
Network is enabled, configured IP address: 0.0.0.0, actual IP address: 142.168.1.10, HTTP port: 80
>>> M553
SENDING:M553
Net mask: 0.0.0.0
 ok
>>> M554
SENDING:M554
Gateway: 0.0.0.0
 ok

ping 142.168.1.10, Destination host unreachable!

>>arp -a
not listed!

>>arp -s 142.168.1.10 BE-EF-DE-AD-FE-ED
The ARP entry addition failed: The requested operation requires elevation.
ran as admin

>>arp -s 142.168.1.10 BE-EF-DE-AD-FE-ED
no response,

>>arp -a,
not listed


NOTE: this might be a bug! I typed M502 and the default settings loaded from EEPROM I assume!

SENDING:M502
>>> M553
SENDING:M553
Net mask: 255.255.255.0
 ok
>>> M552
SENDING:M552
Network is enabled, configured IP address: 192.168.1.10, actual IP address: 142.168.1.10, HTTP port: 80

Thank you for your patience and moreover your help.

Regards

David
Re: DC42 Web Interface duet ip config.g
December 15, 2015 09:30AM
Don't set the netmask to 0:0:0:0, try 255:255:0:0. What is the IP address of your laptop?

After changing the network settings in config.g, you need to restart the Duet for them to take effect, because they are only acted on at startup.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login