I am using the two nrf52840 units to test adv and scanning in a pair for the development. I am using BLE_GAP_PHY_CODED for both scan and advertisement. But when I test it, seems the package lost get very high when distance is longer than 70 meters. Any way to improve it? Also, is it possible to use the antenna signal amplifer for improve the receiving and advertisement distance?
I'm sorry, but why exactly are you only advertising on channel 37?
There are a few parameters you're missing in order to advertise on the Coded PHY correctly. First off, set the init.advdata.…
Please try removing this channel masking, as Coded PHY uses secondary advertising channels for the AUX_ADV_IND packets. Please read more on the technical aspects of Coded PHY here to get a better view…
liuluan1984 said:The purpose for using channel 37 is to advertise the data in the channel for the multipule remote receivers at the same time
But how does using a single channel - as opposed to the normal…
liuluan1984 said:seems the package lost get very high when distance is longer than 70 meters
under what conditions - indoors? outdoors? etc, etc ... ?
What Tx power are you using?
I have tested it outdoor. also in the 140 meter the advertisement package almost all lost. The TX power is setup into 8dB in advertisement part. the code is shown below
err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,8); APP_ERROR_CHECK(err_code);
There are a few parameters you're missing in order to advertise on the Coded PHY correctly. First off, set the init.advdata.flags is set to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE in the advertising module.
You can check out the example uploaded by Vidar in this case which should have a peripheral and central example that advertises and connects using the Nordic UART service over Coded PHY.
I have applied what you suggested, but still communication range is very short.
The purpose for using channel 37 is to advertise the data in the channel for the multipule remote receivers at the same time.
Here is my advertisement code
The scanning code I keep same as the early comments.
But how does using a single channel - as opposed to the normal three - help that ?
The whole point of advertising is that it's a broadcast that can been "seen" by all receivers, and the whole point of having 3 channels is to make it more likely that the broadcasts will be seen!
"If any single advertising channel is blocked, the other channels are likely to be free since they’re separated by quite a few MHz of bandwidth"