eebenson / haggle

Automatically exported from code.google.com/p/haggle
Apache License 2.0
0 stars 0 forks source link

Bluetooth issue on android #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi i've tried to use bluetooth connection on Android.

I use latest source 622:7d1d7436f084, where root-less bluetooth support was 
added. But i'm not able to get it work, i've patches Trace::write() to write to 
android log(i've send a poll request here 
https://github.com/dmonakhov/haggle/tree/for_erimatnor)
I always get following error:
D/Haggle  ( 1855): Bluetooth turning off 90:21:55:2E:7B:D8 Nexus One
D/Haggle  ( 1855): Bluetooth off
D/Haggle  ( 1855): Bluetooth turning on
D/Haggle  ( 1855): Bluetooth on 90:21:55:2E:7B:D8 Nexus One
E/Haggle  ( 1855): 2759.257:[9]{virtual bool 
ConnectivityBluetooth::run()}:Could not connect to local SDP daemon

I'm not an bluetooth expert, and i cant undertand what's wrong. Can you please 
clarify how you able to use it step by step.

Original issue reported on code.google.com by dmonak...@gmail.com on 16 Feb 2012 at 5:49

GoogleCodeExporter commented 8 years ago
Seems like permission issue still exist
BTW sdptool browse local works fine.
haggle service strace looks follows:

ioctl(63, 0x800448d2, 0xbec281d4)       = 0
ioctl(63, 0x800448d3, 0xbec2839c)       = 0
socket(PF_BLUETOOTH, SOCK_RAW, 1)       = 65
bind(65, {sa_family=AF_BLUETOOTH, sa_data="\0\0\0\0\0\0 ,\25\0��\0\0"}, 4) 
= 0
getsockopt(65, SOL_IP, IP_TTL, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f�", [16]) = 0
setsockopt(65, SOL_IP, IP_TTL, "\20\0\0\0\1�\0\0\0\0\0@\24\f\0\0", 16) = 0
writev(65, [{"\1", 1}, {"\24\f\0", 3}], 2) = 4
poll([{fd=65, events=POLLIN, revents=POLLIN}], 1, 1000) = 1
read(65, "\4\16�\1\24\f\0Nexus One\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 260) 
= 255
setsockopt(65, SOL_IP, IP_TTL, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f�", 16) = 0
close(65)                               = 0
ioctl(63, 0x400448dd, 0xbec28190)       = -1 EACCES (Permission denied)
write(2, "Can't set scan mode on hci0: Per"..., 52) = 52
write(2, "Could not force discoverable mod"..., 60) = 60
gettimeofday({1329418345, 11408}, NULL) = 0

Original comment by dmonak...@gmail.com on 16 Feb 2012 at 6:55