WIZnet WIZ550io

Posted on
Page
of 5
Prev
/ 5
Last Next
  • I've got a clone of the Arduino board they mentioned in that scary CC3000 upgrade thread in the mail for the purpose of trying to update the firmware on the CC3000. I'll report back when I get it and have done so.

  • Interesting thing today. DHCP has worked a few times (Not aware of changing anything) , but there is a mystery .. I get back

    >var eth = require("WIZnet").connect();
    ={}
    >eth.setIP()
    > Send DHCP_DISCOVER
    > Receive DHCP_OFFER
    > Send DHCP_Request
    > Receive DHCP_ACK
    =true
    >eth.getIP()
    ={
          "ip":"192.168.254.144",
          "subnet":"255.255.255.0",
          "gateway":"192.168.254.100",
          "dns":"208.67.222.222",
          "mac":"020809ee0008"
        }
    > 
    

    The mac address is the mystery .. the WizNet board is actually 00-08-dc-1d-4c-33 (or at least that is what is printed on the sticker on the board).

    The 02-08-09-ee-00-08 address does actually show up in the ARP table on my PC against 192.168.254.144.

    However if I do set the IP/DNS/Gateway explicitly, I get the address on the sticker.

    Any idea where 02-08-09-ee-00-08 is coming from ?

    Thanks.

  • A bit more. The server also popped into life, but I could never connect to it. Repeated port scans showed port 80 coming and going, but eventually just going away. I am wondering if there is a timing/signaling problem now ? I do see the following from time to time ... (truncated, there are a lot of the SPI errors)

    INTERNAL ERROR: Timeout on SPI RX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI RX
    >reset();
    =undefined
     _____                 _ 
    |   __|___ ___ ___ _ _|_|___ ___ 
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v61 Copyright 2014 G.Williams
    >echo(0);
    ERROR: Socket error -7 while sending
    
  • It's possible that Espruino isn't getting the original MAC address before setting it (and that the new MAC address is just whatever was in Espruino's memory at that time). When I get time to start looking at it again after next week I'll try and sort that out.

  • I follow the tessel blog. There you can read that they are working on:

    'Improving Wireless communications'

    It could be that tessel has also some difficulties with the C3300.

    Best regards

    Sacha

  • Guys

    I've been playing with Wiznet, and I get the same problems - if I try HTTP transactions more frequently than every 30s, I get "socket error -7"

    However, for the record, I've also seen other errors including - "no free sockets" and "SPI communications error"

    Gordon - if you do some work on this, I'm very happy to test it

    Martin

  • Well, something magical has happen on 1.63 Wiznet .. this code now works perfectly ! I can switch the onboard leds on and off from a little web page !

    E.enableWatchdog(10);
    
    var eth = require("WIZnet").connect();
    eth.setIP({ ip : "192.168.254.248" });
    eth.setIP({ dns : "208.67.222.222" });
    eth.setIP({ gateway: "192.168.254.100" });
    
    
    function onPageRequest(req, res) {
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.write('<html><body>');
      res.write('<p>Button is '+(BTN.read()?'on':'off')+'</p>');
      res.write('<p>Turn LED1 <a href="/on1">on</a> or <a href="/off1">off</a></p>');
      res.write('<p>Turn LED2 <a href="/on2">on</a> or <a href="/off2">off</a></p>');
      res.write('<p>Turn LED3 <a href="/on3">on</a> or <a href="/off3">off</a></p>');
      res.end('</body></html>');
      if (req.url=="/on1") digitalWrite(LED1, 1);
      if (req.url=="/off1") digitalWrite(LED1, 0);
      if (req.url=="/on2") digitalWrite(LED2, 1);
      if (req.url=="/off2") digitalWrite(LED2, 0);
      if (req.url=="/on3") digitalWrite(LED3, 1);
      if (req.url=="/off3") digitalWrite(LED3, 0);
    }
    
    require("http").createServer(onPageRequest).listen(80);
    
    
    
  • Not for me :(

    But your example is different to mine - you're creating one server socket and responding to events. I'm creating multiple sockets, and the problem is that they never get closed.

    I'd expect your case to work, I think.

  • Well, this is a big step forward for me .. I could not get it to work at all before !

    BTW user6988 is really me. I logged in wrongly !

    Can you share your code and let me have a go ?

  • Hi @pat

    I've been discussing separately with @Gordon - we can see that something isn't closing sockets. @Gordon believes this is a bug in Wiznet's code, and he's asked them to check it out - I suspect it's more on the Espruino side. I've been studing the network code over the weekend, and I have some theories, but I'm generally very busy.

    My current experience is that it doesn't let go of sockets even if I give it a couple of minutes. @Gordon has suggested this may depend on the server I'm talking to

    My code is a bit long and cluttered with other stuff. I'll try to get a smaller test program to show the problem more specifically and upload that soon. @Gordon has also suggested a few other things to try.

    Thanks :)

  • So just to clear up: For the 1v62 release I did some work on WIZnet - specifically improving the HTTP server stability and making sure that using setIP didn't mess up the Mac address - hopefully this will have really helped @Pat's problems.

    There's still:

    • HTTP GET with DNS (eg, not to an IP) seems to be unreliable
    • HTTP GET doesn't seem to free sockets properly
    • HTTP server can get swamped and will stop working if you spam it with loads of requests at once

    WIZnet have offered to look into those so I'm just waiting for their response.

    I'm not saying this is a WIZnet chip issue or a problem with their code. I'm sending 'closesocket' requests to the WIZnet chip and the socket state isn't changing to 'closed'. It's probably unread data or something and I fully expect WIZnet to know what the problem is within a few minutes - so as being as they offered the help, I'm taking them up on it :)

  • @Gordon

    Sorry if I misrepresented you - I was trying to save you typing time, but it clearly didn't work :(

    If Wiznet get there first, great - if not, I'll make a test program to explore the repeated POST issue in more detail.

    Martin

  • Thanks! Sorry - just didn't want to sound like WIZnet was at fault here - it's definitely something Espruino is doing :)

  • Ah - I guess I assumed it was their issue because they were looking at it - my misake!

  • It died after a bit, actually. Will play a bit more !

    [Fiddler] The socket connection to 192.168.254.248 failed. 
    ErrorCode: 10061. 
    No connection could be made because the target machine actively refused it 192.168.254.248:80
    

    Still pingable, though.

  • Hmm - were you reading really often? I set it up serving a webpage with meta refresh, and it seemed to be ok...

  • No, quite the opposite. I have rebooted and am giving it another shot. Kept pinging all the time with no issues. The issue seems to be repeatable to some degree - quick refreshes and clicks on the various links will eventually provoke the error, but I cannot see any pattern to it so far :(

  • Well, definitely repeatable .. no real pattern to it that I can see, but after some amount of time that error is provoked. An eth.setIP() fixes it.

  • Thanks - that's very interesting. So you don't have to do anything to the HTTP server - you just setIP and it springs in to life again?

  • Yes, have tried this several times. Just doing the setIP revives it !

  • And poof, suddenly it does not any more !

  • Attempting to re-load all of the code gave ...

    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI RX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI RX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI RX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI TX
    INTERNAL ERROR: Timeout on SPI RX
    >reset();
    =undefined
     _____                 _ 
    |   __|___ ___ ___ _ _|_|___ ___ 
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v63 Copyright 2014 G.Williams
    >echo(0);
    
  • I have also had some success with the http server, but I am definitely having the DNS issue as described by @Gordon above.

    Additionally, it is still not always properly reading the WIZnet MAC address for me... the last two sets of HEX digits are sometimes wrong such as right now where it reads 00:08:dc:1d:a2:ff but it is actually marked 00:08:dc:1d:4f:44.

    If I completely disconnect both the USB power cable and the network jack and then plug everything back in, it will generally start off by reading it properly.

  • Yeah .. well, we're definitely heading in the right direction. Wrinkles remain. The goal of rock solid Ethernet support remains. Would love to think that the CC3000 would behave at some point, but WIZnet seems a more achievable goal in the short term.

    I'll have a play today with various things that I could not get to work before. For example, I could never get DHCP to work at all previously. And I would get totally random MAC addresses !

  • @Pat - yes, DHCP is definitely something that should be fixed now :)

    Yes, hopefully this will get sorted soon. I added some extra checks for the 4101 case in CC3000, but haven't yet managed to trap a proper crash to I'm not sure if that fixes it or not.

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

WIZnet WIZ550io

Posted by Avatar for Pat @Pat

Actions