- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'am trying to ble_mouse source on custom board with cyw20819.
For idle status, I got the 'HCI_ERR_INSTANT_PASSED' for connection_down reason.
I mean idle status is no mouse input. It works with slave latency. No sleep mode.
Ble configuration is follows.
conn_min_interval = conn_max_interval = 8
conn_latency = 99
conn_supervision_timeout = 500.
Solved! Go to Solution.
- Labels:
-
ModusToolbox Bluetooth SDK
- Tags:
- connection_down
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
Maybe the issue is because of high connection latency. Will you be able to have a reduced connection latency in your design?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
The following post explains the HCI_ERR_INSTANT_PASSED disconnection event.
More details can be found in section 5.5 PROCEDURES WITH INSTANTS (Version 5.2 | Vol 6, Part B)
Can you please provide air logs when this issue happens to identify the root cause of this issue?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I try to make air logs, use BTSpy?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim,
BtSpy logs can give only the HCI level transactions. This issue happens at link layer level and hence we need air logs using some BT sniffer to identify the issue. Did you try to perform this experiment in a less noisy RF environment?
Also, can you please let us know which application (code example link) you are using? Also please share with us the steps to reproduce this issue.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh,
I can't do in other environment.
But I can provide code link for a few days.
https://github.com/CLELECTRONICS/12345
Regards,
gykim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , Please share air logs to debug the issue. Also, share with us the steps to reproduce the issue.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadessh.
I don't know how to create air logs. Can you tell me?
And I faced the issue when I was doing nothing. Just on connection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
You need to use a BLE sniffer that can capture the BLE traffic sent over the air. If that is not available. Can you for now share the BtSpy logs of the transaction when the issue occurs?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh,
Actually I don't know how to use BTspy and client control.
Now I'm trying to study these.
I'm going to reply as soon as possible.
regards,
gykim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , This should be a good starting point
https://github.com/Infineon/CypressAcademy_BT101_Files/blob/master/PDFs/WBT101-05-Debugging.pdf
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh.
First, I changed configurations.
.conn_min_interval = 20,
.conn_max_interval = 20,
.conn_latency= 98,
.conn_supervision_timeout = 500,
And the BTSpy logs is enclosed.
But the 'reason: 40' is not detected but 'reason: 8' is detected.
I think it will be occured reason: 40 too.
So, I put this log file first.
And... mouse sensor value is not read correctly.
The overflow flag is always set every interrupt.
The mouse sensor use interface SPI0.
Is this problem with HCI?
Regards,
gykim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , The Connection Timeout error code indicates that the link supervision timeout has expired for a given connection. Looks like you are trying to disconnect by resetting the peer device.
Can you obtain BtSpy logs when you observe HCI_ERR_INSTANT_PASSED ?
What is the peer device you are using? Also, is it possible to obtain HCI logs of the peer device as well?
Did you try using a less slave latency to see if the issue reduces?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you obtain BtSpy logs when you observe HCI_ERR_INSTANT_PASSED ?
-> I have been getting logs. I am going to reply if I get HCI_ERR_INSTANT_PASSED.
What is the peer device you are using?
-> I'm using Bluetooth dongle.
spec : Realtek RTL8761B, BT5.0
Also, is it possible to obtain HCI logs of the peer device as well?
-> I'm afraid not now. I'am waitting for bluetooth sniffer, this product delivery is long.
Did you try using a less slave latency to see if the issue reduces?
-> OK, I'm going to change configuration as first test.
.conn_min_interval = 8,
.conn_max_interval = 8,
.conn_latency= 99,
Regards,
gykim
.conn_supervision_timeout = 500,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh.
I got no link down with conn_latency 0 for 9 hours.
Because windows is rebooted, it's done at 02:10 but It seems to be working fine.
Should I get more logs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
Maybe the issue is because of high connection latency. Will you be able to have a reduced connection latency in your design?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh.
I can reduce connection latency, but I have some questions.
1. What is latency typically used in ble mouse?
2. Can you explain why my issue is occured?
Board design, noise of environment or other reason?
3. If I use the sniffer, can I get more accurate reason?
Regards,
gykim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
1. Slave latency depends on the amount of time the peripheral device can still not exchange data while still maintaining a connection. You need to set this based on your requirement. If you are performing any encryption or key exchange procedure, it is recommended to have less slave latency so that the procedure is completed fast. Otherwise, you can have increased slave latency values so that your device can be put to sleep.
2. Can you try your project in an EVAL board provided by Infineon and check if the issue is reproducible. This will tell us if the issue is in hardware or firmware (or environmental issue).
3. Yes, this should give us a clear picture as of why this issue occurred.
4. Is the issue specific to a particular client? Were you able to reproduce the issue with some other client device? Please let us know your peer device.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh,
2. Can you try your project in an EVAL board provided by Infineon and check if the issue is reproducible.
-> I'm sorry I can't. I don't have EVAL board.
4. Is the issue specific to a particular client? Were you able to reproduce the issue with some other client device? Please let us know your peer device.
-> I have 3 dongles, and these are connected wit PC.
https://www.tp-link.com/en/home-networking/adapter/ub500/#overview
http://iptime.com/iptime/?page_id=11&pf=17&page=&pt=525&pd=1
My board has been working for few days, HCI_ERR_INSTANT_PASSED is not occured.
But HCI_ERR_CONNECTION_TOUT is occured.
And I received sniffer, Adafruit Bluefruit LE Friend.
I used the LE Friend and wireshark v3.2.3. But I don't know it works well.
Wireshark's message is follows.
regards,
gykim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , the quality of this image seems bad, could you please reattach the wireshare file along with BTspy HCI logs?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh,
I got this log via wireshark 3.0.7, a dongle from aliexpress.
On aother condition, it was able to get info 'ADV_IND'.
(On wireshark 3.2.7, tp-link, iptime, it wasn't able to info 'PDU' and 'Encryped packet'. )
And the error message.
Can you explain how to get other packet log?
Regards,
gykim.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , If the packet is encrypted using a key (after pairing), then it is not possible to view these packets in the logs without the keys. That is why you get this error message. Can you share the HCI logs when the issue occurs?
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim ,
Thanks for sharing the HCI logs. From the HCI logs, we see "HCI_Authenticated_Payload_Timeout" event which means that a packet with valid MIC has not been received within the Authenticated Payload Timeout and that the Host is notified that the timer has expired. After the timeout expires, the controller will automatically disconnect the link with LMP response timeout event. Can you check if you are receiving a similar event from the client end?
Reference sections from Spec:
Section 5.4 LE AUTHENTICATED PAYLOAD TIMEOUT , Vol 6, Part B
Section 6.13 LE PING, Vol 6, Part D
5.1.8 LE Ping procedure, Vol 6, Part B
6.13 LE PING, Vol 6, Part D
How often does this issue occur? We highly recommend you to run your project in this eval kit (CYW920819EVB-02 Evaluation Kit). This ensures that there are no issues in the hardware.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bragadeesh.
I don't have received similar event.
And the "HCI_Authenticated_Payload_Timeout" is alway received with third dongle from ali-express.
With other dongles, the message is recieved many times.
I want to run my project in Evaluation Kit. But delivery of this product is longer than 10 weeks.
So now, I think the best way is that I configure 0 to slave latency.
I wonder your suggestion.
Regards,
gykim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @gykim , We do not see any issues in using low slave latency values in your design.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, Thanks a lot your effort.