0

I can't seem to find anyone who has had this issue. I'm trying to listen to notifications using gatttool. On most devices, this is fine, I type in

gatttool -b mydevice --char-write-req -a enablebdaddr -n enablingvalue --listen

and I just sit and listen to notifications.

Now, I got myself a new device which works slightly differently. As soon as it connects, it bursts its notifications and then goes quiet again. If I use an I-Phone, there doesn't seem to be any problems. I enable notifications and connect the phone. Done. I can read the notifications.

But it doesn't seem to work with the bluez-stack. There doesn't seem to be such a thing as

gatttool -b mydevice --do-nothing --listen

Any suggestions how I'd go about catching notifications without using a write command first?

EDIT: My bad. It seems that when IOS registers a handler, it enables the CCC automatically. So, yeah, I needed to do that too. Sorry for the interruption.

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
  • "it bursts its notifications and then goes quiet again". That is unusual behaviour. Are you sure it really does that? How do you know that the iphone does not enable the notifications as soon as it connects (are using an app for that?)? What I'm trying to say is that we need to understand exactly what the device is doing before we can say what the right way to communicate with it is. Do you have the communication specs for the device? – kaylum Feb 14 '16 at 21:51
  • @kaylum - I'm fairly sure that's what it does. I base this on the description of the behaviour given to me verbally by the guy who made the device. It's a third party device and it's well, kinda proprietary. There are no formal documentation, but I know which handle/uuid it's notifying on, if that helps any. Viz. on a successful connection, it starts spitting out notifications on handle 0xe. A device that listens for notifications picks them up, I can confirm this. I just want to know the 'default' method of using listen without the --char-write-req. – didntdoithonest Feb 15 '16 at 03:35

0 Answers0