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

Parents
  • Update the RTT log.
    Tested with 'ser_s132v3_hci', SDK 15.2.0 patched with pc-ble-driver v4.0.0, and nrfutil 4.0.0

    ------ test board started -----------
    <info> app: BLE connectivity started
    <warning> UARTE: Function: nrfx_uarte_init, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <debug> app: sdh enabled.
    <info> UARTE: Transfer tx_len: 8.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 2F 00 D1 01 7E C0|../...~.
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    
    
    
    
    -------- nrfutil started to run --------------
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  2F                     |/       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    <debug> UARTE: Rx data:
    <debug> UARTE:  01                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  7E                     |~       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    onse.
    
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  11                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  11                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer tx_len: 8.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 2F 00 D1 01 7E C0|../...~.
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    <debug> sphy_hci: EVT:Tx packet sent.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  2F                     |/       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    
    
    <debug> sphy_hci: EVT:RX Link Control packet (length:6)
    <debug> sphy_hci: Link control. Sync Resposnse recieved.
    <info> UARTE: Transfer tx_len: 9.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 3F 00 C1 03 FC 11|..?.....
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    

Reply
  • Update the RTT log.
    Tested with 'ser_s132v3_hci', SDK 15.2.0 patched with pc-ble-driver v4.0.0, and nrfutil 4.0.0

    ------ test board started -----------
    <info> app: BLE connectivity started
    <warning> UARTE: Function: nrfx_uarte_init, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <debug> app: sdh enabled.
    <info> UARTE: Transfer tx_len: 8.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 2F 00 D1 01 7E C0|../...~.
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    
    
    
    
    -------- nrfutil started to run --------------
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  2F                     |/       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    <debug> UARTE: Rx data:
    <debug> UARTE:  01                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  7E                     |~       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    onse.
    
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  11                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  11                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  3F                     |?       
    
    <info> UARTE: Transfer rx_len: 1.
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C1                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  03                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  FC                     |.       
    
    
    
    <info> UARTE: Transfer tx_len: 8.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 2F 00 D1 01 7E C0|../...~.
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    <debug> sphy_hci: EVT:Tx packet sent.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  00                     |.       
    
    <info> UARTE: Transfer rx_len: 1.
    <debug> UARTE: Rx data:
    <debug> UARTE:  2F                     |/       
    <info> UARTE: Function: nrfx_uarte_rx, error code: NRF_SUCCESS.
    <info> UARTE: Transfer rx_len: 1.
    
    
    
    
    
    <debug> sphy_hci: EVT:RX Link Control packet (length:6)
    <debug> sphy_hci: Link control. Sync Resposnse recieved.
    <info> UARTE: Transfer tx_len: 9.
    <debug> UARTE: Tx data:
    <debug> UARTE:  C0 00 3F 00 C1 03 FC 11|..?.....
    <debug> UARTE:  C0                     |.       
    <info> UARTE: Function: nrfx_uarte_tx, error code: NRF_SUCCESS.
    

Children
No Data
Related