This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Receiving 255 length packets from Nordic 8001.

Hello,

I'm using nordic 8001 chip within a custom board.

Everything is working but rarely, at random moments, I'm receiving packets with 255 length. I attached a print screen of the serial.

Any ideas why this can happen? If you need more informations, please ask.

Screen Shot 2014-10-01 at 12.33.37.png

Parents
  • The pattern of the serial print seems to repeat itself every 255 byte. Are you sure these are all received on air or are they a product of the print sequence? What amount of data do you expect to receive on air and does parts/some of the printed data match with what you expected to receive? You could add a check on the receiver as well if you didn't expect such long packages to discard packages that are too long compared to what you expect. I don't know more about you setup, so I don't know any specific solutions to your issue here.

  • The problem with the same pattern is caused by this bug that you have in your library in m_print_aci_data():

    const uint8_t length = p_data->buffer[0];
    uint16_t i;
    
    printf("%02d: ", length);
    
     for (i=0; i<=length; i++)
         printf("%02X, ", p_data->buffer[i]);
    

    If length is 255, this for is an infinite loop.

    If you watch carefully the first 32 bytes are 0xFF. 32 is HAL_ACI_MAX_LENGTH. So bluetooth is sending me only 0xFF. If I put the REQN on high, I will receive again another 255 length packet.

    My conclusion is that RDYN is always 0 and MISO is always 1. I repeat: this happens only sometimes! If it helps, I can give you the schematic of how we connected Nordic 8001.

Reply
  • The problem with the same pattern is caused by this bug that you have in your library in m_print_aci_data():

    const uint8_t length = p_data->buffer[0];
    uint16_t i;
    
    printf("%02d: ", length);
    
     for (i=0; i<=length; i++)
         printf("%02X, ", p_data->buffer[i]);
    

    If length is 255, this for is an infinite loop.

    If you watch carefully the first 32 bytes are 0xFF. 32 is HAL_ACI_MAX_LENGTH. So bluetooth is sending me only 0xFF. If I put the REQN on high, I will receive again another 255 length packet.

    My conclusion is that RDYN is always 0 and MISO is always 1. I repeat: this happens only sometimes! If it helps, I can give you the schematic of how we connected Nordic 8001.

Children
No Data
Related