I've just built a NanodeRF 433. Tested all power points during build. Added "brown out" capacitor fix. have successfully run the guide sketches using static IPs. I've modified DHCP.cpp to increase the timeout to 60sec. I've tried changing the MAC address. I've checked the pin 27 voltage @ 3.304 volts. I've downloaded the newest firmware and sketch files.
1) DHCP does not work with any of the Guide Sketches. (DHCP works fine on Arduino Ethernet board, so I don't think it's my router - please advise)
2) NanodeRF_multinode does not work with Static IP as shown in this thread. A modified version of Guide 05-Basic Multinode Web Client using static IP is working posting to my emoncms account. (but not relaying the time to emonglcd)
The Ethercard testDHCP sketch shows:
[testDHCP] MAC: 74:69:69:2D:30:31 Setting up DHCP DHCP failed My IP: 0.0.0.0 Netmask: 255.255.255.0 GW IP: 192.168.0.2 DNS IP: 192.168.0.2
Any Ideas of what I should test next?
Thanks, Pat
Re: RESOLVED - Emonbase NanodeRF DHCP issues
This looks to be the same problem as I'm experiencing http://openenergymonitor.org/emon/node/1079
Problem with the ethercard library perhaps?
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Looks like this is an issue with the Ethercard library
https://github.com/jcw/ethercard/issues/45
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Does anyone have DHCP working on the NanodeRF that openenergymonitor sells?
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Assuming that Ethercard is the issue, might it be prudent to fork the library (and any others emon uses) when it next becomes stable?
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Hi guys,
Very sorry about this, it seems to me that some latest EtherCard updates might have broken DHCP. Last time I used it a few weeks ago it worked fine for me. Yes, us forking the library to the openenergymonitor git hub would be a good idea. At least then we would be in control of pushing out updates (and testing them first!).
I'm currently on a train, when I get home tonight/tomorrow morning I will do some testing. For the time being I have attached the version of EtherCard I currently have on my laptop, I think it worked fine with DHCP. Does this work for you?
Sorry again, and best of luck.
Glyn.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Update: It has come to my attention that the problem might be due to a few Nanodes accidently being shipped with the Duemilanove bootloader. Does this apply to any of you guys? Can you upload the the Nanode when you select Uno under tools>boards in the Arduino IDE? If you can only upload when Duemilanove is selected then this might be the cause of the problem.
The Duemilanove, bootloader will cause issues since the reset watchdog won't work. You can try commenting out #define uno to disable the reset watchdog. You can put the uno bootloader on yourself using another arduino: http://arduino.cc/en/Tutorial/ArduinoISP. If you're not happy or able to do this please get in touch via the shop and we'll send you an an Atmega with the Uno bootloader.
Sorry again, all the best,
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Thanks a lot for the attention. I'll try the new ethercard library. I am using the UNO menu option for uploading to the device.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
It's the Uno bootloader in my board.
I've tried with the ethercard library you attached, still no joy with dhcp.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Just tested again here with the latest ethercard library and UNO and dhcp worked fine:
I get an output like this in the serial window:
[webClient]
DHCP status: 1
IP: 192.168.2.3
GW: 192.168.2.1
DNS: 8.8.8.8
DNS status: 1
SRV: 213.138.101.177
Data sent: /api/post.json?apikey=461008d1a226629f5daf81cf4903ac16&json={rf_fail:1}
Time request sent
Time: t10,17,12
Data sent: /api/post.json?apikey=461008d1a226629f5daf81cf4903ac16&json={rf_fail:1}
OK recieved
Not sure what's causing the issue, Might be worth trying a different MAC address, do you get any positive results with any of the ethercard examples?
Re: RESOLVED - Emonbase NanodeRF DHCP issues
OK, I've tested again using the copy of ethercard you attached the other day and with a fresh copy downloaded from github.
With a recent copy of NanodeRF_Power_RTCrelay_GLCDtemp (last couple of weeks) I get :
[testDHCP]
MAC: 74:69:69:2D:30:31
Setting up DHCP
DHCP failed
My IP: 0.0.0.0
Netmask: 0.0.0.0
GW IP: 0.0.0.0
DNS IP: 0.0.0.0
Using the ethercard testDHCP sketch, I get pretty much the same result, no dhcp, no IP address.
Tried a few different MAC addresses, resetting router, swapping switches, connecting direct to router. Even tried another router the other day.
Roll back a few months (early april) with NanodeRF_Power_RTCrelay_GLCDtemp and ethercard, testDHCP and the nanode sketch both have DHCP working and reciece IP addresses almost instantly.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
If your having issues with DHCP please could note the make and model of your router. I have heard of issues with older BT home hubs. I have a BT home hub 3 and it works fine.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
I'm using a Netgear N150 DGN1000 router. I tested out on a spare Netgear god-knows-what with the same results.
I'm going to have a root around in my spares box, I'm sure I've got a Thompson router to try out on.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
I just grabbed the freshly updated jcw/ethercard library from github.
I built the latest NanodeRF_Power_RTCrelay_GLCDtemp. I had to remove the call to ether.dhcpValid() in dhcp_dns.ino to get it to build. I then loaded it on my NanodeRF (purchased and built in the past couple weeks), and now it resolves the reference to "emoncms.org" for the first time for me, and I am logging data from my emonTx build.
I suspect some of the logic in dhcp_dns() and maybe NanodeRF_Power_RTCrelay_GLCDtemp should be updated, and I haven't attempted that.
Thanks much to those who have been working on this (Victor and Chris, I believe, and maybe others.)
-Ed
Re: RESOLVED - Emonbase NanodeRF DHCP issues
ether.dhcpValid() is included in the new EtherCard library (version -0c4c1a6 dated 7/10/2012), I believe.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
As of two days ago the EtherCard DHCP API has changed slightly, I've updated our Nanode RF examples today to reflect this.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
I've been asked to try the Ethercard library from https://github.com/vicatcu/ethercard
Compiling the latest Nanode sketch with this library, my nanode now gets an IP address, Yay!
However, I have a solid red light on the nanode, and I aren't seeing any inputs updating on enoncms.org. Arrgh!
I'll have another look tomorrow night, see if I've done something wrong in the sketch. All I've done is added my API key, not sure what else it could be.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
I've just uploaded the new nanode sketch with new jcw.ethernet and I also have an IP address but the red LED is on continuous (except after 10 fails when it resets).
I see in the Serial Monitor that it is trying to send the value's, but it's not getting to emoncms.
Dennis
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Hi guys, sorry about this. I've been in contact with Victor to try and resolve the current issue with the EtherCard library. In the meantime I could try and older EtherCard attached to one of my post's above: http://openenergymonitor.org/emon/node/1112#comment-6570.
I'll post here when the issue has been resolved.
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Could you try commenting out the line:
if (!ether.dhcpSetup()) dhcp_status = 0;
line 10 of the dhcp_dns tab
Re: RESOLVED - Emonbase NanodeRF DHCP issues
Commenting out that line has sorted it and it's updating emoncms again.
Thanks very much
Dennis
Re: RESOLVED - Emonbase NanodeRF DHCP issues
excellent, thats good to hear
Re: RESOLVED - Emonbase NanodeRF DHCP issues
That's working for me too.