Re: Bluetooth low energy with gatttool and jawbone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christian,

On Fri, Mar 14, 2014 at 11:51 AM, Christian Bianchini
<christian.bianchini@xxxxxxxxxxxxx> wrote:
> I was trying to connect my Jawbone UP 24 with my pc to get some data from
> this device.
> This is how much I have done:
>
> $ sudo hcitool  lescan
> LE Scan ...
> DC:7A:F8:10:AF:A5 (unknown)
> DC:7A:F8:10:AF:A5 UP24
> DC:7A:F8:10:AF:A5 (unknown)
> DC:7A:F8:10:AF:A5 (unknown)
>
> $ sudo hcitool lecc --random DC:7A:F8:10:AF:A5
> Connection handle 70

"hcitool lecc" is unnecessary and may cause problems, so just skip it.
"connect" command for gatttool will do the right thing.

>
>  sudo gatttool -b DC:7A:F8:10:AF:A5 -I

also pass "-t random" so you can connect to devices with random
address (the detault used type is public).

> [   ][DC:7A:F8:10:AF:A5][LE]> connect
> [CON][DC:7A:F8:10:AF:A5][LE]>
>
>
> After this I tried to type "primary" but I just get a timeout.

First try the changes described above and see if it works.

> The device should vibrate to accept the pairing, there is in someway to set
> a PIN when pairing?

If your device requires a PIN for pairing (and will not work without
pairing), you need to do the pairing Using BlueZ and bluetoothctl.
This will save the necessary LTK on the kernel and then you can try
using gatttool again.

bluetoothctl is a interactive tool (like gattttool -I), just type
"help" to see available commands. I think you need at least these
commands

scan on
# (wait for device to appear)
scan off
default-agent
agent on
pair <addr>
# (here it should ask for PIN confirmation or entry)
quit

Then try gatttool as usual.

>
> Also I tried with my android, the procedure is the same:
> - Scan for devices
> - Find Jawbone
> - Vibrate the device
> - Press a button on the device
> - The pairing is done

Remember to clear pairing on the device side (this is device specific,
usually it is a button sequence or menu) after using android app,
otherwise pairing with BlueZ may fail with "PIN on key missing".

Finally, I suggest running "btmon" on a terminal all the time so you
can see the connection traffic and spot errors.

Best Regards,
-- 
Anderson Lizardo
http://www.indt.org/?lang=en
INdT - Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux