User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Network Crashes when Bridging Bluetooth to Ethernet

Mon Dec 23, 2013 2:28 am

I've been trying to share a Pi's ethernet connection with my Nexus 4 phone over bluetooth. I've set up a bridge, Bluez will add the phone's bnep0 device to it, and it seems to work fine...for simple web browsing. As soon as I try something more data intensive like a speed test, or a YouTube video, the connection drops. My lack of networking knowledge is only exceeded by my complete ignorance of Bluetooth, so I'm appealing here for help.

My interfaces file couldn't get much simpler

Code: Select all

auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
    bridge-ports eth0
    bridge_fd 5
This, in /var/log/messages.log, is the only error indication I can see (specifically 'NETDEV WATCHDOG: bnep0 (): transmit queue 0 timed out'):

Code: Select all

Dec 22 20:07:55 raspberrypi kernel: [  323.684561] Bluetooth: re-auth of legacy device is not possible.
Dec 22 20:07:55 raspberrypi kernel: [  323.762093] device bnep0 entered promiscuous mode
Dec 22 20:07:55 raspberrypi kernel: [  323.767670] br0: port 2(bnep0) entered forwarding state
Dec 22 20:07:55 raspberrypi kernel: [  323.767809] br0: port 2(bnep0) entered forwarding state
Dec 22 20:08:00 raspberrypi kernel: [  328.771400] br0: port 2(bnep0) entered forwarding state
Dec 22 20:08:48 raspberrypi kernel: [  376.163304] ------------[ cut here ]------------
Dec 22 20:08:48 raspberrypi kernel: [  376.163375] WARNING: at net/sched/sch_generic.c:255 dev_watchdog+0x2ac/0x2cc()
Dec 22 20:08:48 raspberrypi kernel: [  376.163438] NETDEV WATCHDOG: bnep0 (): transmit queue 0 timed out
Dec 22 20:08:48 raspberrypi kernel: [  376.163454] Modules linked in: rfcomm bnep bridge ipv6 stp llc snd_bcm2835 btusb snd_soc_bcm2708_i2s regmap_mmio snd_soc_core regmap_spi snd_pcm evdev bluetooth snd_page_alloc regmap_i2c rfkill snd_compress snd_seq snd_timer snd_seq_device leds_gpio led_class snd
Dec 22 20:08:48 raspberrypi kernel: [  376.163579] CPU: 0 PID: 0 Comm: swapper Not tainted 3.10.24+ #614
Dec 22 20:08:48 raspberrypi kernel: [  376.163652] [<c00139f8>] (unwind_backtrace+0x0/0xf0) from [<c0010d5c>] (show_stack+0x10/0x14)
Dec 22 20:08:48 raspberrypi kernel: [  376.163715] [<c0010d5c>] (show_stack+0x10/0x14) from [<c001e574>] (warn_slowpath_common+0x4c/0x68)
Dec 22 20:08:48 raspberrypi kernel: [  376.163755] [<c001e574>] (warn_slowpath_common+0x4c/0x68) from [<c001e624>] (warn_slowpath_fmt+0x30/0x40)
Dec 22 20:08:48 raspberrypi kernel: [  376.163813] [<c001e624>] (warn_slowpath_fmt+0x30/0x40) from [<c03621ec>] (dev_watchdog+0x2ac/0x2cc)
Dec 22 20:08:48 raspberrypi kernel: [  376.163860] [<c03621ec>] (dev_watchdog+0x2ac/0x2cc) from [<c002af4c>] (call_timer_fn.isra.31+0x24/0x88)
Dec 22 20:08:48 raspberrypi kernel: [  376.163908] [<c002af4c>] (call_timer_fn.isra.31+0x24/0x88) from [<c002b178>] (run_timer_softirq+0x1c8/0x2a4)
Dec 22 20:08:48 raspberrypi kernel: [  376.163952] [<c002b178>] (run_timer_softirq+0x1c8/0x2a4) from [<c0025a08>] (__do_softirq+0xbc/0x19c)
Dec 22 20:08:48 raspberrypi kernel: [  376.163990] [<c0025a08>] (__do_softirq+0xbc/0x19c) from [<c0025b7c>] (do_softirq+0x48/0x54)
Dec 22 20:08:48 raspberrypi kernel: [  376.164052] [<c0025b7c>] (do_softirq+0x48/0x54) from [<c0025dec>] (irq_exit+0x8c/0xc8)
Dec 22 20:08:48 raspberrypi kernel: [  376.164089] [<c0025dec>] (irq_exit+0x8c/0xc8) from [<c000e9b0>] (handle_IRQ+0x34/0x84)
Dec 22 20:08:48 raspberrypi kernel: [  376.164141] [<c000e9b0>] (handle_IRQ+0x34/0x84) from [<c04023b4>] (__irq_svc+0x34/0xc8)
Dec 22 20:08:48 raspberrypi kernel: [  376.164208] [<c04023b4>] (__irq_svc+0x34/0xc8) from [<c000eb00>] (arch_cpu_idle+0x28/0x38)
Dec 22 20:08:48 raspberrypi kernel: [  376.164257] [<c000eb00>] (arch_cpu_idle+0x28/0x38) from [<c0051344>] (cpu_startup_entry+0x50/0xec)
Dec 22 20:08:48 raspberrypi kernel: [  376.164311] [<c0051344>] (cpu_startup_entry+0x50/0xec) from [<c0572a08>] (start_kernel+0x2f4/0x35c)
Dec 22 20:08:48 raspberrypi kernel: [  376.164328] ---[ end trace 828e1a2014334bd1 ]---
My ifconfig looks very much the same after as before the network disconnection (slightly redacted)

Code: Select all

ifconfig
bnep0     Link encap:Ethernet  HWaddr [redacted]
          inet6 addr: fe80::215:83ff:fe0c:bfeb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:819 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:58068 (56.7 KiB)  TX bytes:1610251 (1.5 MiB)

br0       Link encap:Ethernet  HWaddr [redacted]
          inet addr:192.168.1.80  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:feed:9452/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:982 errors:0 dropped:0 overruns:0 frame:0
          TX packets:265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:83663 (81.7 KiB)  TX bytes:27923 (27.2 KiB)

eth0      Link encap:Ethernet  HWaddr [redacted]
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1084 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2512670 (2.3 MiB)  TX bytes:99594 (97.2 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
I've posted up the scripts I wrote to help automate pairing, and registering the NAP service, in case someone else is interested in trying this out: https://github.com/Douglas6/pinaple.

Help!

Return to “Networking and servers”