 |
| Author |
Message |
|
|
Posted: May 19, 2012 - 06:38 PM |
|

Joined: Apr 10, 2012
Posts: 2
|
|
Hello,
I'm working currently on my University project with ZigBit Amp modules and BitCloud. The network I need to realize is made up from C and 7 R which connect directly to C. The goal is to collect RSSI data between every node in the network, I made this with broadcast data sending to minimize the packet exchange.
In a APS_BCIndication callback function i read the RSSI data on every node, and store it in an array.
The problem is on a C which don't give me correct values of the array when I send it over USART to PC. The same principle is used also on R nodes and everything works fine, and I become correct data.
I used a debugger to see where the problem is. The data is correctly written in the array in the BC callback function, but in the next iteration when I call the next R to broadcast a message, everything is still fine until the APS_DataConf is called, then the data weirdly changes.
I could not find what is the reason for this, I hope I gave a good explanation of my problem, and someone can help me.
I put the code of C maybe helps.
Thanks. |
|
|
| |
|
|
|
|
|
Posted: May 20, 2012 - 06:11 AM |
|


Joined: Apr 15, 2009
Posts: 4861
Location: San Jose, CA
|
|
I have not looked beyond this, but you are using UART callback mode, which means that buffer you've provided in HAL_WriteUsart() should exist all the time until callback is called; "pmatrica = dataInd->asdu;" will be destroyed as soon as indication functions exits.
It is a good idea to use English names for the variables and function names. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
|
| |
|
|
|
|
|
Posted: May 20, 2012 - 04:50 PM |
|

Joined: Apr 10, 2012
Posts: 2
|
|
I made some changes in the scenario, and with your advice to setup a uart buffer now works everything well.
Quote:
It is a good idea to use English names for the variables and function names.
Thanks for advice, I will use such notation.
One more question, is it possible to send only one broadcast data packet instead of the 3 retransmits that are made by default in the bitcloud stack? |
|
|
| |
|
|
|
|
|
Posted: May 20, 2012 - 07:00 PM |
|


Joined: Apr 15, 2009
Posts: 4861
Location: San Jose, CA
|
|
| No, it is impossible. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
|
| |
|
|
|
|
|
|
|