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

PC-BLE-DRIVER on FENSTEL EV-BT840F (nRF52840 MCU)

I am successfully able to use pc-ble-driver on nRF52840 Preview DK using latest connectivity firmware loaded by nRF Connect.

I want to use the same functionality on FENSTEL EV-BT840 which have the same controller as nRF52840.

nRF52840 have the connectivity IC on board which is used to connect in nrf-Connect and PC-BLE-DRIVER.

In my understanding the nRF52840 is doing communication with pc-ble-driver on UART which connectivity IC on board. And nrf-connect and pc-ble-driver both able to detect that while opening port.

In EV-BT840 there are UART pins available to access. When I use that pins using TTL to USB converter and try to open the port but i get the following error

"pc_ble_driver_py.exceptions.NordicSemiException: Failed to open. Error code: 13"

Is there anything that I misunderstood or I miss to implement. Any reference to pc-ble-driver implemented on FENSTEL BT840/BT832 chip wlll be very helpful.

Parents
  • Hi,

    I'm not aware of any reference of pc-ble-driver implemented on this board, and this is not officially supported by Nordic.

    First thing you should fix is that according to the schematics of the EV-BT840 board, it use different pins for UART RX and TX (P0.11, P0.12) than the Nordic DKs (P0.08, P0.06). You need to change the pin settings in the connectivity firmware, and recompile it. Your board also does not seem to support RTS/CTS HW flow control pins. The connectivity firmware and the pc-ble-driver appication needs to reflect this.

    Best regards,
    Jørgen

  • Yes, if you run same FW on both boards, it should use the same UART pins (P0.06, P0.08). If you connect the MAX3232 to these pins, you should be able to connect. Have you tested this method with any examples in the SDK using UART for logging (or for instance the UART peripheral example)? This should show you if the UART conenction works. When you have verified this, you need to make sure the UART communication parameters are set correct in the application, as they need to match the connectivity firmware settings. Note that the pc-ble-driver library is written to work with J-Link Virtual COM port, which works somewhat different than other UART to USB bridges (for instance the HWFC can be enabled by the J-Link even though the FW/application have not enabled it).

    When that is said, our tools only officially support our DKs and J-Link devices. It is not guaranteed to work with other boards, you will have to test with all settings correct to see if it is working.

  • This might be worth a shot. Otherwise, as I said, the driver is written to work with J-Link COM ports, and this is also the only supported devices in the current release. We are working on adding support for our own nRF52 Dongle into our tools (pc-nrfconnect, which use pc-ble-driver in the lower layers), which might help with issues you are facing as well.

  • Hi Jorgen,

    I have tried all the things. But it looks like pc-ble-driver code is written for J-link Com port only and will not work with any other USB to UART chip.

    Now as you have suggested earlier, that I need to recompile connectivity firmware as per this link. After following all the steps when I tried to run it on nRF52840 PDK using its USB ports only.

     I am using SDK15 and patch from this pc-ble-driver-py branch. Right now I want to understand and run the compiled connectivity example on nRF52840 PDK using j-link com port.

    I am not changing anything in the code. Fresh SDK15 with connectivity patch. And directly compiling the example code on nRF52840 (pca10056) (with ser_s140_hci) and trying to run it on nRF Connect app.

    But I am getting same timeout errors. I have doubts on version_info which is added from the patch file. Somehow the nRF Connect is not able to match “magic_number” from the version_info.

    What could be the problem with this?

  • nRF Connect does not support S140 softdevice yet. You can still use nRF52840 with S132 v3.0 softdevices. I tested with nRF Connect v2.4.0 and connectivity_1.2.2_1m_with_s132_3.0.hex.

  • I am also trying to create hex file for connectivity firmware using s132 for nrf52832 DK board, In it, I am able to Open the port. But it fails in enabling  BLE. It gives an error like

    Enabling BLE failed. (NRF_ERROR_INTERNAL)

    Error occured when enabling SoftDevice. Errorcode: NRF_ERROR_INTERNAL (0x3) 

    I have hex files which are working on both (nRF52840 and nRF52832) DK board, But I want to do that on a custom board so, need to compile connectivity firmware for that custom board. 

    Can you point out something which can help me with this problem?

  • Have you tried debugging the connectivity firmware that you built? You should check it to make sure there is no errors putting your device into the error handler. If your UART pins are floating at some point, this could cause errors in the UART peripheral.

Reply Children
  • Hi Jorgen, Thank you so much for your support.

    With the help of bootstrap_sd_api_v3.sh file from S132 v3.0 softdevices, I am able to download and patch the SDK12 file and able to compile and run the connectivity firmware for nRF52840 PDK board. After changing pin configurations I am able to compile and run the connectivity firmware on FANSTEL EV-BT840 board as well. 

    I used ble_connectivity\pca10040\ser_s132_hci\ code and disabled the hardware flow control for UART. and changed the pins as per UART connected pins on EV-BT840 board. 

    From this exercise, some points got cleared and those are. 

    - pc-ble-driver is not dependent on J-link Com port. It can run on any UART ports (Hardware flow control need to enable/disable as per the implementations). I am able to run UART code from ser_s132_hci example for hardware control disabled UART.

    -  I am not able to compile connectivity firmware and run it on nRF Connect or pc-ble-driver from SDK15

    Once again thank you so much Jørgen Holmefjord for your inputs on this topic

  • Hello i try also to use pc-ble-driver with EV-BT840XE.

    Is it necessarry to use a MAX3232 ?

    I thaught that to have the good hex file it was needed to use connectivity UART but you use hci ?

    Do you have your project or  your code to have an example please ?

    Best regards,

    Pierre-Yves

Related