Bluetooth PAN / internet access point November 27, 2010 03:43AM |
Registered: 13 years ago Posts: 3 |
Re: Bluetooth PAN / internet access point December 03, 2010 03:05PM |
Registered: 13 years ago Posts: 2 |
auto lo br0 iface lo inet loopback iface br0 inet dhcp bridge_ports eth0 bridge_fd 5 bridge_stp noThis defines bridge br0 and adds eth0 as the first interface. Several sources on the 'net recommend to set bridge_fd to 5 or even 0. I didn't care much, so I took a less aggressive value. It's important to not configure eth0 anywhere in the file.
$ brctl show bridge name bridge id STP enabled interfaces br0 8000.0010751adc57 no eth0
# Configuration file for the network service # This section contains options which are not specific to any # particular interface [General] # Disable link encryption: default=false #DisableSecurity=true [PANU Role] # Network interface name for PANU for connections. default:bnep%d # (up to 16 characters) #Interface= # PAN user connection interface up script. default:none Script=avahi-autoipd [GN Role] # Network Interface name for Group Network server. default:pan0 #Interface= # Group Network connection interface up script. default:none Script=avahi-autoipd [NAP Role] # Network Interface name for Network Access Point server. default:pan1 Interface=br0 # Network Access Point connection interface up script. default:none #Script=dhclientWe don't care about the PANU interface name. The default naming scheme is ok.
/etc/init.d/bluetooth startIf not yet done, insert your bluetooth adapter now and get your PAN client ready (cell phone, PDA, ...).
./test-adapter name honeypotEnable pairing and discovery:
./test-adapter pairable on ./test-adapter discoverable on ./test-adapter discoverabletimeout 30Setting a discovery timeout is optional here.
./simple-agentIt'll sit there and wait for pairing requests from a client. So initiate pairing/connecting with honeypot from your device. My cell phone first asks for a PIN code, then the simple-agent is triggered over the air and asks for the same PIN. Enter it and wait for your device to acknowledge the matching PIN. Once pairing is accomplished you can terminate simple-agent.
./test-device trusted <client-MAC> yesYou can look-up the <client-MAC> at any time with
cat /var/lib/bluetooth/<adapter-MAC>/names
Dec 3 21:51:59 dock-box-1 bluetoothd[988]: link_key_request (sba=<adapter-MAC>, dba=<client-MAC>) Dec 3 21:52:00 dock-box-1 bluetoothd[988]: Added new connection: bnep0 Dec 3 21:52:00 dock-box-1 kernel: [86681.186494] device bnep0 entered promiscuous mode Dec 3 21:52:00 dock-box-1 bluetoothd[988]: bridge br0: interface bnep0 added Dec 3 21:52:00 dock-box-1 kernel: [86681.197957] br0: port 2(bnep0) entering learning state
$ brctl show bridge name bridge id STP enabled interfaces br0 8000.0010751adc57 no bnep0 eth0
Re: Bluetooth PAN / internet access point December 04, 2010 02:38PM |
Registered: 13 years ago Posts: 3 |
auto eth0 iface eth0 inet manual auto bridge0 iface bridge0 inet dhcp pre-up ifconfig eth0 down pre-up brctl addbr bridge0 pre-up brctl addif bridge0 eth0 pre-up ifconfig eth0 up post-down ifconfig eth0 down post-down brctl delif bridge0 eth0 auto pan1 iface pan1 inet manual pre-up brctl addbr bridge0 pre-up brctl addif bridge0 $IFACE up ifconfig $IFACE 0.0.0.0 up down ifconfig $IFACE down post-down brctl delif bridge0 $IFACE # The loopback network interface auto lo iface lo inet loopback
Re: Bluetooth PAN / internet access point December 05, 2010 05:01AM |
Registered: 13 years ago Posts: 2 |
Re: Bluetooth PAN / internet access point December 05, 2010 09:09AM |
Registered: 13 years ago Posts: 3 |
petitprince
Re: Bluetooth PAN / internet access point September 03, 2011 06:52AM |
Taifur
Re: Bluetooth PAN / internet access point November 01, 2012 04:51PM |