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

nrf8001 UART with smartphones

Hello from Spain!

It is my first time that I use a Bluetooth chip so I am following all your code stack and some answers of this portal, but I am having problems with the UART over BLE for communicate my PCB (based on NRF8001) with smartphones.

The hardware has a PIC24FJ and the nRF8001. I can communicate over SPI with the nrf chip without problems, and all the interfaces lines work fine. The radio goes fine with good RSSI levels. The code that I am developing is not exactly equal to your library, but it is based on it.

My purpose is to stablish an UART interface over the air between my PCB and smartphones (iOS, android or Windows phone) using any Bluetooth Serial app, as for example with Bluetooth Terminal. And after a lot of tests with your examples and with other codes, I can only stablish bidirectional communication with your Master Control Panel. Even with your app NRF UART 2.0, I can only receive (Phone->PCB), not transmit (PCB -> Phone).

The setup is done with nrfGo Studio with the next parameters:

  • Gatt Serv: UART BLE (only TX and RX). Rx: write without response; TX: notify
  • GAP Set: by default with UART BLE Local Gatt server to advertise, and to advertise Local name and Local services in ACI connect and ACI Bond
  • Security on: just works, I/O none.
  • Hardware by default

A part of the above setup, I have tried others from Github, but anyone seems to work fine for my purpose.

Steps that I am following:

  1. Reset
  2. Wait Device Start Event
  3. Setup until transfer complete
  4. When it is on standby mode, discover by smartphone.
  5. Connection and stablish bond connection
  6. Enable services with Master Control Panel. Test Rx and TX (this is OK).
  7. Close Master Control Panel.
  8. Open any Bluetooth serial app: UART doesn't work. With nrf UART 2.0, the phone transmits, but not receives.

When I debug into the code of PIC, I see that the TX and RX pipes are opened, so I don't understand why the TX (nrf8001 -> smartphone) doesn't work.

What am I doing wrong? A part of the Master Control Panel, any Bluetooth app could open the UART pipes?

Thank you very much and sorry if I have writen something wrong.

Best regards, Luis

Related