Hello,
I have been working this problem for two days and still cannot determine how to connect emontx to nanode via RMF12 wireless. Could anyone here point me to how I can connect those device?
I have uploaded the sketch to emontx.. but it just stucks when executing the command rfwrite();
It shows on the serial monitor (in emontx):
Node: 10 Freq: 433MHz Network:212
and then just stop. Does that mean my RMF12B is error ? or does the nanode need to be connected first in order for the emontx to be able to send the data?
And also is it possible to post the reading value in nanode as a webserver? Because I see from the sketch example it only post to pachube and emoncms.
Thanks very much for the help and I apologize if this seems to be a very newbie question.
kind regards,
John
Re: How to connect emontx to nanode5 using rmf12
The emonTx stops printing because serial has been disabled, it improves long term stability. To re enable it change #define serial 0 to #define serial 1 on about the 6th line down from the top.
For the wireless to work both the emonTx and Nanode need to be on the same network group and have the same frequenct. The ayload structure as defined near the beginning of the sketch must also be identical in both the emonTx and NanodeRF sketch. We have recently added a new NanodeRF example using the new EtherCard Ethernet library. It's up on github.
To test the wireless in isolation (without energy monitoring and Ethernet code getting i the way) try this sketch: https://github.com/openenergymonitor/RFM12B_Simple
For more information about the RFM12B see: http://openenergymonitor.org/emon/node/271
Good luck,
Re: How to connect emontx to nanode5 using rmf12
Hi Glyn,
Thanks for the info. I have enabled the serial 1 at the top of the sketch . But soon after the rfwrite(); commend the serial monitor just stops printing the result.
If I comment out the rfwrite() the sketch works just fine.
The right image is when I comment out the rfwrite(); inside the void loop(){}
I also notice there are two cmmands one is commented out in the rfwrite method:
rf12_sendStart(0, &emontx, sizeof emontx);
//rf12_sendStart(rf12_hdr, &emontx, sizeof emontx, RADIO_SYNC_MODE); - use instead of line above if emonTx node ID is required in header. For multiple emonTx's to a single emonBase
what's the difference between those two ?
Thanks again.
kind regards,
John
Re: How to connect emontx to nanode5 using rmf12
Mmm, thats strange. The line rfwrite(); is needed, thats the function that actually transmitts the data. Try reducing the ammout of stuff you are serial printing, try printing a single integer to start with. What emonTx firmware example are you using? Try the single CT examaple to start with.
The lines rf12_sendStart(0, &emontx, sizeof emontx); and //rf12_sendStart(rf12_hdr, &emontx, sizeof emontx, RADIO_SYNC_MODE); are the lines which actually transmittt the data. Only one line should be used at a time. The second line includes the emonTx's node ID in the transmission. This is needed to distinguish transmission packets if multiple emonTx's are on the same network. But it does slightly increase the size of the packets and therefore the ammount of power needed. Often the emonTx is powered by batteries and therefore any little power saving trick is helpfull .
Re: How to connect emontx to nanode5 using rmf12
Hi Glyn,
It turns out that two of the corner pin in RMF12 is not soldered properly.. my mistakes... now everything is working.. It can transmit data and received by the nanode..
Thanks very much !
cheers,
John