-
-
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
-
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.
-
Gordon, I am so sorry to add to the pressure :( I wish I knew enough/was smart enough to actually help fix the problem, but I'm afraid my Rocket Scientist days are long gone ! The CC3000 is better now, but still crashy. It may be that a firmware upgrade would help, but the process is hideous and I have not attempted it. Perhaps I'll just have a few strong coffees and go for it !
-
-
-
-
I still cannot get DHCP to behave .. this code
E.enableWatchdog(10); var eth = require("WIZnet").connect(); eth.setIP({ ip : "192.168.254.248", dns : "208.67.222.222", gateway: "192.168.254.100" }); var http = require("http"); http.get("http://www.espruino.com", function(res) { res.on('data', function(data) { console.log(data); }); });
Works up to a point. If I execute the get 6 times (one after another) .. manually .. so I wait for the get to complete .. they all work and pull the html back correctly.
The 7th time (always) I get "ERROR: No Free Sockets Found" and about 5 seconds later, the Espruino COM port disconnects from the PC. Have to reboot. I sometimes see a huge number of SPI TimeOut on TX messages before the COM port dies, but most often not.
-
-
-
-
-
-
Hi, yes saw the BLE link on the site. The device is visible in LightBlue and BLExplr :) It's the first in the list ...
So that's a start. Where next ? I feel a bit like Alice in the Rabbit-Hole !
(The original idea was to see if I could simply talk to the Espruino from the iPhone (e.g. just enter 1+2 and get =3 back!). Modest !
-
Hi, I have the HM-10 successfully talking to Espruino. I used a shield from http://imall.iteadstudio.com/im130704001.html and with just Power, RX and TX it behaves perfectly well.
Part of my motivation was to attempt to make my iPhone talk to the Espruino, but so far no go. The iPhone cannot see the HM-10 at all.
Anybody had any luck with this ?
Pat
-
Hi, is the server thing likely to be me doing something wrong? Ditto DHCP .. or is it possible there are some bugs lurking. On the Socket error -7 front, it is only apparent if I execute the whole script again. If I just run the http.get onwards it will work a number of times and eventually give up with an ERROR: No free sockets found, at which point my COM port disconnects, I get the disconnect warble from my PC. Have to Reset or Power Off/On at that point.
Perplexed.
-
-
This code ..
E.enableWatchdog(10); var eth = require("WIZnet").connect(); eth.setIP({ ip : "192.168.254.248", dns : "208.67.222.222", gateway: "192.168.254.100" }); var http = require("http"); http.get("http://www.espruino.com", function(res) { res.on('data', function(data) { console.log(data); }); });
works once and the console fills up with the HTML returned. If you try to run again, you get
reset();
=undefined
....
1v61 Copyright 2014 G.Williams
echo(0);
=undefined
ERROR: Socket error -7 while sendingSo sort of heading in the right direction. Totally mystified by the DHCP behaviour really. Can't persuade the server code to work at all.
-
Oh dear. All sorts of oddities ...
On a high proportion of occasions now when I issue eth.setIP() I see a single DHCP_DISCOVER message, and then a few seconds later the USB connection to the Espruino drops (COM port gone, warble from computer). Tried on a couple of different boards. Repeatable. Strange ! Began to suspect USB cable, but happens on several different ones.
On some (rare) occasions I get a successful DHCP round trip
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v61 Copyright 2014 G.Williams >echo(0); =undefined >eth.setIP() > Send DHCP_DISCOVER > Receive DHCP_OFFER > Send DHCP_Request > Receive DHCP_ACK =true >eth.getIP() ={ "ip":"192.168.254.194", "subnet":"255.255.255.0", "gateway":"192.168.254.100", "dns":"208.67.222.222", "mac":"000000000101" } >
but a strange mac address (ending 01:01)
In fact, I have wireshark running to monitor what I think is the correct mac address (00:08:dc:1d:4c:33) and there is no DHCP to be seen. Is it all happening on that 01:01 address ??
Stuck again. Any ideas?
-
Sorry, and to follow up, any ideas why this code does not work ? It's the CC3000 code transplanted (which does work when the CC3000 is behaving). The .248 address is pingable, but port 80 is not there (I did a port scan). No errors reported ..
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);
-
Have given up on the CC3000 for now, just cannot get it to behave nicely for a decent extended period. Received a WIZ550io today and am running against the 1.61 Wiznet build.
Basically working, but I cannot get eth.setIP() to DHCP nicely ..
I see ..>eth.setIP() > Send DHCP_DISCOVER > Send DHCP_DISCOVER > Send DHCP_DISCOVER > Send DHCP_DISCOVER > => DHCP Timeout occurred WARNING: DHCP failed =false >
After this, I see ..
>eth.getIP() ={ "ip":"0.0.0.0", "subnet":"0.0.0.0", "gateway":"0.0.0.0", "dns":"0.0.0.0", "mac":"000000000000" } >
I am 100% sure my DHCP is working, so am a bit lost. Resetting the board and executing the following code works fine ..
var eth = require("WIZnet").connect(); eth.setIP({ ip : "192.168.254.148" }); eth.setIP({ dns : "208.67.222.222" }); eth.setIP({ gateway: "192.168.254.100" });
and I then see
>eth.getIP() ={ "ip":"192.168.254.148", "subnet":"255.255.255.0", "gateway":"192.168.254.100", "dns":"208.67.222.222", "mac":"0008dc1d4c33" } >
So my question is, where could the problem be ?
ARP -A on my (sorry, um, Windows) PC shows ..
192.168.254.148 00-08-dc-1d-4c-33 dynamic
So that mac address is being seen, but those DHCP_DISCOVER requests are not working for reasons I don't follow yet.
TIA!
-
-
-
It died after a bit, actually. Will play a bit more !
Still pingable, though.