Skip to contentSkip to conversation

A PAN newbie

Bluez-users Eduardo Bezerra 3 participants 7 messages Mar 16, 2005 – Mar 17, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi folks,

I'm starting to use Bluez to create a PAN. I'm using the 2.6.x linux kernel.
I did the following:

####
GN:
####

Edited the file /etc/bluetooth/hci.conf and enabled the "lm accept, master" option.

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# sdptool add GN 
# modprobe bnep
# pand --listen --role GN -n

####
PANU:
####

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS

After the connection establishment I configured a LAN with the 10.0.0.0/24 IP
configuration. So:

####
GN:
####

# ifconfig bnep0 10.0.0.1 netmask 255.255.255.0

####
PANU:
####

# ifconfig bnep0 10.0.0.2 netmask 255.255.255.0

At this point I could ping the two host:

####
GN:
####

# ping 10.0.0.2 # that's ok

####
PANU:
####

# ping 10.0.0.1 # that's ok

So, I tried to add a second PANU with:

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS

It connected with the GN, but when I tried:

# ifconfig bnep0 10.0.0.3 netmask 255.255.255.0
# ping 10.0.0.1

The ping could not reach the GN host even the other
PANU (ping 10.0.0.2). I tried to do a ping from the GN to the new PANU and from the old PANU to the new PANU and the problem kept.

What am I doing wrong?

Any help is very welcome.

cheers,

Eduardo Bezerra Valentin

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Eduardo,

Quoted 64 lines

I'm starting to use Bluez to create a PAN. I'm using the 2.6.x linux kernel.
I did the following:

####
GN:
####

Edited the file /etc/bluetooth/hci.conf and enabled the "lm accept, master" option.

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# sdptool add GN 
# modprobe bnep
# pand --listen --role GN -n

####
PANU:
####

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS

After the connection establishment I configured a LAN with the 10.0.0.0/24 IP
configuration. So:

####
GN:
####

# ifconfig bnep0 10.0.0.1 netmask 255.255.255.0

####
PANU:
####

# ifconfig bnep0 10.0.0.2 netmask 255.255.255.0

At this point I could ping the two host:

####
GN:
####

# ping 10.0.0.2 # that's ok

####
PANU:
####

# ping 10.0.0.1 # that's ok

So, I tried to add a second PANU with:

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS
Quoted 8 lines

It connected with the GN, but when I tried:

# ifconfig bnep0 10.0.0.3 netmask 255.255.255.0
# ping 10.0.0.1

The ping could not reach the GN host even the other
PANU (ping 10.0.0.2). I tried to do a ping from the GN to the new PANU and from the old PANU to the new PANU and the problem kept.

you will get a second (bnep1) interface on the master machine and thus a bridge is needed to connect these.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw

Hi all,

Thanks for the quick response. It's truth that I get a second bnep
in the GN, the bnep1. But
I tried to continue the configuration with a "ifconfig bnep1 10.0.0.4" and the problem kept.
I thinked that at this point (with the two PANU connected and configured), I could ping
the bnep0 with the old PANU and ping the bnep1 with the new PANU, even without the
bridge configuration in the GN.
Ok, and how can I do a bridge configuration in the master ?? Is it just creating statics routes between the two bnep's?

Thanks a lot,

Eduardo Bezerra Valentin

Quoted 82 lines · Marcel Holtmann

Hi Eduardo,

Quoted 64 lines

I'm starting to use Bluez to create a PAN. I'm using the 2.6.x linux kernel.
I did the following:

####
GN:
####

Edited the file /etc/bluetooth/hci.conf and enabled the "lm accept, master" option.

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# sdptool add GN
# modprobe bnep
# pand --listen --role GN -n

####
PANU:
####

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS

After the connection establishment I configured a LAN with the 10.0.0.0/24 IP
configuration. So:

####
GN:
####

# ifconfig bnep0 10.0.0.1 netmask 255.255.255.0

####
PANU:
####

# ifconfig bnep0 10.0.0.2 netmask 255.255.255.0

At this point I could ping the two host:

####
GN:
####

# ping 10.0.0.2 # that's ok

####
PANU:
####

# ping 10.0.0.1 # that's ok

So, I tried to add a second PANU with:

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# modprobe bnep
# pand --connect BT_ADDRESS
Quoted 8 lines

It connected with the GN, but when I tried:

# ifconfig bnep0 10.0.0.3 netmask 255.255.255.0
# ping 10.0.0.1

The ping could not reach the GN host even the other
PANU (ping 10.0.0.2). I tried to do a ping from the GN to the new PANU and from the old PANU to the new PANU and the problem kept.

you will get a second (bnep1) interface on the master machine and thus a bridge is needed to connect these.

Regards

Marcel

Quoted 10 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Hi Eduardo,

Quoted 9 lines

Thanks for the quick response. It's truth that I get a second bnep
in the GN, the bnep1. But
I tried to continue the configuration with a "ifconfig bnep1 10.0.0.4" and the problem kept.
I thinked that at this point (with the two PANU connected and configured), I could ping
the bnep0 with the old PANU and ping the bnep1 with the new PANU, even without the
bridge configuration in the GN.

get yourself a network howto to understand why this is not working.

Quoted 2 lines

Ok, and how can I do a bridge configuration in the master ?? Is it just creating statics routes between the two bnep's?

The bridge is another virtual network card the combines your two BNEP interface into a new one. This is of course not all a bridge can do, but this is what you need. However this is not BlueZ specific. This is about network administration and thus read a howto about that or take a look at the PAN howto.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw

Hi Marcel,

Thanks. I will get.

Quoted 27 lines · Marcel Holtmann

Hi Eduardo,

Quoted 9 lines

Thanks for the quick response. It's truth that I get a second bnep
in the GN, the bnep1. But
I tried to continue the configuration with a "ifconfig bnep1 10.0.0.4" and the problem kept.
I thinked that at this point (with the two PANU connected and configured), I could ping
the bnep0 with the old PANU and ping the bnep1 with the new PANU, even without the
bridge configuration in the GN.

get yourself a network howto to understand why this is not working.

Quoted 2 lines

Ok, and how can I do a bridge configuration in the master ?? Is it just creating statics routes between the two bnep's?

The bridge is another virtual network card the combines your two BNEP interface into a new one. This is of course not all a bridge can do, but this is what you need. However this is not BlueZ specific. This is about network administration and thus read a howto about that or take a look at the PAN howto.

Regards

Marcel

Quoted 10 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#5 lore raw
In reply to Eduardo Bezerra
Quoted 11 lines

####
GN:
####

Edited the file /etc/bluetooth/hci.conf and enabled the "lm accept, master" option.

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# sdptool add GN # modprobe bnep
# pand --listen --role GN -n

Sorry if I'm wrong but i think the newest version of pand do the sdp stuff (you don't need sdptool add GN)

Please correct me if I'm wrong ...

Regards,
Xavier Garreau

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#6 lore raw

Hi Xavier,

Quoted 13 lines
Quoted 4 lines

####
GN:
####

Quoted 8 lines

Edited the file /etc/bluetooth/hci.conf and enabled the "lm accept, master" option.

# hcid -f /etc/bluetooth/hci.conf
# sdpd
# sdptool add GN 
# modprobe bnep
# pand --listen --role GN -n
Quoted 4 lines

Sorry if I'm wrong but i think the newest version of pand do the sdp stuff (you don't need sdptool add GN)

Please correct me if I'm wrong ...

this is correct. The latest pand and dund version add the SDP record unless you call them with --nosdp.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users