Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]bluetooth TCP/IP: connect to remote host from Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DMoL
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2006
Posts: 100
Location: Minsk, Belarus

PostPosted: Wed Mar 11, 2015 10:32 am    Post subject: [solved]bluetooth TCP/IP: connect to remote host from Gentoo Reply with quote

Hello!

I try to follow some instructions from [1] to connect my gentoo box (client role) to rasberry-pi box (server role).

I have already paired and marked "trusted" the related sides.

But when I try to connect to rasberry-pi via test-network (shipped in sources of bluez-5.25) I got the following error message:

Code:

/test-network  00:1A:7D:0A:BC:75
Traceback (most recent call last):
  File "./test-network", line 42, in <module>
    iface = network.Connect(service)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist


The bnep0 local network interface isn't crated. As far as I can understand it even does not tries to connect. What should I do?

[1] https://wiki.gentoo.org/wiki/Bluetooth_Network_Aggregation_Point

Thanks for any help!

WBR[/code], basiliscos


Last edited by DMoL on Sun Mar 22, 2015 4:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 508
Location: North~Sea~Coa~s~~t~~~

PostPosted: Wed Mar 11, 2015 3:49 pm    Post subject: Reply with quote

Hi, I'm also using the NAP setup from mentioned wiki. Since Bluez5 and/or recent /etc/init.d/bluetooth, I have to initialize the device to make it work.
Code:
# hciconfig       
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:09:DD:XX:XX:XX  ACL MTU: 310:10  SCO MTU: 64:8
        DOWN
        RX bytes:537 acl:0 sco:0 events:24 errors:0
        TX bytes:329 acl:0 sco:0 commands:22 errors:0
                                                                                                                                   
# hciconfig hci0 up                                                                                                       
# hciconfig
hci0:   Type: BR/EDR  Bus: USB                                                                                                     
        BD Address: 00:09:DD:XX:XX:XX  ACL MTU: 310:10  SCO MTU: 64:8                                                               
        UP RUNNING PSCAN                                                                                                           
        RX bytes:1056 acl:0 sco:0 events:49 errors:0                                                                               
        TX bytes:917 acl:0 sco:0 commands:47 errors:0                                                                               
           

Maybe this is the issue on your rasberry-pi (or gentoo box). From a desktop, applications like BlueDevil will do that automatically. This seems new behaviour according to this bug report.

I can't tell anything from the client roll perspective. I'm using the setup to connect an old cell phone to the network. Apps like Opera Mini and MidpSSH initiate the network connection. The phone is not rooted, so I can't test anything there.
Back to top
View user's profile Send private message
DMoL
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2006
Posts: 100
Location: Minsk, Belarus

PostPosted: Sun Mar 22, 2015 4:46 pm    Post subject: [solved]bluetooth TCP/IP: connect to remote host from Gentoo Reply with quote

Finally I have managed to find the solution.

Here is an original link http://www.xnos.org/linux/blue-linux/hardware/compaq-ipaq/rfcommppp-connection.html

I'm going to duplicate here - it might be useful for somebody if original page is gone. I assume the devices are already paired.

On gentoo box (server side):

Code:

rfcomm listen /dev/rfcomm0 5 (on 1st terminal)
pppd /dev/rfcomm0 115200 192.168.201.1:192.168.201.2 noauth nodetach (on another terminal).


That could be shortened to:

Code:

rfcomm watch /dev/rfcomm0 5 pppd /dev/rfcomm0 115200 192.168.201.1:192.168.201.2 noauth nodetach


On raspberry-pi box (client-side)

Code:

rfcomm connect /dev/bluetooth/rfcomm/0 00:A0:96:1F:21:81 5 (on 1st terminal)
pppd /dev/rfcomm0 115200 192.168.201.2:192.168.201.1 noauth nodetach


I've spent hours on determining how to do that with DUN/BNEP/PAN etc.; but I haven't found any reasonable solution. That's one is rather simple and useful for me.

wbr, basiliscos
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 508
Location: North~Sea~Coa~s~~t~~~

PostPosted: Sun Mar 22, 2015 5:37 pm    Post subject: Reply with quote

DMoL,

That's a brilliant way to have an extra NIC. :)

The speed is not bad. Could be around 1.5 Mbps with Bluetooth v2.


Cheers!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum