Welcome! Log In Create A New Profile

Advanced

Ethernet connection problems: possible solution [UPDATED]

Posted by dc42 
Ethernet connection problems: possible solution [UPDATED]
January 03, 2014 03:53PM
I've been looking at the unreliable Ethernet connection. The main problem I found is that after a network error occurs, it doesn't attempt any sort of recovery. As a result, it won't accept a new connection attempt. On the first connection attempt, a network error often occurs (I haven't found out why yet).

The attached firmware file contains a fix that works for me. I can close the browser and re-establish a connection as often as I want.

Note that if you supply an incorrect password, there is no visible response in the browser (I haven't fixed this yet). So be sure to type the password correctly, with the correct capslock state.

[EDIT: I updated the attached file at 2014-01-04 13:10UTC.]

Edited 3 time(s). Last edit at 01/04/2014 08:19AM 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].
Attachments:
open | download - RepRapFirmware.bin (164.7 KB)
Re: Ethernet connection problems: possible solution
January 03, 2014 04:16PM
Hi dc42

Just tried the update, now go for me, getting the following:
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
HTTP request: GET / HTTP/1.1
Network connection error.
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
HTTP request: GET /rr_axes HTTP/1.1
JSON response: {"axes":["220.0","200.0","200.0"]} queued
HTTP request: GET /rr_name HTTP/1.1
JSON response: {"myName":"My RepRap 1"} queued
HTTP request: GET /rr_password?pwd=reprap HTTP/1.1
JSON response: {"password":"right"} queued

Correct password, but stuck on the login page.

Should anything be done with regards to the SD card?
Re: Ethernet connection problems: possible solution
January 03, 2014 04:28PM
I get the pointer mismatch messages too. They are from some existing code that I don't understand yet. After the 'password right' message, you should get the main screen and can click on the Control tab. I am using the SD card files from the Duet branch of the github repository.

Were you already getting the 'password right' messages with the standard firmware?



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: Ethernet connection problems: possible solution
January 03, 2014 04:34PM
Hehe, 22 minutes before your first support message...
Also, I sent you a private message.

Ian
RepRapPro tech support
Re: Ethernet connection problems: possible solution
January 03, 2014 04:44PM
I normally had debug switched off on the standard firmware.
Re: Ethernet connection problems: possible solution
January 03, 2014 05:29PM
Quote
dsred294
I normally had debug switched off on the standard firmware.

But I presume you were not able to connect, otherwise you wouldn't have tried my modified firmware? And by "stuck at login screen", you mean at the password prompt?

Edited 1 time(s). Last edit at 01/03/2014 05:30PM 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: Ethernet connection problems: possible solution
January 03, 2014 06:19PM
I could connect intermittently.And yes I mean the password screen.
Re: Ethernet connection problems: possible solution
January 03, 2014 06:21PM
What happens if you press the Submit button again, or close that browser tab and open another - do you see any further network traffic?



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: Ethernet connection problems: possible solution
January 03, 2014 06:27PM
No, I have to unplug USB and reconnect USB to get any further response.
Both on serial and web page.
(Currently running on USB power only)
I was now able to log in.

Also it does not seem to be reading my network config from the SD card.
Had to place my computer in the 192.168.1.XXX range.

I was able to connect twice (Closing Chrome and opening again), but it failed on the 3rd try.
The arduino serial monitor shows "Network connection error", please see below:

JSON response: {"password":"right"} queued
HTTP request: GET /rr_poll HTTP/1.1
JSON response: {"poll":["I","-273.1","26.8","0.0","0.0","0.0","0.0"]} queued
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
Network::HttpStateReleased() - Pointers don't match!
Network connection error.
HTTP request: GET / HTTP/1.1

Please note the heated bed is currently disconnected, converting to manual leveling.

Edited 1 time(s). Last edit at 01/03/2014 06:36PM by dsred294.
Re: Ethernet connection problems: possible solution
January 03, 2014 06:51PM
If it's not reading network config from SD card, change the SD card for a better one - it's a known problem that I and several others have had. I haven't touched that area of the code, and the firmware I built is working for me, using the address I have configured in config.g.

