ykasidit
Posts: 21
Joined: Sun Jul 14, 2013 10:58 pm
Location: Thailand
Contact: Website

Re: Bluetooth Access Point

Sun Jan 19, 2014 9:56 am

Douglas6 wrote:Thanks, my CSR 4.0 dongle arrives tomorrow, it will be interesting to see what problems it solves.
I did some more tests on my Nexus 5 using Bluetooth internet through a CSR 4.0 dongle (looks similar to the link you posted - mine looks like: http://www.clearevo.com/bluetooth_usb_d ... dapter.jpg)

As I stated earlier, I am facing problems on the Nexus 5 (running Kitkat which uses Bluedroid) and from the tests today I think it is quite similar to what you described earler - what I face today is summarized as: The nexus-5 'It would connect to the bluetooth access pont, internet would work, but after any data-intense usage - like running a Speedtest.net app - it would reach 1.7 Mbps max, but internet would hang soon after.'

I did the test like the following method:
1. Open a terminal (you can use terminal-emulator app or adb shell), run:
ping 192.168.1.1 (or any other local ip in your nw)
... it would keep on giving ping results - showing that things still work...
2. Open the Ookla speedtest.net app (from Google Play), do a test - after the test finishes, check back with the terminal in [1.] if the ping is still running. Restart a speedtest session to be more sure.

Using the method above. Results:
- Nexus 5 on Kitkat - ping would go on regularly for many minutes if I just leave the phone idle, then I open the speedtest.net app, did a test, getting good results like ping to its server at around 50ms, DL Max Speed at 1.7 Mbps. But after the first speedtest test, back to the ping terminal: the ping stops then shows "Destination Host Unreachable" soonafter. I can't restart the speedtest test anymore - it would show "network communication issues", if I re-do my own ping again in the adb terminal, it would get "Destination Host Unreachable".
- An Android 4.2.2 tablet (likely using BlueZ) had no problems, ping goes on well even after 2 speedtest.net tests.

Would also like to share that in the past, the same Bluetooth Access Point was used for testing Youtube HQ playback for over 6 hours (until the battery finished) with no network issues as in http://www.clearevo.com/ecodroidlink/bl ... nsumption/ - that was a Sony Xperia V on a non-kitkat android.

To summarize, for now, I guess there might be a problem in the Bluedroid stack causing the Kitkat phone to have problems while using Bluetooth Internet. This is just one issue I face with Bluedroid, there are many others too but haven't documented like failures while transferring files with my friend's nexus 5 - stuck at 33% once although sitting near (never had issues on nexus 4 with older non-kitkat android).

This makes me think that maybe they don't care so much about the bluetooth-networking since so few Android users use it, most Android users use only WIFI for home and 3G, LTE for the rest. The trend might be to use LTE everywhere with small cells that could eventually replace WIFI too. Bluetooth internet which is quite slow and buggy as we see might tend to have quite a dark future - most are going towards the bluetooth low-energy applications... but I don't know about interesting bt-le projects yet - any ideas? links to interesting bluetooth projects?

By the way, does anyone know if/how Bluetooth internet is used in any existing industrial applications? Just want to get more ideas on how to make all of this more practical/beneficial apart from Android internet access.

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

Re: Bluetooth Access Point

Sun Jan 19, 2014 4:28 pm

My 'CSR 4.0' dongle arrived from Adafruit, but unfortunately produces exactly the same results as the two other dongles I've tried; a 'transmit queue 0 timed out' error. Could be an Android problem, could be the 'CSR' knock-off chips from China, could be something else. Frustratingly, I'm going to have to cut my losses on this particular project.
[EDIT: Sorry Kasidit, I just now saw your latest post. Your results with Kitkat match mine, and I agree that the use case is just too edgy to expect any quick fixes from Google (leave it to them to choose a Bluetooth stack even more frustrating than BlueZ!) The only LE project I've seen tell about is Apple's iBeacon, a proximity sensor/tracking application intended for in-store advertising, apparently. The future of bluetooth seems to be the future of computers in general; more tracking, surveillance and marketing.]

shreyansh_k
Posts: 3
Joined: Mon Sep 15, 2014 12:59 pm

Re: Bluetooth Access Point

Mon Sep 15, 2014 2:28 pm

Started with a fresh install of Raspbian on RasPi (512MB) and proceeded according to the instructions given on Github page. Devices do pair and connect to 'NAP' service and shows that it is connected but cannot access Internet. During troubleshooting, I observed that connected devices cannot interact between themselves, tend to operate isolated and can't even obtain IP from the DHCP server present on the router.
Does anybody have ideas about what is going on?

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

Re: Bluetooth Access Point

Mon Sep 15, 2014 5:28 pm

There are a couple functionally similar Github pages mentioned in this thread: ykasidit's https://github.com/ykasidit/ecodroidlink, and my own https://github.com/Douglas6/pinaple. Which one are you having trouble with? It's been a little while, but I'll review the pertinent code. Initially it sounds like packet-forwarding has not been enabled.

Also please include as much info as you can about your set-up and what you're trying to do; your /etc/network/interfaces file (with personal info removed), and an ifconfig output from the pi when device or devices are connected, and any info you can get from the BT devices like OS versions, IP's and gateways, for starters.

This thread discusses Internet tethering, I'm not sure that local networking of devices is supported, tho I can't think why not either, off-hand.

shreyansh_k
Posts: 3
Joined: Mon Sep 15, 2014 12:59 pm

Re: Bluetooth Access Point

Mon Sep 15, 2014 7:41 pm

I'm using ecodroidlink and this is the output of /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Here is the output of ifconfig on Pi
edl_br0 Link encap:Ethernet HWaddr b8:27:eb:XX:XX:XX
inet addr:192.99.77.249 Bcast:192.99.77.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fec2:5ec9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2379 errors:0 dropped:0 overruns:0 frame:0
TX packets:1128 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:153272 (149.6 KiB) TX bytes:140428 (137.1 KiB)

eth0 Link encap:Ethernet HWaddr b8:27:eb:XX:XX:XX
inet6 addr: fe80::ba27:ebff:fec2:5ec9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2631 errors:0 dropped:0 overruns:0 frame:0
TX packets:1338 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:173963 (169.8 KiB) TX bytes:181839 (177.5 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)
"cat /proc/sys/net/ipv4/ip_forward" on my Pi returns "1"

Devices include Win7 on laptop, Ubuntu on desktop, Android 4.2 to 4.4 on various handhelds.

My setup consists of a modem (with DHCP server enabled over 192.99.77.1/24) and a Pi connected together using an 8-port switch full-time while I can connect my laptop and desktop to this same switch on demand.

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

Re: Bluetooth Access Point

Mon Sep 15, 2014 9:44 pm

There should be bnep devices showing up in ifconfig if the BT devices have successfully connected to the Pi and been added to the NAP service.

When you connect a device, is there an option to 'use for internet tethering'? I think that's what my Android phone labels the checkbox.

You might want to step through the original guide by 'Howdy', mentioned early in this thread and step through it manually before attempting one of the more automated scripts.

shreyansh_k
Posts: 3
Joined: Mon Sep 15, 2014 12:59 pm

Re: Bluetooth Access Point

Tue Sep 16, 2014 5:07 am

A network connection named bnepX (X = some number) does show up in "ifconfig -a" or "ifconfig bnepX" with the same MAC address as that of the Bluetooth adapter but doesn't show up in plain simple "ifconfig" command. This is something I'm also scratching my head upon because a fresh install is also having this problems.
Yes, I did managed to connect to the NAP service with other devices and a bnep connection for every connected device does shows up with "ifconfig -a" and I tried manual bridging but whenever I try to add a bnepX device to the bridge, it reports "can't add bnepX to bridge Invalid argument" :?

Return to “Networking and servers”