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

Serial communication with nRF52832

Hi!

I just bought a BLE Nano board featuring nRF52832 chip. I am using it with Arduino IDE, controlling some servos and motors onboard my autonomous device. I would like to communicate with it by bluetooth serial channel. Though all samples that I found kinda won't do what I want. The only thing that I got working "properly" was a fake hear rate monitor working with nRF Toolbox.

Is it there a sample code which would allow me to pair nRF52832 to android or PC as a UART device so I could use serial stream to send commands and receive a status data from my device?

Thanks.

Parents
  • Not really because there is no Bluetooth Low Energy profile or service definition by BT SIG (or similar standardization body) for virtual COM port (or other form of "serial" communication). If you want to object that your PC can do that over Bluetooth with any phone or similar device then it's Bluetooth classic (BR/EDR) not Low Energy. There is popular Nordic BLE UART Service implementation in nRF5 SDK which simulates basic serial full-duplex link over BLE (no flow control, you need to take care about these things on higher layer) but for that you need specific app on both sides. Still there are all iOS/Android/Win/Linux/Mac implementation available by Nordic in some form so it might be what you want...

Reply
  • Not really because there is no Bluetooth Low Energy profile or service definition by BT SIG (or similar standardization body) for virtual COM port (or other form of "serial" communication). If you want to object that your PC can do that over Bluetooth with any phone or similar device then it's Bluetooth classic (BR/EDR) not Low Energy. There is popular Nordic BLE UART Service implementation in nRF5 SDK which simulates basic serial full-duplex link over BLE (no flow control, you need to take care about these things on higher layer) but for that you need specific app on both sides. Still there are all iOS/Android/Win/Linux/Mac implementation available by Nordic in some form so it might be what you want...

Children
  • So if I want to have a simple stream-like communication channel, there is no standard solution? I need to implement something like BLE_Serial example and to have a custom driver on an other end? ***. Seems that I made a wrong turn choosing BLE Nano...

  • Note that this has nothing specifically to do with the BLE Nano.

    As stated, there simply isn't any such profile defined by the BT SIG - so you would have exactly the same problem whatever hardware you chose from any manufacturer.

    However, plenty of people have managed to do this kind of thing perfectly well with the Nordic BLE UART Service

  • Also there is another misunderstanding: while you cannot have virtual serial port over BLE out of the box with systems like Android or Windows you don't need "driver" since these systems (starting from some version like Android 4.3 and Windows 8 etc.) support generic BLE GAP&GATT APIs. So what you can have is standard Windows or Android or iOS application which uses built-in HW and BLE SW stack. And as explained there are even examples of these by Nordic and other developers.

Related