This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Retrieve the flash address on the Wireless Sensor Monitor

Other Parts Discussed in Thread: SIMPLICITI

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

 

  • There are a couple of things to make sure you are aware of.  Firstly, you can modify the actual device address of each node on the network including the AP by modifying the configuration file for each AP and ED.  Those are the smpl_config_AP.dat and smpl_config_ED.dat files (using the Wireless Sensor Demo software).  These files may be called something different in the actual SimpliciTI release.

    There is a #define called THIS_DEVICE_ADDRESS which is a 32-bit value that is unique to each node on the network.

    Secondly, you can set and retrieve this value in your application code through the use of the SMPL_Ioctl() interface.  This API is documented in the SimpliciTI API.pdf in the documents directory of the SimpliciTI release.  An example of this is actually done in the ED code of the Wireless Sensor Demo software mentioned above.

     

**Attention** This is a public forum