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 Reply Children
  • Thank you Jorden for answering. I have some question related to it.

    If both the boards nRF52840 pdk and EV-BT840 both have same firmware loaded in it.

    Should the pins of EV-BT840's pin configuration be same as nRF52840 pdk? 

    Will these pins behave as UART pins?

    I connected EV-BT840's UART pins to MAX3232 Board to PC via USB. But it is not working. It is returning this error,

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

    When i came back to nRF52840 pdk and changed switch (sw6) DEFAULT to -> nRF ONLY and by connecting UART pins to PC by MAX3232 Board.

    It dose able to open the serial port. But while enabling BLE using driver.ble_enable( ) it is returning this error,

    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_enable. Error code: 3

    FYI on the same board if switch (sw6) is set to DEFAULT side and using it by USB cable the same code is working.

  • 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.

  • Hi Jorgen, thank you for your inputs.

    I have tested UART peripheral examples on both the boards' (nRF52840 and EV-BT840) UART pins (P0.06, P0.08) and it works with HWFC turned On and turned Off from the code itself. 

    Now in both the board (nRF52840 and EV-BT840 with MAX3232) (which have same latest connectivity firmware) are at the same point. I am able to open the port but while calling function 

    _pc_ble_driver_sd_api_v3.sd_ble_enable()

    it returns Error code: 3 (NRF_ERROR_INTERNAL)

    I am not sure why it is returning this error. It is not even part of error list from sd_ble_enable() functions return code list.

    Can you please point out any issue that can cause this error.

    FYI the same firmware in nRF52840 is working (sd_ble_enable returns 0) using onboard J-Link Virtual COM port.

  • 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?

Related