* Error 133 (0x85): GATT ERROR @ 2016-02-06 20:30 Barry Byford 2016-02-08 10:13 ` Luiz Augusto von Dentz 0 siblings, 1 reply; 8+ messages in thread From: Barry Byford @ 2016-02-06 20:30 UTC (permalink / raw) To: Bluez mailing list Hello, I'm trying to get the Raspberry Pi to advertise itself as a peripheral so I've started by taking the example-gatt-server and example-advertisement to get something running. The code I have running can be found at: https://github.com/ukBaz/python-bluezero/blob/master/examples/battery_service.py When I run the above code with Bluez 5.37 then I can connect and read values from it on another Raspberry Pi using bluetoothctl. However when I try to connect with various apps on my phone then I'm not able to successfully connect. On the Nordic nRF Master Control Panel (BLE) app I can see in the log 'Error 133 (0x85): GATT ERROR)' I've done various searches on this error message but nothing actionable has turned up. Any suggestions as to what is wrong? Thanks, Barry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-06 20:30 Error 133 (0x85): GATT ERROR Barry Byford @ 2016-02-08 10:13 ` Luiz Augusto von Dentz 2016-02-08 12:22 ` Barry Byford 2016-02-08 22:08 ` Barry Byford 0 siblings, 2 replies; 8+ messages in thread From: Luiz Augusto von Dentz @ 2016-02-08 10:13 UTC (permalink / raw) To: Barry Byford; +Cc: Bluez mailing list Hi Barry, On Sat, Feb 6, 2016 at 10:30 PM, Barry Byford <31baz66@gmail.com> wrote: > Hello, > > I'm trying to get the Raspberry Pi to advertise itself as a peripheral > so I've started by taking the example-gatt-server and > example-advertisement to get something running. > > The code I have running can be found at: > https://github.com/ukBaz/python-bluezero/blob/master/examples/battery_service.py > > When I run the above code with Bluez 5.37 then I can connect and read > values from it on another Raspberry Pi using bluetoothctl. > However when I try to connect with various apps on my phone then I'm > not able to successfully connect. > On the Nordic nRF Master Control Panel (BLE) app I can see in the log > 'Error 133 (0x85): GATT ERROR)' I've done various searches on this > error message but nothing actionable has turned up. > > Any suggestions as to what is wrong? Perhaps if you can take the HCI and bluetoothd it should help to see where is the problem. Btw, it could be that Android is attempting to connect over BR/EDR or did you configure your adapter to as BLE only? -- Luiz Augusto von Dentz ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-08 10:13 ` Luiz Augusto von Dentz @ 2016-02-08 12:22 ` Barry Byford 2016-02-08 22:08 ` Barry Byford 1 sibling, 0 replies; 8+ messages in thread From: Barry Byford @ 2016-02-08 12:22 UTC (permalink / raw) To: Bluez mailing list Hello Luiz, On 8 February 2016 at 10:13, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: > Hi Barry, > > On Sat, Feb 6, 2016 at 10:30 PM, Barry Byford <31baz66@gmail.com> wrote: >> Any suggestions as to what is wrong? > Perhaps if you can take the HCI and bluetoothd it should help to see > where is the problem. I think you are suggesting I take a look at the logs. A good suggestion although a couple of newbie questions about this. My assumption is I would start bluetoothd with '-nEd' to get the information from that. Correct? How do I get the log information from HCI? > Btw, it could be that Android is attempting to > connect over BR/EDR or did you configure your adapter to as BLE only? Is it possible to do this with the DBus API? Thanks, Barry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-08 10:13 ` Luiz Augusto von Dentz 2016-02-08 12:22 ` Barry Byford @ 2016-02-08 22:08 ` Barry Byford 2016-02-09 1:12 ` Adam Moore 1 sibling, 1 reply; 8+ messages in thread From: Barry Byford @ 2016-02-08 22:08 UTC (permalink / raw) To: Bluez mailing list Hello Luiz, On 8 February 2016 at 10:13, Luiz Augusto von Dentz <luiz.dentz@gmail.com> wrote: > Hi Barry, > > On Sat, Feb 6, 2016 at 10:30 PM, Barry Byford <31baz66@gmail.com> wrote: >> Hello, [snip] >> The code I have running can be found at: >> https://github.com/ukBaz/python-bluezero/blob/master/examples/battery_service.py [snip] >> On the Nordic nRF Master Control Panel (BLE) app I can see in the log >> 'Error 133 (0x85): GATT ERROR)' [snip] > Perhaps if you can take the HCI and bluetoothd it should help to see > where is the problem. Btw, it could be that Android is attempting to > connect over BR/EDR or did you configure your adapter to as BLE only? If I do a hcidump when I try to connect from my phone I get the following: - HCI Event: Connect Request (0x04) plen 10 bdaddr xx:xx:xx:xx:xx:xx class 0x5a020c type ACL - HCI Event: Command Status (0x0f) plen 4 Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1 - HCI Event: Connect Complete (0x03) plen 11 status 0x0f handle 65 bdaddr xx:xx:xx:xx:xx:xx type ACL encrypt 0x00 Error: Connection Rejected due to Unacceptable BD_ADDR According to my phone the code on the Raspberry Pi is advertising with only the 'LE General Discoverable Mode' flag set. The 'BR/EDR not Supported' is not set. I've looked at the DBus API documentation again and it is not obvious that I can change this setting on the advertisement. Am I missing something? Thanks, Barry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-08 22:08 ` Barry Byford @ 2016-02-09 1:12 ` Adam Moore 2016-02-09 8:00 ` Barry Byford 0 siblings, 1 reply; 8+ messages in thread From: Adam Moore @ 2016-02-09 1:12 UTC (permalink / raw) To: Barry Byford, Bluez mailing list Hi Barry, On 2/8/16, 2:08 PM, "linux-bluetooth-owner@vger.kernel.org on behalf of Barry Byford" <linux-bluetooth-owner@vger.kernel.org on behalf of 31baz66@gmail.com> wrote: >Hello Luiz, > >On 8 February 2016 at 10:13, Luiz Augusto von Dentz ><luiz.dentz@gmail.com> wrote: >> Hi Barry, >> >> On Sat, Feb 6, 2016 at 10:30 PM, Barry Byford <31baz66@gmail.com> wrote: >>> Hello, >[snip] >>> The code I have running can be found at: >>> >>>https://github.com/ukBaz/python-bluezero/blob/master/examples/battery_se >>>rvice.py >[snip] >>> On the Nordic nRF Master Control Panel (BLE) app I can see in the log >>> 'Error 133 (0x85): GATT ERROR)' >[snip] >> Perhaps if you can take the HCI and bluetoothd it should help to see >> where is the problem. Btw, it could be that Android is attempting to >> connect over BR/EDR or did you configure your adapter to as BLE only? > >If I do a hcidump when I try to connect from my phone I get the following: > >- HCI Event: Connect Request (0x04) plen 10 > bdaddr xx:xx:xx:xx:xx:xx class 0x5a020c type ACL >- HCI Event: Command Status (0x0f) plen 4 > Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1 >- HCI Event: Connect Complete (0x03) plen 11 > status 0x0f handle 65 bdaddr xx:xx:xx:xx:xx:xx type ACL encrypt 0x00 > Error: Connection Rejected due to Unacceptable BD_ADDR > >According to my phone the code on the Raspberry Pi is advertising with >only the 'LE General Discoverable Mode' flag set. The 'BR/EDR not >Supported' is not set. >I've looked at the DBus API documentation again and it is not obvious >that I can change this setting on the advertisement. Am I missing >something? Have you tried setting ControllerMode = le in bluez¹s main.conf? If set, bluetoothd will explicitly enable le and disable br/edr in the kernel via the management interface, and that should set advertising flags appropriately. There does not appear to be a DBus API, probably because this is more of a static setting. -Adam > >Thanks, >Barry >-- >To unsubscribe from this list: send the line "unsubscribe >linux-bluetooth" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html Statement of Confidentiality The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-09 1:12 ` Adam Moore @ 2016-02-09 8:00 ` Barry Byford 2016-02-09 9:03 ` Szymon Janc 0 siblings, 1 reply; 8+ messages in thread From: Barry Byford @ 2016-02-09 8:00 UTC (permalink / raw) To: Bluez mailing list Hi Adam, On 9 February 2016 at 01:12, Adam Moore <adam.moore@savantsystems.com> wrote: > Hi Barry, > > > On 2/8/16, 2:08 PM, "linux-bluetooth-owner@vger.kernel.org on behalf of > Barry Byford" <linux-bluetooth-owner@vger.kernel.org on behalf of > 31baz66@gmail.com> wrote: > >>Hello Luiz, >> >>On 8 February 2016 at 10:13, Luiz Augusto von Dentz >><luiz.dentz@gmail.com> wrote: >>> Hi Barry, >>> >>> On Sat, Feb 6, 2016 at 10:30 PM, Barry Byford <31baz66@gmail.com> wrote: >>>> Hello, >>[snip] >>>> The code I have running can be found at: >>>> >>>>https://github.com/ukBaz/python-bluezero/blob/master/examples/battery_se >>>>rvice.py >>[snip] >>>> On the Nordic nRF Master Control Panel (BLE) app I can see in the log >>>> 'Error 133 (0x85): GATT ERROR)' >>[snip] >>> Perhaps if you can take the HCI and bluetoothd it should help to see >>> where is the problem. Btw, it could be that Android is attempting to >>> connect over BR/EDR or did you configure your adapter to as BLE only? >> >>If I do a hcidump when I try to connect from my phone I get the following: >> >>- HCI Event: Connect Request (0x04) plen 10 >> bdaddr xx:xx:xx:xx:xx:xx class 0x5a020c type ACL >>- HCI Event: Command Status (0x0f) plen 4 >> Reject Connection Request (0x01|0x000a) status 0x00 ncmd 1 >>- HCI Event: Connect Complete (0x03) plen 11 >> status 0x0f handle 65 bdaddr xx:xx:xx:xx:xx:xx type ACL encrypt 0x00 >> Error: Connection Rejected due to Unacceptable BD_ADDR >> >>According to my phone the code on the Raspberry Pi is advertising with >>only the 'LE General Discoverable Mode' flag set. The 'BR/EDR not >>Supported' is not set. >>I've looked at the DBus API documentation again and it is not obvious >>that I can change this setting on the advertisement. Am I missing >>something? > > Have you tried setting ControllerMode = le in bluez¹s main.conf? If set, > bluetoothd will explicitly enable le and disable br/edr in the kernel via > the management interface, and that should set advertising flags > appropriately. There does not appear to be a DBus API, probably because > this is more of a static setting. Thanks for the suggestion. I've added that setting to the /etc/bluetooth/main.conf and when the Raspberry Pi advertises it now has the 'BR/EDR Not supported' flag set. Now when I try to connect from my phone it fails with the same error message on my phone although in the hcidump and bluetoothd logs nothing appears when the phone tries to connect. Thanks again for the suggestion. Regards, Barry ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-09 8:00 ` Barry Byford @ 2016-02-09 9:03 ` Szymon Janc 2016-02-09 22:02 ` Barry Byford 0 siblings, 1 reply; 8+ messages in thread From: Szymon Janc @ 2016-02-09 9:03 UTC (permalink / raw) To: Barry Byford; +Cc: Bluez mailing list Hi Barry, On Tuesday 09 of February 2016 08:00:52 Barry Byford wrote: <snip> > >>According to my phone the code on the Raspberry Pi is advertising with > >>only the 'LE General Discoverable Mode' flag set. The 'BR/EDR not > >>Supported' is not set. > >>I've looked at the DBus API documentation again and it is not obvious > >>that I can change this setting on the advertisement. Am I missing > >>something? > >> > > Have you tried setting ControllerMode = le in bluez¹s main.conf? If set, > > bluetoothd will explicitly enable le and disable br/edr in the kernel via > > the management interface, and that should set advertising flags > > appropriately. There does not appear to be a DBus API, probably because > > this is more of a static setting. > > Thanks for the suggestion. I've added that setting to the > /etc/bluetooth/main.conf and when the Raspberry Pi advertises it now > has the 'BR/EDR Not supported' flag set. > Now when I try to connect from my phone it fails with the same error > message on my phone although in the hcidump and bluetoothd logs > nothing appears when the phone tries to connect. > > Thanks again for the suggestion. If this is Android phone with 4.0 BT (no 4.1/4.2 features) then you need to unpair the device and toggle phone BT off/on. Otherwise Bluedroid stack cache info that your device is dual mode and tries to connect over BR/EDR. -- BR Szymon Janc ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Error 133 (0x85): GATT ERROR 2016-02-09 9:03 ` Szymon Janc @ 2016-02-09 22:02 ` Barry Byford 0 siblings, 0 replies; 8+ messages in thread From: Barry Byford @ 2016-02-09 22:02 UTC (permalink / raw) To: Bluez mailing list Hello Szymon, On 9 February 2016 at 09:03, Szymon Janc <ext.szymon.janc@tieto.com> wrote: > Hi Barry, > > On Tuesday 09 of February 2016 08:00:52 Barry Byford wrote: > > <snip> > >> >>According to my phone the code on the Raspberry Pi is advertising with >> >>only the 'LE General Discoverable Mode' flag set. The 'BR/EDR not >> >>Supported' is not set. >> >>I've looked at the DBus API documentation again and it is not obvious >> >>that I can change this setting on the advertisement. Am I missing >> >>something? >> >> >> > Have you tried setting ControllerMode = le in bluez¹s main.conf? If set, >> > bluetoothd will explicitly enable le and disable br/edr in the kernel via >> > the management interface, and that should set advertising flags >> > appropriately. There does not appear to be a DBus API, probably because >> > this is more of a static setting. >> >> Thanks for the suggestion. I've added that setting to the >> /etc/bluetooth/main.conf and when the Raspberry Pi advertises it now >> has the 'BR/EDR Not supported' flag set. >> Now when I try to connect from my phone it fails with the same error >> message on my phone although in the hcidump and bluetoothd logs >> nothing appears when the phone tries to connect. >> >> Thanks again for the suggestion. > > If this is Android phone with 4.0 BT (no 4.1/4.2 features) then you need to > unpair the device and toggle phone BT off/on. Otherwise Bluedroid stack cache > info that your device is dual mode and tries to connect over BR/EDR. > Good suggestion! The modification to main.conf and resetting the phone has allowed me to access the services on my phone the raspberry pi is advertising. Thanks for your help. Regards, Barry ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-09 22:02 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-06 20:30 Error 133 (0x85): GATT ERROR Barry Byford 2016-02-08 10:13 ` Luiz Augusto von Dentz 2016-02-08 12:22 ` Barry Byford 2016-02-08 22:08 ` Barry Byford 2016-02-09 1:12 ` Adam Moore 2016-02-09 8:00 ` Barry Byford 2016-02-09 9:03 ` Szymon Janc 2016-02-09 22:02 ` Barry Byford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).