{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1548","repository_url":"https://api.github.com/repos/raspberrypi/linux","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1548/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1548/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1548/events","html_url":"https://github.com/raspberrypi/linux/issues/1548","id":162963968,"number":1548,"title":"Bluetooth low energy data loss ","user":{"login":"PeterMJ","id":1717104,"avatar_url":"https://avatars.githubusercontent.com/u/1717104?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterMJ","html_url":"https://github.com/PeterMJ","followers_url":"https://api.github.com/users/PeterMJ/followers","following_url":"https://api.github.com/users/PeterMJ/following{/other_user}","gists_url":"https://api.github.com/users/PeterMJ/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterMJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterMJ/subscriptions","organizations_url":"https://api.github.com/users/PeterMJ/orgs","repos_url":"https://api.github.com/users/PeterMJ/repos","events_url":"https://api.github.com/users/PeterMJ/events{/privacy}","received_events_url":"https://api.github.com/users/PeterMJ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T16:00:43Z","updated_at":"2016-12-26T15:58:37Z","closed_at":null,"body":"I am trying to develop a Bluetooth low energy sensor application, and it turns out that the Bluetooth system(BCM43435/UART/Bluetooth stack) is losing data on the raspberrypi board rather than in the 'air'. \n\nIf I look in /var/log/kern.log I see regular entries such as:\n\n`Jun 29 16:31:20 rpi kernel: [102519.580522] Bluetooth: hci0: Frame reassembly failed (-84)`\n`Jun 29 16:31:20 rpi kernel: [102519.580561] Bluetooth: hci0: Frame reassembly failed (-84)`\n`Jun 29 16:31:20 rpi kernel: [102519.580666] Bluetooth: hci0: Frame reassembly failed (-84)`\n`Jun 29 16:31:20 rpi kernel: [102519.580716] Bluetooth: hci0: Frame reassembly failed (-84)`\n\nIt appears that the errors are commonly in groups of 3-4, but some occur as a single, or pairs or a set of 5. I have four sensors that are streaming at ~1.2kbytes/second, and the errors occur intermittently from 30 seconds apart to forty minutes apart. I'm more than happy to help diagnosing the problem, but I don't know whether this is indicative of the Wifi/BT chip firmware having an issue, or if it is the main Quad-core having an issue.\n\nI have also tested this with a single sensor running at its maximum transfer rate and this also exhibited the same data loss, so it is not the multiple sensors, although it may be the data-rate. I hope/suspect it should be if the Wifi/BT chip has a single interface then the Wi-fi portion should stress the interface far more in terms of data transfer, but maybe not in terms of the number of transactions (many small packets vs. a few large ones).\n\nIn some of my testing I was using a known data pattern, and seeing the discontinuities and these errors turning up in the logs at the same time, so I am happy that the issue is on the raspberrypi 3 somewhere.\n\nAs background, I have set my bluetooth sensors to have a connection interval of 7.5ms, and they can transmit 6 packets per interval. For me the data needs to be contiguous, and so I already have in place controls for ensuring the data is not deleted on the sensor until it is successfully transmitted to the host, so if the radio connection is broken I know which packets of data need to be resent. I have been testing overnight with the latest raspberrypi firmware, including kernel 4.4.14-v7+. This I have updated using the rpi-update program. I am running the ubuntu mate desktop at the moment too.\n\nIf you need any more information, please ask, if you can point me were to look, or configuration options I can change to help with this, then please do and I will try them out.\n\nPeter Myerscough-Jackopson\n\nPs. I have seen the ticket https://github.com/raspberrypi/linux/issues/1360 that seems to show this behaviour has been experienced elsewhere, but that ticket seemed to uncover a null pointer issue that was being triggered by this data loss, and did not address the data loss issue.\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/269222500","html_url":"https://github.com/raspberrypi/linux/issues/1548#issuecomment-269222500","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1548","id":269222500,"user":{"login":"dseomn","id":15314936,"avatar_url":"https://avatars.githubusercontent.com/u/15314936?v=3","gravatar_id":"","url":"https://api.github.com/users/dseomn","html_url":"https://github.com/dseomn","followers_url":"https://api.github.com/users/dseomn/followers","following_url":"https://api.github.com/users/dseomn/following{/other_user}","gists_url":"https://api.github.com/users/dseomn/gists{/gist_id}","starred_url":"https://api.github.com/users/dseomn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseomn/subscriptions","organizations_url":"https://api.github.com/users/dseomn/orgs","repos_url":"https://api.github.com/users/dseomn/repos","events_url":"https://api.github.com/users/dseomn/events{/privacy}","received_events_url":"https://api.github.com/users/dseomn/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T15:58:37Z","updated_at":"2016-12-26T15:58:37Z","body":"I'm seeing something similar with a bluetooth keyboard/mouse. Every once in a while, the keyboard/mouse stops working for about 15 seconds. (I'm not sure if the keyboard/mouse is low energy or not though, is there a way I can find out?) Here's an excerpt from `/var/log/kern.log`.\r\n\r\n```\r\nDec 25 16:05:22 trill kernel: [   40.224538] hid-generic 0005:04E8:7021.0001: unknown main item tag 0x0\r\nDec 25 16:05:22 trill kernel: [   40.225189] input: Bluetooth Keyboard as /devices/virtual/misc/uhid/0005:04E8:7021.0001/input/input0\r\nDec 25 16:05:22 trill kernel: [   40.230894] hid-generic 0005:04E8:7021.0001: input,hidraw0: BLUETOOTH HID v1.1b Keyboard [Bluetooth Keyboard] on B8:27:EB:71:37:0E\r\nDec 25 16:30:26 trill kernel: [ 1544.593215] Bluetooth: hci0: Frame reassembly failed (-84)\r\nDec 25 16:30:26 trill kernel: [ 1544.593253] Bluetooth: hci0: Frame reassembly failed (-84)\r\nDec 25 16:30:26 trill kernel: [ 1544.593301] Bluetooth: hci0: Frame reassembly failed (-84)\r\n```"}}
{"actor":{"display_login":"dseomn"}}