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

USBD issue after bluetooth is connected once

Our application stores sensor data in flash and sends the data on request via USB. But if the device is connected to Bluetooth once then it is having issues in USB data transfer. Device receives 21 bytes in place of 20 bytes. Receiving same packet twice even if the host doesn't send. But everything works normal if we power cycle the device.

We wrote application over usbd_ble_uart_pca10056_s140 example. 

Thanks,

Vishnu 

Parents
  • Hello Vishnu,

    We wrote application over usbd_ble_uart_pca10056_s140 example. 
    But if the device is connected to Bluetooth once then it is having issues in USB data transfer.

    Please elaborate on which modifications you have done to the example. Did you test an unmodified version of the example as detailed in the USBD BLE UART example documentation section Setup and Testing? Did the unmodified example behaves as detailed in the documentation?

    The example demonstrates how the device can receive information through the UART service, and relay it to the usbd cdc acm module.

    Device receives 21 bytes in place of 20 bytes.

    Could you verify for me that you are not in fact queueing 21 bytes for sending, such as if you are sending a \0 terminated c-string?

    Is there any error messages being generated / outputted to your logger module?
    Please make sure that DEBUG is defined in your preprocessor defines, as shown in the included image.



    Looking forward to resolving this issue together!

    Best regards,
    Karl

Reply
  • Hello Vishnu,

    We wrote application over usbd_ble_uart_pca10056_s140 example. 
    But if the device is connected to Bluetooth once then it is having issues in USB data transfer.

    Please elaborate on which modifications you have done to the example. Did you test an unmodified version of the example as detailed in the USBD BLE UART example documentation section Setup and Testing? Did the unmodified example behaves as detailed in the documentation?

    The example demonstrates how the device can receive information through the UART service, and relay it to the usbd cdc acm module.

    Device receives 21 bytes in place of 20 bytes.

    Could you verify for me that you are not in fact queueing 21 bytes for sending, such as if you are sending a \0 terminated c-string?

    Is there any error messages being generated / outputted to your logger module?
    Please make sure that DEBUG is defined in your preprocessor defines, as shown in the included image.



    Looking forward to resolving this issue together!

    Best regards,
    Karl

Children
No Data
Related