I have now found that I can still get into the state of the card being stuck at the password screen if I try disconnecting and reconnecting a few times, so it looks like there's some more work to do on the error recovery. Also, I haven't yet got to the bottom of why I nearly always get a network error when I first connect from my admin machine - something to do with timing I think.

Edited 1 time(s). Last edit at 01/03/2014 06:53PM 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: Ethernet connection problems: possible solution
January 03, 2014 07:34PM
I already swapped the card for a working one, shortly after receiving the kit.

When running on the RepRapPro 050 version of the firmware, a few hours ago, it was reading the config

Perhaps I should try an earlier version SD card image, as your firmware seems to be based on 048?

Not sure if that would make difference?
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 08:16AM
I've rebuilt the firmware starting from the 0.50 source, and further amended the error recovery. The pointer mismatch messages are gone and it works reliably for me. This is when using a machine that previously would connect only 1 time in about 30, and if it failed the first time, required a reset of the Duet board before it would give any sort of response to further connection attempts.

After disconnecting the Ethernet cable, I find it occasionally takes a couple of attempts to reconnect again. I can still get it into an unresponsive state if I connect one machine and then try to connect another without disconnecting the first, but I guess that's not too surprising.

See the first post in this thread for the rebuilt firmware.

Edited 3 time(s). Last edit at 01/04/2014 08:18AM 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: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 09:17AM
Hi dc42

Can you post the diffs of what you have done, if you're not happy pushing it to the Github repository? I'm sure it would be really useful to Adrian.

Ian
RepRapPro tech support
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 10:44AM
Hi Ian,

I'd be happy to submit my changes via github (that would be easier than posting diffs). But I'm not comfortable with submitting changes to the code that interacts with the network interface when I know that the network interface code (LWIP library) in the RRP firmware releases is not the same as found here. My changes might be incompatible with your changes to LWIP. It may be that Adrian would find my changes useful, but I'd find his changes to LWIP useful too! I hope you can get this resolved soon.

I was also hoping to get some feedback from other users, as there is little point in making changes that benefit me but nobody else.

Best regards - 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: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 11:10AM
Hi DC42,
Just started following this post as I had put this in the background as I never achieved any network response, BUT....
I am a complete beginner with network settings, everything I have done on Windows has been plug and play, in fact I only just moved to Windows 7 as XP is being abandoned, so even this is new to me!
So can anyone present some step by step IP settings for Win 7 for me?
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 11:14AM
Sure! Please tell us how will you be connecting the printer: direct to your router, or to a computer that is wirelessly connected to your router, or some other way?

Also go to a command shell, run ipconfig, and post the results.



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: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 11:21AM
Tried the new firmware.

This time formatted my SD card and copied the release image from 050 onto it again.

The config is being read now and using the correct ip address.

But I still get stuck after entering the password with "Network connection error" displayed on the Arduino Serial monitor.

And no control web page displayed, if I close the browser and try again without resetting, I get web page could not be found in Chrome.
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 11:23AM
Thanks for trying! I guess the problem you are experiencing is not the same as the one I was.



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: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 12:17PM
@dc42, Many thanks.

Quote
dc42
Sure! Please tell us how will you be connecting the printer: direct to your router, or to a computer that is wirelessly connected to your router, or some other way?
Also go to a command shell, run ipconfig, and post the results.


My laptop is wirelessly connected to the router and the Ormerod will be a direct connection.

The ipconfig returned:

Windows IP Configuration

...

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . : lan
Link-local IPv6 Address . . . . . : fe80::45dc:fdd3:67dd:db47%11
IPv4 Address. . . . . . . . . . . : 192.168.1.66
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254

...

Connection-specific DNS Suffix . :


Edited 1 time(s). Last edit at 01/05/2014 03:00PM by Treth.
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 12:38PM
OK, your laptop IP address is 192.168.1.66 and your gateway (router address) is 192.168.1.254.

First, pick an IP address on the same subnet for the Ormerod, one that is unlikely to be already in use. I suggest 192.168.1.150.

Second, edit config.sys on the sd card to set the IP address of the Ormerod to that, and also set the gateway address to the address of your router.

