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

Customizing a bootloader

If all you need is changing  PHY, Tx power and Device Name in a standard nRF52840, do you need building a new bootloader from the scratch or the is a way to edit the standard firmware,  build a new edited file and finally re-program this file in a standard nRF52840? Thanks

  • Hi Vidar,

    Now I have the ble_app_uart example compiled and running on my PCA10056. As expected and according to the main.c source code, Tx_power is set to +8 dBm,  the modulation is CODED_PHY, the Device _Name is set to "Nordic_uart", the LED 1 is blinking and I also  can read the text "UART Start!" printed on the PuTty terminal emulator running on the computer but unfortunately, the device_name is not being advertised, so I can't connect the module from my nRF52840 USB Dongle to complete the ble_app_uart example test.

    If I review the main.c code, I can see an advertising_init(); and also an advertising_start(); statement, but no advertising going on. I tried introducing an adv_start(); just after advertising_init(); since you told me to do so in the past (while discussing about the central & peripheral cli example. See above comments) but the compiler does not accept it.

    Apart from this, if I change APP_ADV_DURATION from "18000" to "0",   (as I need permanent advertising), nothing seems to change except that LED 1 stops blinking.

    Being anyway the advertising matter my main concern, what am I missing?

    Any suggestion will be appreciated.

    Thanks

  • Hi Juan,

    Did you use the ble_app_uart_c example from my modified SDK on the dongle? You will need a scanner that is set up to scan for CODED_PHY advertisement packets. Otherwise, it won't be able to scan any packets from this peripheral. 

    p143 said:
    Apart from this, if I change APP_ADV_DURATION from "18000" to "0",   (as I need permanent advertising), nothing seems to change except that LED 1 stops blinking.

    In addition to setting APP_ADV_DURATION to '0' you need to change the adv. flag from BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE in advertising init.  

  • Hi Vidar.

    APP_ADV_DURATION is now set to '0' and working fine. 

    One more thing. If I want to revert your modified ble_app_uart peripheral example to PHY_1MBPS modulation (which I imagine is the one you can scan with a standard dongle), would you please tell me which code statements should I edit? I tried on my own editing 'init.config.ble_adv_primary_phy' and 'init.config.ble_adv_secondary_phy' main.c initialization statements, but obviously with not very much success. 

    Thanks

    Juan

  • Hi Juan,

    You can use the advertising_init() function from the original ble_app_uart example in SDK 15.2.0 if you want to revert back to 1M. 

  • Thanks, Vidar.

    By the way. Do you know of any smartphone BT v5.0 PHY_CODED compatible, apart from (I read it somewhere) the ONEPLUS 6?

    Thanks

    Juan

Related