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
  • I have built a working  'ser_s132v3_hci' by modifying the baud rate to 38400 in ser_config.h. And also modify nrfutil 5.0 to use the same baund rate. The DFU BLE is successful with this setup.
    But  'ser_s132_hci' (SD 6.0) is still not working. The board reboots when nrfutil try to 'ble_enable'. Is SD 6.0 supported by pc-ble-driver? I saw only sd_api_v2 and sd_api_v3 under pc_ble_driver_py directory.

    nrfutl output:

    File "D:\pc-nrfutil\nordicsemi\dfu\dfu_transport_ble.py", line 116, in open
        self.adapter.driver.ble_enable(ble_enable_params)
    File "C:\Python27\lib\site-packages\wrapt\wrappers.py", line 603, in __call__
        args, kwargs)
    File "C:\Python27\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 127, in wrapper
        raise NordicSemiException('Failed to {}. Error code: {}'.format(wrapped.__name__, err_code))
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_enable. Error code: 3

    RTT log:
    <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: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   |.?..... 
    <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.
    ( device dead / reboot )

Reply
  • I have built a working  'ser_s132v3_hci' by modifying the baud rate to 38400 in ser_config.h. And also modify nrfutil 5.0 to use the same baund rate. The DFU BLE is successful with this setup.
    But  'ser_s132_hci' (SD 6.0) is still not working. The board reboots when nrfutil try to 'ble_enable'. Is SD 6.0 supported by pc-ble-driver? I saw only sd_api_v2 and sd_api_v3 under pc_ble_driver_py directory.

    nrfutl output:

    File "D:\pc-nrfutil\nordicsemi\dfu\dfu_transport_ble.py", line 116, in open
        self.adapter.driver.ble_enable(ble_enable_params)
    File "C:\Python27\lib\site-packages\wrapt\wrappers.py", line 603, in __call__
        args, kwargs)
    File "C:\Python27\lib\site-packages\pc_ble_driver_py\ble_driver.py", line 127, in wrapper
        raise NordicSemiException('Failed to {}. Error code: {}'.format(wrapped.__name__, err_code))
    pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_enable. Error code: 3

    RTT log:
    <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: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   |.?..... 
    <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.
    ( device dead / reboot )

Children
No Data
Related