wiz550io: ERROR: Socket error -7 while sending

Posted on
  • This is a bit of an essay but my help others!!

    I was getting on great with my wiz550io until I encountered this error today. From browsing the forum it seems like others have also had this but there is no definite reason/solution.

    For me it occurs when calling http.get() - there is no response for about 30 seconds then the dreaded "Socket error -7 while sending" is thrown. Once the error occurs it is really difficult to clear. A soft reset, hard reset and even power off/on has no effect - all future http.gets() respond in this way. (I even tried rebooting my PC!!)

    In complete frustration I restarted my broadband router (BT Home Hub 5); the error was cleared and everything worked fine for a while only to re-occur about an hour later. Again a reboot of my router was the only way to clear it.

    Through further investigation I identified that the error only occurs after a hard reset of Espruino (or power off/on) - not every time but after 2 or 3 resets.

    It also appears that the error is cleared if the wiznet device is disconnected from the network for about 10 minutes (or Espruino left powered off). It does not clear if left connected/powered.

    I can also clear the error by using the BT Home Hub manager (http://bthomehub.home/) to disconnect then re-connect to the internet which is much faster than a restart.

    All this makes me think that the issue may be with the wiznet device, not Espruino.

    I am unsure if what I described is how others are getting this error - is it?

    I think getting good robust internet connectivity is vital for espruino - after all we are talking the "Internet of Things"!

    Now that I know what causes the error & how to resolve it if it happens I should be able to make some progress.

  • Some additional info - the log on my router has numerous errors from this morning when I was having issues:

    09:15:51, 30 Nov. OUT: BLOCK [65] First packet is Invalid (TCP 192.168.1.65:50027-?>74.125.195.95:443 on ppp3)
    09:15:39, 30 Nov. BLOCKED 1 more packets (because of First packet is Invalid)
    09:15:39, 30 Nov. OUT: BLOCK [65] First packet is Invalid (TCP 192.168.1.65:50024-?>74.125.230.230:443 on ppp3)
    09:15:38, 30 Nov. ( 1938.530000) Lease for IP 192.168.1.70 renewed by host WIZ550IO (MAC 00:08:dc:1e:00:2f). Lease duration: 1440 min
    09:15:38, 30 Nov. ( 1938.530000) Device connected: Hostname: WIZ550IO IP: 192.168.1.70 MAC: 00:08:dc:1e:00:2f Lease time: 1440 min. Link rate: 100.0 Mbps
    09:15:38, 30 Nov. ( 1938.460000) Lease requested
    09:15:38, 30 Nov. ( 1938.380000) Wire Lan Port 2 up
    09:15:32, 30 Nov. ( 1932.080000) Device disconnected: Hostname: WIZ550IO IP: 192.168.1.70 MAC: 00:08:dc:1e:00:2f
    09:15:32, 30 Nov. ( 1932.080000) Wire Lan Port 2 down

  • Hi DaveNI! I was curious about the BT Home Hub manager, but I failed on your link...

  • BT Home Hub is a line of Routers. That URL he listed is the router management page (only accessible from within the network).

  • gotcha! Thanks :)

  • It does sound strange - has anyone else has this?

    And if you just disconnect Espruino+WIZnet from a power source and unplug from the network, then plug it back in after just 10 seconds, do you still have the problem or is it fixed until the next time?

    I actually develop on a network with the Home Hub 5, so I'm surprised I haven't hit this. Do you think you could narrow it down to a small program that makes this happen, and then post it up so we can test here?

    It's possible that something is being done (many GET requests happening at once) that confuses Espruino/WIZnet.

  • I'll try that when I get home tonight. Its actually running really well so long as I'm careful about powering off. I've a small http server app which has been running all night without issue.

  • @Gordon I have been away with work for most of the week so didn't get a chance to fully test the problems described above. The wiznet device & Espruino seem to be working perfectly so long as I don't reset too frequently.

    I left my central heating httpserver application running all week and it was still running when I got home.

    I have added a new post to the Projects folder and there is a link in that post to a web application currently communicating with Espruino using a Rest interface in real time.

    Hopefully I can get more done over the weekend.

    EDIT: Hope @Gordon doesn't mind me using his header background image - I'm not the best at web design!

  • @DaveNI - glad it's working! It is possible that multiple resets could have confused the WIZnet chip I guess. As it doesn't have a reset line, if it were to get upset it'd have to be properly unplugged from power for it to start working again.

    The heating controller looks amazing - will post there in a bit. No worries about using the logo image at all!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

wiz550io: ERROR: Socket error -7 while sending

Posted by Avatar for DaveNI @DaveNI

Actions