Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART example on coded PHY

Hi

I am playing around with ble_app_uart example from SDK, it works perfectly fine together with ble_app_uart_c. Now I want to modify it so that it would work in long range mode (or coded PHY). I tried adding these two lines to advertising_init function:

Fullscreen
1
2
init.config.ble_adv_primary_phy = BLE_GAP_PHY_CODED;
init.config.ble_adv_secondary_phy = BLE_GAP_PHY_CODED;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

After doing that, the application crashes in function advertising_start, because the function ble_advertising_start returns 7 (I believe this is the parameter error). But the hard part is now how to know which parameter is wrong if there are so many... Does anybody have an idea?

Here is the code from my main.c for reference (I haven't modified anything else):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2014 - 2018, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I would really appreciate if somebody would help me out.