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.

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

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

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

Related