Hi to all!
I've posted this thread on another section some weeks ago but I'm still blocked. Hope someone can help me, I cannot figure out how to proceed
I'm having again problems with RF24Network library
I'm trying to create an arduino Network based on the library RF24Network developed by maniacbug and descrived here: RF24Network for Wireless Sensor Networking | maniacbug
I'm starting using the 'meshping.pde' example: http://maniacbug.github.com/RF24Network/meshping_8pde-example.html
I was able to setup the hardware correctly and so send and receive messages. I've then introduced a DHT11 sensor. My goal is to create a meshed network, but messages should not flow only from external leafes to node00, but also node00 should be able to send messages out to leafes, this to have interaction with external leafes, but doing so I noticed a strange behaviour.
Sending a char array sometimes the radioMessage received is overwritten by anothe rmessage. I cannot understood if it's an issue on the program or the library doesn't allow a Node00 to Nodexx comunication. This is the meshping example modified:
----->>>>>>> See attached file 'meshping_mod.txt'
The code should generate on every cycle a random char array formed by:
[node_number];0;1;[DHT11_humidity];[DHT11_temperature];0;0;0;10;50
OR
[node_number];0;1;[DHT11_humidity];[DHT11_temperature];0;0;0;0;4;
The last 5 values separated by commas are random added one or the other.
Now, loading this on two nodes, Address '0' and address '5' the output from the serial ports are follow:
Node0:
RF24Network/examples/meshping/
VERSION: Unknown
ADDRESS: 0
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0f03c 0xf0f0f0f05a
RX_ADDR_P2-5 = 0x69 0x96 0xa5 0xc3
TX_ADDR = 0xf0f0f0a53c
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x3f
RF_CH = 0x64
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH
||NO RADIO||
||NO RADIO||
[1095] >> APP Received '5;0;1;5500;2000;0;0;0;0;;50;' from 05 <--------
1096: APP Added 05 to list of active nodes.
||!! RADIO|
||NO RADIO||
||NO RADIO||
---------------------------------
2110: APP Sending active nodes to 05...
----------
[2614] >> APP Sending 0;0;1;5000;1900;0;0;0;0;4; to 05...
----------
2618: APP Send ok
||NO RADIO||
||NO RADIO||
||NO RADIO||
----------
[4145] >> APP Sending 0;0;1;5000;1900;0;0;0;10;50; to 00...
----------
4148: APP Send ok
[4152] >> APP Received '0;0;1;5000;1900;0;0;0;10;50;' from 00 <--------
||!! RADIO|
||NO RADIO||
||NO RADIO||
[5191] >> APP Received '5;0;1;5500;2000;0;0;0;0;4;' from 05 <--------
||!! RADIO|
||NO RADIO||
||NO RADIO||
---------------------------------
6199: APP Sending active nodes to 05...
----------
[6702] >> APP Sending 0;0;1;5000;1900;0;0;0;0;4; to 05...
----------
6707: APP Send ok
||NO RADIO||
[7232] >> APP Received '5;0;1;5500;2000;0;0;0;0;;50;' from 05 <--------
||!! RADIO|
||NO RADIO||
||NO RADIO||
Node5:
RF24Network/examples/meshping/
VERSION: Unknown
ADDRESS: 5
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xf0f0f0a53c 0xf0f0f0a55a
RX_ADDR_P2-5 = 0x69 0x96 0xa5 0xc3
TX_ADDR = 0xf0f0f0f0c3
RX_PW_P0-6 = 0x20 0x20 0x20 0x20 0x20 0x20
EN_AA = 0x3f
EN_RXADDR = 0x3f
RF_CH = 0x64
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH
||NO RADIO||
||NO RADIO||
||NO RADIO||
||NO RADIO||
----------
[2096] >> APP Sending 5;0;1;4900;2400;0;0;0;0;4; to 00...
----------
2101: APP Send ok
||NO RADIO||
||NO RADIO||
||NO RADIO||
3628: APP Received nodes from 00
3628: APP Added 05 to list of active nodes.
||!! RADIO|
||NO RADIO||
----------
[4134] >> APP Sending 5;0;1;4900;2400;0;0;0;10;50; to 05...
----------
4139: APP Send ok
[4142] >> APP Received '0;0;1;4800;2100;0;0;0;0;;50;' from 00 <--------
4154: APP Added 00 to list of active nodes.
[4162] >> APP Received '5;0;1;4900;2400;0;0;0;10;50;' from 05 <--------
||!! RADIO|
||NO RADIO||
||NO RADIO||
||NO RADIO||
||NO RADIO||
----------
[6202] >> APP Sending 5;0;1;4900;2400;0;0;0;0;4; to 00...
----------
6207: APP Send ok
||NO RADIO||
||NO RADIO||
||NO RADIO||
7734: APP Received nodes from 00
||!! RADIO|
||NO RADIO||
----------
[8236] >> APP Sending 5;0;1;4900;2400;0;0;0;0;4; to 00...
----------
8240: APP Send ok
||NO RADIO||
||NO RADIO||
||NO RADIO||
||NO RADIO||
----------
[10267] >> APP Sending 5;0;1;4900;2400;0;0;0;10;50; to 05...
Well, you can notice often the radiomessage seems overwritten by the previous(?) message, in example:
[4142] >> APP Received '0;0;1;4800;2100;0;0;0;0;;50;' from 00
[7232] >> APP Received '5;0;1;5500;2000;0;0;0;0;;50;' from 05
Seems the double ';;' are the radiomessage '5;0;1;4900;2400;0;0;0;10;50;' overwritten by '5;0;1;4900;2400;0;0;0;0;4;' resulting in:
'0;0;1;4800;2100;0;0;0;0;;50;'
I'm not sure. The sent message, printing 'radiomessage' before sending it out, seems always correct, also I think the issue is on incoming traffic.
Could someone help me?
Thank's a lot!
Simon
meshping_mod.txt (7.65 KB)