Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/CC1310: Packet Transmit and Receive using Frequency Hopping and LBT

$
0
0

Part Number:CC1310

Tool/software: TI-RTOS

Hello, 

I am using sensor example and collector example from ti 15.4 stack in 

star topology. I have 20 sensor nodes and 1 collector gateway. Frequency
Hopping is enable on both the example and on sensor example polling
interval is 100

I made some changes in both the example, the date packet
transmitted only if data is received on UART. The sensor node only
transmit date packet to collector and collector need to transmit date
packet to all nodes

In example the sensor node is transmitting packet to collector
whenever the packet received from UART.

I am using following
code to transmit packet from collector to all the sensor
nodes.

#define CONFIG_MAX_DEVICES 40
#define CSF_INVALID_SHORT_ADDR 0xFFFF
#define SMSGS_RADIATOR_MSG_LENGTH 126

/* Run through all of the devices */
for(x = 0; x < CONFIG_MAX_DEVICES; x++)
{
     /* Make sure the entry is valid. */
     if(Cllc_associatedDevList[x].shortAddr != CSF_INVALID_SHORT_ADDR)
     {
          uint16_t status = Cllc_associatedDevList[x].status;


          ApiMac_sAddr_t dstAddr;
          Collector_status_t stat;

          /* Set up the destination address */
          dstAddr.addrMode = ApiMac_addrType_short;
          dstAddr.addr.shortAddr = Cllc_associatedDevList[x].shortAddr;

         /* Send the Data packet to all the sensor nodes */
         stat = Collector_sendDatapacket(&dstAddr);
     }
}



Collector_status_t Collector_sendDatapacket(ApiMac_sAddr_t *pDstAddr)
{
     Collector_status_t status;

     /* Are we in the right state? */
     if(cllcState >= Cllc_states_started)
     {
          Llc_deviceListItem_t item;

          /* Is the device a known device? */
          if(Csf_getDevice(pDstAddr, &item))
          {
               uint8_t buffer[SMSGS_RADIATOR_MSG_LENGTH];
               uint8_t *pBuf = buffer;

               /* Build the message */
               *pBuf++ = (uint8_t)Smsgs_cmdIds_configReq;
               pBuf = Util_bufferUint32(pBuf, RadiatorPacketSensor.ui32GatewayID);
               pBuf = Util_bufferUint32(pBuf, RadiatorPacketSensor.ui32NodeID);
               pBuf = Util_bufferUint16(pBuf, RadiatorPacketSensor.ui16PacketNumber);
               *pBuf++ = RadiatorPacketSensor.ui8PacketCount;
               *pBuf++ = RadiatorPacketSensor.ui8packetType;
               memcpy(pBuf, RadiatorPacketSensor.ui8RadiatorPacket, 113);
               pBuf += 113;

               if((sendMsg(Smsgs_cmdIds_configReq, item.devInfo.shortAddress, item.capInfo.rxOnWhenIdle, (SMSGS_RADIATOR_MSG_LENGTH),buffer)) == true)
               {
                     status = Collector_status_success;
               }
          }
     }
        return (status);
}


But the collector is not transmitting packet to all the nodes. The collector is only transmitting packet to first connected node

How can I transmit packet from collector to all


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>