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

Cannot use Serial after BLE stack is initialized

My device has BLE and I can successfully use any example (for example ble_peripheral/ble_app_bps) to advertise different services.

It also has a serial port from where I can successfully read data using peripheral/serial example.

However my task is to read serial port and write received data to one of BLE characteristics. When I am trying to combine those 2 examples it fails to read from serial port.

Basically after ble_stack_init() function nrf_serial_read always returns with timeout.

What I am doing wrong?

Parents
  • Hi,

    Which SDK version are you using? I would recommend you to look into using the libUARTE library over nrf_serial, if this is included in the SDK version you are using. nrf_serial have been deprecated and removed in SDK 17.0.x, as the libUARTE library has the same features and a lot more development/test coverage.

    If you still want to proceed with nrf_serial, please post code snippets of how you initialize and configure the serial library, and how/where you call the nrf_serial_read function (or preferably post the while project).

    Best regards,
    Jørgen

Reply
  • Hi,

    Which SDK version are you using? I would recommend you to look into using the libUARTE library over nrf_serial, if this is included in the SDK version you are using. nrf_serial have been deprecated and removed in SDK 17.0.x, as the libUARTE library has the same features and a lot more development/test coverage.

    If you still want to proceed with nrf_serial, please post code snippets of how you initialize and configure the serial library, and how/where you call the nrf_serial_read function (or preferably post the while project).

    Best regards,
    Jørgen

Children
No Data
Related