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.

CCS/CC2640R2F: Problem with advertising time in aoa_sender project

Part Number: CC2640R2F

Tool/software: Code Composer Studio

Hello,

We are currently working with the aoa_receiver and the aoa_sender project of the simplelink academy 2.30.28.

The problem that we are having is that the aoa_sender is configured with 100ms

#define DEFAULT_ADVERTISING_INTERVAL          160

To aliminate channels problems we are advertising only on channel 37 and the receiver is listen only on channel 37 too.

We are giving a toggle on the LED1 every packet that arrive, and a toggle on LED0 every AoA packet that arrive (2 packets).

As you can see on the image below, some times the radio doesn't send on the right time.

We already did the fix on the sitck post for the simple link 2.30.28.

Thank you.

  • Hello Kevin,
    I asked an expert to take a look at it next week.
  • Hi,

    Can you provide more information regarding this sentence? "We are giving a toggle on the LED1 every packet that arrive, and a toggle on LED0 every AoA packet that arrive (2 packets)."
    What are the differences between those 2 indication? Do you mean that LED 1 is when the sender sends a packet?

    Are you using PA and LNA signal in the project for toggling?
    In the picture above, which one is LED0 which one is LED1?
    Please be as detail as possible so we can better assist you.
  • Hi Christin, thank you for the awnser.

    On the photo, the signal 2 (blue one) is every aoa packet that arrive on the receiver. Should be every 100ms.

    The signal 1 (yellow) is the combination of 2 packets. On the example of the receiver, it reads frist from one antenna, then switch for the other antenna and use the angle from the antenna with the higher rssi. I belive that work this way. It should be every 200ms.

    The problem that I'm having is that instead of the sender send a packet every 100ms, sometimes he sends in a short period.

    Thank you.

  • Can you post your code snippet, I am interested in where you turn on and off the LEDs.
    Are you using PA and LNA signal to track the radio activity? If not, can you try it?
  • Hi Christin,

    I'm using all the same configs of the example from aoa_receiver, just added the GPIO_toggle.

    Here is the code:

    static void AoAReceiver_processAoAEvt(aoaReport_t *aoaReport, uint8_t aoaReportState)
    {
      if (aoaReportState == SUCCESS &&
          ((state == BLE_STATE_IDLE_AOA_SCANNING) ||
           (state == BLE_STATE_CONNECTED_AOA_SCANNING)))
      {
    #if defined( AOA_STREAM )
        // Treat A1 and A2 the same for now.
        Display_print0(dispHandle, 9, 0, "[");
        for (int i = 0; i < NUM_AOA_SAMPLES; ++i)
        {
            Display_print2(dispHandle, 9, 0, "(%d, %d), ", aoaReport->samples[i].i, aoaReport->samples[i].q);
        }
        Display_print0(dispHandle, 9, 0, "]");
    
        ICall_free(aoaReport);
        aoaAllocated = false;
    
        if (AoAReceiver_antA1Result->updated && AoAReceiver_antA2Result->updated)
        {
          AoAReceiver_antA1Result->updated = false;
          AoAReceiver_antA2Result->updated = false;
        }
    #else
        uint8_t aoaAdvAddr[6];
        memcpy(aoaAdvAddr, aoaReport->advAddr, 6);
    
        /*
         * With the I/Q samples stored in `samples` calculate the relative angles
         * for the different pairs of antennas specified in `*curConfig`.
         * -> Result is stored in curConfig->result
         */
        AOA_getPairAngles(aoaReport->channel,
                          aoaReport->antConfig,
                          aoaReport->antResult,
                          aoaReport->samples);
    
        // The message buffer is quite large (full of AoA samples)
        // We will free it here
        ICall_free(aoaReport);
        aoaAllocated = false;
    	GPIO_toggle(Board_GPIO_LED1);
        if (AoAReceiver_antA1Result->updated && AoAReceiver_antA2Result->updated)
        {
    	  GPIO_toggle(Board_GPIO_LED0);
          // Print AoA results via UART
          AoAReceiver_displayEstimatedAngle(aoaAdvAddr, AoAReceiver_estimateAngle(AoAReceiver_antA1Result, AoAReceiver_antA2Result));
    
          AoAReceiver_antA1Result->updated = false;
          AoAReceiver_antA2Result->updated = false;
        }
    #endif // AOA_STREAM
      }
      else if (aoaReportState == MSG_BUFFER_NOT_AVAIL)
      {
        Display_print0(dispHandle, 3, 0, "AoA Out of Memory!");
      }
    
      // We still need to deallocate the buffer even if the AoA event
      // was not successful
      if (aoaAllocated == true)
      {
        ICall_free(aoaReport);
        aoaAllocated = false;
      }
    
      // If we are in non-connected AoA, always start a new scan
      if (state == BLE_STATE_IDLE_AOA_SCANNING && aoaIdleScanStarted)
      {
        AoAReceiver_aoaStart();
      }
    }

  • I have no problem to get sender sends aoa packet every 100ms on 1 channel.

    Can you post the code snippet of modified sender project? Since you only set it to send every 100ms on one channel?

    The changes I made in sender project are:

    1. aoa_sender.c::AoASender_aoaStart(), comment out the original code and add

        uint8_t  channel = 37;
        // Run AoA tone transmission.
        AOA_run(aoaHandle, channel, NULL, AOA_PACKETID_DEFAULT);

    2. aoa_sender.c:: AoASender_processAoAEvt comment out "channelIdx = (channelIdx + 1) % aoaNumChannels;" and use the following instead.

    channelIdx = 0;

    Please use PA and LNA signal instead of placing IO toggling in the code to observe radio activity.

    BLE user's guide --> Debugging -->Debugging RF output

    Debugging RF Output