1 |
On 04/27/14 02:33, Mick wrote: |
2 |
> On Thursday 24 Apr 2014 02:11:57 William Kenworthy wrote: |
3 |
> |
4 |
>> I was able to get it working manually - gentoo's init scripts are out of |
5 |
>> date with bluez 5, blutoothctl is broken (or probably just poorly |
6 |
>> documented which equates to the same thing if the command doesn't work) . |
7 |
>> |
8 |
>> In bluetoothctl: |
9 |
>> power on |
10 |
>> scan on |
11 |
>> agent on |
12 |
>> default-agent |
13 |
>> pair <dev_id> |
14 |
>> trust <dev_id> |
15 |
>> exit |
16 |
>> |
17 |
>> In a shell: |
18 |
>> rfcomm bind rfcomm0 <dev_id> |
19 |
>> |
20 |
>> do serial port stuff with /dev/rfcomm0 |
21 |
>> |
22 |
>> rfcomm unbind rfcomm0 |
23 |
>> |
24 |
>> bluetoothctl connect command does not work - connects and immediately |
25 |
>> disconnects with an error |
26 |
>> gentoo's rfcomm initscript has removed the -f flag which bluez 5 does |
27 |
>> not have, but it also looks like the bind all in the 5.17 ebuild is also |
28 |
>> not supported by late bluez5 so it immediately exits and no rfcomm |
29 |
>> device is created. |
30 |
>> |
31 |
>> Ive adapted my python script to the changes now - but the pairing does |
32 |
>> not survive restarting bluetooth so I'll need an expect script to set it |
33 |
>> up each bluetooth re-init as it looks like there are no scripting hooks |
34 |
>> in bluetoothctl. |
35 |
>> |
36 |
>> BillK |
37 |
> |
38 |
> Thanks BillK, your suggestions above helped somewhat, because I was able to |
39 |
> connect with my phone, but it didn't get me far enough. I was not able to |
40 |
> connect with rfcomm to my mobile. When I ran 'pon <connection_name>' pppd |
41 |
> started, but I got errors like: |
42 |
> |
43 |
> Apr 26 18:15:12 dell_xps chat[29579]: -- write failed: Transport endpoint is |
44 |
> not connected |
45 |
> Apr 26 18:15:12 dell_xps chat[29579]: Failed |
46 |
> |
47 |
> |
48 |
> This was despite the fact that I had created manually the rfcomm0 device and |
49 |
> binded it to the bdaddr of my phone as you suggested. |
50 |
> |
51 |
> Googling for this error revealed that this is because the rfcomm code has |
52 |
> changed - but there is a patch which may fix things: |
53 |
> |
54 |
> http://comments.gmane.org/gmane.linux.bluez.kernel/42303 |
55 |
> |
56 |
> |
57 |
> I ran out of time and did not try 'rfcomm connect' instead of 'rfcomm bind' to |
58 |
> see if it makes a difference in my case. |
59 |
> |
60 |
> FYI, I'm on net-wireless/bluez-5.15 and kernel 3.12.13-gentoo. |
61 |
> |
62 |
|
63 |
I just upgraded to 3.12.13 and it stopped working with the same error |
64 |
you have. |
65 |
|
66 |
I did see some other messages saying that certain kernel versions are |
67 |
broken but I'll now need to look into that now. |
68 |
|
69 |
BillK |