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

How to compile 'connectivity firmware' from SDK example ?

Hi,

I  tried to use BLE DFU with nrfutil on my nrf52832 custom boards, but always get the result of 'Failed to open. Error code: 13', so I am trying to build the connectivity firmware from SDK ble_connectivity example for better debugging.
Things I have tried:
- nrfutil is able to perform serial DFU with both my 2 boards. (one board need to change UART pin setting, and another need to disable HWFC)

- Both 2 boards are not able to do BLE DFU with default connectivity firmware (I have erased the chip then used nrfutil with '-f' argument to flash the fw, and confirm the fw is written)

- Patch the SDK and build the ble_connectivity example, enable RTT log out, check the UART response. The board is able to received data, but seems they are always repeat the first negotiation.
 

I am not sure if I was doing right with the SDK build, these are my procedures:
1. Download nRF5_SDK_15.2.0_9412b96
2. Clone pc-ble-driver from github, and switch to the branch 'v4.0.0'
3. Patch the sdk with the following command 'git apply --ignore-whitespace ../pc-ble-driver/hex/nRF5_SDK_15.2.0_connectivity.patch', and confirm there are no errors and make sure the SDK files are patched.
4. Open ble_connectivity example projects with SES, use my custom board settings and build. I have tried 'examples\connectivity\ble_connectivity\pca10040\ser_s132_hci' , 'ser_s132v3_hci' and 'ser_s132v5_hci'

Questions:
1. Is the above procedures correct?
2. Why there is no 'ser_s132v6_hci' project? But there are compiled hex files under '\hex\sd_api_v6\' of the pc-ble-driver v4.0.0 branch.
3. What SDK project/board type will be built if I used the CMAKE method mentioned in the README.md of the 'pc-ble-driver'? (At the 'Compiling-connectivity-HEX-files' section)
https://github.com/NordicSemiconductor/pc-ble-driver#Compiling-connectivity-HEX-files
4. Which version of the nrfutil is suggested? I have tried the python pip installed one, and another exe file downloaded from the v5.0.0 release.
https://github.com/NordicSemiconductor/pc-nrfutil/releases
5. And which version of the 'ser_s132vxx_hci'  project is corresponded to the suggested version of the nrfutil?

Thanks,
Dabinn

  • It seems the connectivity example calls NVIC_SystemResets() when there is an error with Release configuration. I switched to debug configuration and got more detailed output.

    <info> app: BLE connectivity started
    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> app: sdh enabled.
    <info> app: BLE connectivity started
    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> app: sdh enabled.
    <debug> sphy_hci: EVT:Tx packet sent.
    <debug> sphy_hci: EVT:Tx packet sent.
    <info> app: BLE connectivity started
    <debug> nrf_sdh: State request: 0x00000000
    <debug> nrf_sdh: State change: 0x00000000
    <debug> nrf_sdh: State change: 0x00000001
    <debug> app: sdh enabled.
    <debug> sphy_hci: EVT:RX Link Control packet (length:6)
    <debug> sphy_hci:  00 2F 00 D1 01 7E      |./...~  
    <debug> sphy_hci: Link control. Sync received, sending Sync Response.
    <debug> sphy_hci: EVT:Tx packet sent.
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 03 FC 11   |.?..... 
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 03 FC 11   |.?..... 
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 03 FC 11   |.?..... 
    <debug> sphy_hci: EVT:Tx packet sent.
    <debug> sphy_hci: EVT:RX Link Control packet (length:6)
    <debug> sphy_hci:  00 2F 00 D1 02 7D      |./...}  
    <debug> sphy_hci: Link control. Sync Resposnse recieved.
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 03 FC 11   |.?..... 
    <debug> sphy_hci: EVT:Tx packet sent.
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 04 7B 11   |.?...{. 
    <debug> sphy_hci: EVT:RX Link Control packet (length:7)
    <debug> sphy_hci:  00 3F 00 C1 03 FC 11   |.?..... 
    <debug> sphy_hci: EVT:Tx packet sent.
    <debug> sphy_hci: EVT:RX Vendor Specific packet (length:23)
    <debug> sphy_hci:  C0 1E 01 21 00 60 01 0A|...!.`..
    <debug> sphy_hci:  00 00 00 01 01 00 F7 00|........
    <debug> sphy_hci:  01 00 00 00 00 70 CB   |.....p. 
    <info> ser_hal_transport: phy evt:1
    <debug> sphy_hci: Start sending ACK.
    <debug> sphy_hci: EVT:ACK sent.
    <info> ser_hal_transport: phy evt:2
    <debug> ser_conn: [SD_CALL]:SD_BLE_ENABLE
    <info> ser_conn_dec: Command process start
    <info> ser_conn_dec: Tx buffer allocated
    <error> ser_conn_dec: Internal error during command decoding.
    <error> ser_conn: Command processing error:3
    <error> app: Fatal error
    

  • Hi,

    I'm very sorry for the late reply. 

    The last reply regarding the use of nrfutil v4.0.0 with SDK 15.2 was about the compatibility between the nrfutil and DFU bootloader, and not the SoftDevice API v5/v6. nrfutil only support up to SoftDevice API v3, which means that you can't use connectivity from the newest pc-ble-driver. In addition, it can be problematic to get a custom board to work with the pc-ble-driver because of its strict requirements to how the hardware flow control is implemented in the serial to USB converter (J-link OB). 

    Best regards

    Jared 

Related