Third, by "direct connection", do you mean direct to the router, or direct to the laptop? If you mean direct to the laptop, then you need to bridge the wired and wireless network ports on the laptop. To do this, go to Control Panel -> Network and Sharing Centre -> Change Adapter Settings. Highlight the 2 ports (wired and wireless), right-click and select Bridge.

Fourth, open a command shell and enter:

ping 192.168.1.150

(if you chose a different IP address, substitute that). The ping should fail if the Ormerod is not connected, and succeed if the Ormerod is connected and powered on.

Finally, load Chrome and enter the ip address 192.169.1.150 (or whatever) in the address bar. You should briefly get the control page (actually a mixture of all the pages), followed by the login page.

Edited 1 time(s). Last edit at 01/04/2014 12:39PM 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: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 06:27PM
Your modified .bin improves my connection, but it is not a fix

I usually can connect about 1 in 4 resets - Provided I connect ethernet before USB
with your binary the success rate goes up to almost 100%

Still have the problem of Network wont work if connect to USB first

Network still freezes every so often (USB still working printer still happy, just no network)

Interestingly when the network interface is 'broken' can still use the /rr_??
codes and get responses, it's just the main page that breaks



Chris
Re: Ethernet connection problems: possible solution [UPDATED]
January 04, 2014 06:35PM
Hi Chris, thanks for the feedback. I'm glad to hear that the change has helped someone else. That gives me more confidence to submit the changes via github.

I find that following a reset with both Ethernet and USB connected, I can connect to the Duet via the Arduino serial monitor first, and then Ethernet, without difficulty (or vice versa). That's how I debugged the network issue. However, several days ago I found that if I connected Pronterface first, then I couldn't connect via Ethernet without a reset. I haven't tried that again since I patched the firmware, but I'll try it again when the current print finishes.



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: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 07:49AM
On my one it only worked once reset with the network cable plugged into it, if I plug it in after a reset, no go... It otherwise logs in fine and does everything fine via LAN. No issues. If you are working under windows 7, just watch the firewall settings. Had to fiddle with these first. Don't have a cross over cable so I used a spare 8 port switch lying around, PC -> 8 PORT SWITCH -> PRINTER. I will connect it later via my home LAN.

Dieter
Re: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 12:26PM
Quote
dieterzar
On my one it only worked once reset with the network cable plugged into it, if I plug it in after a reset, no go... It otherwise logs in fine and does everything fine via LAN. No issues.

Dieter, is that with the standard firmware, or my modified version?



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: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 03:40PM
DC42, all still standard... at least for now.

Dieter
Re: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 03:51PM
I've just been battling with various the network issues in thread, HTTP Connection Error in the serial output using the Arduino IDE and also the stuck password in Chrome.

Whether it's a one off or not I don't know but I got it to work by going to the URL http://192.168.1.14/reprap.htm

Using the stock 50 firmware.

edit: to show the full URL and not just the IP address

Edited 1 time(s). Last edit at 01/05/2014 04:04PM by picnic.
Re: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 03:56PM
Oh yes, I have not used the Arduino IDE. Only Chrome and IP address and then also used Pronterface to communicate with it. Hitting M503 in Pronterface should give you all the connection details.
Re: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 04:04PM
Hitting M503 in Pronterface (or Arduino serial monitor) gives you the contents of the config.g file, not the current settings. However, unless you have the problem that I and some others had (config.g not getting run because SD card supplied was too slow), then unless you have manually changed the settings since config.g was run, those should be the settings that the Duet is using.

Edited 3 time(s). Last edit at 01/05/2014 04:06PM 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: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 04:05PM
I don't see why you couldn't use either program to monitor the serial debug, I was faithfully following the Axis Compensation instructions winking smiley
Re: Ethernet connection problems: possible solution [UPDATED]
January 05, 2014 04:07PM
Quote
dc42
Hitting M503 in Pronterface (or Arduino serial monitor) gives you the contents of the config.g file, not the current settings. However, unless you have the problem that I and some others had (config.g not getting run because SD card supplied was too slow), then unless you have manually changed the settings since config.g was run. those should be the connection details that the Ormerod is using.

I'd spent 2 hours battling the SD Card problem one before hitting my Ethernet connection issues sad smiley
Sorry, only registered users may post in this forum.

Click here to login