Hi all,
I am working on a project that need three ez modules working with a static address and one AP. I know I have to set it in the flash address of each device but the problem is in the AP.
I am using a modified version of the Wireless sensor monitor and I have no idea of which part of code contains the source address in the AP side..
I post part of my code:
// process all frames waiting
for (i=0; i<sNumCurrentPeers; ++i)
{
if (SMPL_Receive(sLID[i], msg, &len) == SMPL_SUCCESS)
{
ioctlRadioSiginfo_t sigInfo;
sigInfo.lid = sLID[i];
SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SIGINFO, (void *)&sigInfo);
if (TransmitRemote) transmitData( i, (signed char)sigInfo.sigInfo[0], (char*)msg );
BSP_TOGGLE_LED2();
BSP_ENTER_CRITICAL_SECTION(intState);
sPeerFrameSem--;
BSP_EXIT_CRITICAL_SECTION(intState);
}
.............................
................................
void transmitData(int addr, signed char rssi, char msg[MESSAGE_LENGTH] )
{
char addrString[4];
char rssiString[3];
volatile signed int rssi_int;
addrString[0] = '0';
addrString[1] = '0';
addrString[2] = '0'+(((addr+1)/10)%10);
addrString[3] = '0'+((addr+1)%10);
rssi_int = (signed int) rssi;
rssi_int = rssi_int+128;
rssi_int = (rssi_int*100)/256;
rssiString[0] = '0'+(rssi_int%10);
rssiString[1] = '0'+((rssi_int/10)%10);
rssiString[2] = '0'+((rssi_int/100)%10);
transmitDataString( addrString, rssiString, msg );
}
This way leads to a Serial String that contains an address value coming from the frame processing counter ("i") not from the flash value I assigned in my ED code.
I am sorry for my unexperience but where is the source address info?Should I use sigInfo string or something similar to retrieve the address?
Thanks a lot in advance
rob