Hi,
I am using SDK16.0(ble_app_uart) program to sending dates between the phone and board.When I use my iphone xs max,it works on well.But it come out some faults when it connecting iphone 6s.Plese tell me how can I change my code to fix it.
Hi,
I am using SDK16.0(ble_app_uart) program to sending dates between the phone and board.When I use my iphone xs max,it works on well.But it come out some faults when it connecting iphone 6s.Plese tell me how can I change my code to fix it.
Hello,
Can you check the disconnect reason in your BLE_GAP_EVT_DISCONNECTED event?
You can check it like this:
NRF_LOG_INFO("Disconnected, reason 0x%x.", p_gap_evt->params.disconnected.reason);
Is the log with the 6s from the disconnected event that you got on the phone? That is, does the log say "Disconnected" when disconnects from the phone?
Can you send the sniffer trace? Save it as a .pcapng file (default format) and upload it here on DevZone.
BR,
Edvin
Hi,Edvin
Thanks for your help.
This is the print disconnect error code.
And this is sniffer message.
Ok, so the disconnect reason 0x08 is BLE_HCI_CONNECTION_TIMEOUT (listed in ble_hci.h).
What version of the sniffer did you use? My Wireshark wasn't able to decode the packets, so it looks like this:
Can you please try the last version of the nRF Sniffer? I am sorry that I have to ask you this. Does it open normally if you open it? I haven't seen this before.
So can you please try to capture with the latest sniffer version? And while you're at it, can you capture a sniffer trace with the phone that works without any issues as well?
Just in case I can't open the next trace either, can you check what happens about 30 seconds before the nRF stops responding in the sniffer trace? That would be at the timestamp 80 seconds, give or take. What happens there? Are there any update requests of some sort from either of the devices?
BR,
Edvin
Hi Edvin,
Thanks again for helping me find the problem.
After searching the same questions in community,I have solved problem.I change the external crystal oscillator to internal oscillator.It works on well now.
Here is my change code:
NRF_SDH_CLOCK_LF_SRC = 0 NRF_SDH_CLOCK_LF_RC_CTIV = 16 //4S NRF_SDH_CLOCK_LF_RC_TEMP_CTIV = 2 NRF_SDH_CLOCK_LF_ACCURACY = 1 //500ppm
The thing that really confuses me is there have been so many same problems happen,why nordic did't change it?
Hi Edvin,
Thanks again for helping me find the problem.
After searching the same questions in community,I have solved problem.I change the external crystal oscillator to internal oscillator.It works on well now.
Here is my change code:
NRF_SDH_CLOCK_LF_SRC = 0 NRF_SDH_CLOCK_LF_RC_CTIV = 16 //4S NRF_SDH_CLOCK_LF_RC_TEMP_CTIV = 2 NRF_SDH_CLOCK_LF_ACCURACY = 1 //500ppm
The thing that really confuses me is there have been so many same problems happen,why nordic did't change it?