Uncategorized

Bluetooth testing notes

Asked 
Active today
Viewed 184 times
0

Thanks for your edit!
This edit will be visible only to you until it is peer reviewed.

I’m trying to connect my rpi0 w to any android device via Bluetooth LE(low energy) , i can pair but i can’t connect them ,an error always showed (Connection failed,No usable services on this device ) on vnc and (Failed to connect:org.bluez.Error.Failed) in terminal , i tried with stretch and Jessie version but no connection!i followed the tutorial of adafruit with the new version of bluez 5.50 [https://www.youtube.com/watch?v=5fQR2PHMDWE] but i found the same problem , please help !

  • 1
    I read that for some old jessie/stretch config, Rpi3B+ BLE crashes with Rpi built UART. A similar thing is that Rpi Console crashes with Rpi built in UART. So my suggestion are: (1) use Rpi USB UART instead of Rpi built in UART. (2) for initial testing, do not use SSH/VNC (disable console and enable UART in the Rpi config menu), to avoid above possible conflicts. (3) To make sure your Rpi software (python smbus) and hardware wiring is OK, try looping back test. – tlfong01 May 27 at 3:09   
  • Actually beside Console serial, Blue Tooth, SHS, VNC etc, all other serial stuff might clash with Rpi built in UART. For example, if you are using “One Wire” to talk to sensors such as DHT22, you also need to disable “One Wire” in the RpiConfig menu, beside Console Serial. The annoying thing is that if you don’t disable “OneWire”, the Rpi built in UART just ignores your serial commands and do nothing, WITHOUT giving you any warning or error messages, – tlfong01 May 27 at 6:09   
  • Thank you for your response , i’m new to rpi so i took a little time to understand your suggestion , i haven’t an Rpi USB UART i have to connect just with the rpi 0 w , but i’ve tried to disable ssh/vnc/1-wire /console serial like u said it gives me the same error , did i have to setup the UART on my rpi to enable it ! Is the Rpi USB UART necessary fo connection without error ? thank you in advance – ninpi May 28 at 0:08
  • If it’s necessary Is that cable what you mean ?shop.pimoroni.com/products/usb-to-uart-serial-console-cable– ninpi May 28 at 0:24
  • I seem to have misunderstood your situation. If your Rpi has successfully “paired” with the Android device, say an android smart phone, then they are “connected”. Now you can transfer files using an “transfer files” app, or “FTP server” app. Perhaps you can let us know if you have another BLE device such as HC10 BLE serial adapter between Rpi and Android phone. – tlfong01 May 28 at 6:00   

1

Question

Connect my RpiZW to Android device through BLE,Bluez 5.5

Can pair but can’t connect them,

Error “Connection failed, No usable services” on VNC,

Error “Failed to connect:org.bluez.Error.Failed) in terminal

Answer

Update 2019jul31hkt1246

Test Setup

I use the following to test three Bluetooth speakers:

  1. SamSung Galazy C9 Pro
  2. Acer Aspire Intel Core i5 Win 10 PC with USB Bluetooth dongle, Bluetooth Driver Intel 14/11/2016 19.30.1646.851
  3. Rpi4B Raspbian 10 buster 2019jul10 version, preinstalled bluez utitilies

I tested the following three Bluetooth speakers:

  1. Creative MUVO 2,
  2. Rapoo A500,
  3. Mi NDZ-03-GB

Test Results

  1. SamSung Galazy C9 Pro all three Bluetooth speaker paired easily and smoothly.
  2. Acer Aspire WinPC Intel Bluetooth river can pair MUVO2, Rapoo A500, but never Mi NDZ03GB
  3. Rpi4B onboard Bluetooth can only pair and connect Creative MUVO2 paired and connected smoothly. Can pair other two, but cannot connect.

Pairing note

Rpi4B need to reboot every time, otherwise cannot connect.

Conclusion

Rpi4B on board Bluetooth is weak comparing to SamSung smart phone and WinPC with Bluetooth dongle.

Update 2019jul30hkt1505

Rpi4B Raspbian 10 buster and three BlueTooth Speaker Evaluation Notes

Some months ago I tried to pair/connect a couple of Bluetooth devices with my Rpi3B+ and found everything disappointing: difficult/unreliable/intermittent failing to discover/pair/connect the BT devices. I googled and found no useful help around. So I gave up, waiting for Rpi4B to come along. I also bought two more Bluetooth speakers to try.

Now the time has come for me to try again. I first tried to pair the three speakers with my Samsung smart phone and everything went well, implying both BT speakers are working OK.

I then tried the following with all three speakers, Creative, XiaoMi, Rapoo. The procedure is:

(a) reboot Rpi4B (important to get repeatable/reliable results),

(b) GUI Deskop top right hand corner BT icon to discover/pair the speaker,

(c) when paired, click the speaker icon (beside WiFi icon) to check “connection” and adjusting volume,

(d) play a mp3 file using VLC media player. I found that I can always pair and “connect” (VLC to connect to speaker) with the Creative BT speaker. But for the XiaoMi and Rapoo BT speakers, I can always “pair”, but never “connect” (system error message is “cannot use “default”speaker, or speaker icon always red crossed)

So my conclusion is that Rpi4B BT works reliably with my Creative speaker but not XiaoMi or Rapoo. Creative speaker costs twice of the other two, so I think its power is perhaps also twice bigger or sensitive. Anyway, I tried to do more evaluation, I found I could no longer detect nor pair, not to mention connect. I guessed the Rpi4 chips must had been heated up and became crazy. So I waited for 20 minutes or and and also added heat sinks to the chips. Then everything comes back normal again. My second quick and dirty conclusion is that Rpi4B, if heated up, might go crazy!

So for now I am only using the Creative Bluetooth speaker which I found very stable and reliable. Every time I want to use my VLC media player to play music, I do the following:

(1) Reboot Rpi4B Raspbian 10 Buster Jul 10,

(2) Pair speaker (clicking BlueTooth icon),

(3) Connect speaker and adjust volume (clicking speaker icon),

(4) Use VLC to play music. The pairing is smooth, almost detected /pairing smoothly first time, very stable, no disconnecting/dispairing for the 2 hours testing.

I once thought about using an USB BT dongle to replace on board weak BT guy, but too lazy to do it now. 🙂


Installing BlueTooth, BlueZ, and FTP packages for Raspbian stretch 9

I first installed the bluetooh and ftp packages for testing.

installing packages

Testing Android Smart Phone Samsung Galaxy C9 Pro App to connect to Rpi3B+ using Bluetooth

I then tried the Android apps ftp server/client and send files (Bluetooth File Transfer), but found both not working. Error message is something like no ftp blue services, …

I guess there is some incompatability problem with stretch 9 and the androd app. I need to try again later.

I once found it OK to connect Rpi to Bluetooh serial modules HC05/HC05, and also HC05/HC06 to android phone and found everything OK communicating using text (serial 9600N81). So I think I better try again with BLE HC10, to see if I missed anything important. Then I will come back to try Rpi direct bluetooth to android again.

BLE module

/ to continue, …

References

Banggood JDY-10 bluetooth 4.0 Module BLE bluetooth Serial Port Module Compatible With CC2541 Slave – HK$24

JDY10 BlueTopoth 4.0 CC2541 Compatible BLE Serial Slave Module CC2541 – ¥7.80

AliExpress JDY10 CC2541 Compatible Bluetooth 4.0 BLE Serial Slave Module – US$2.14

Operating voltage: 1.9 – 3.6 V

Communication distance: 100 meters

Bluetooth 4.0, 2.4 GHZ, GFSK, 8db, 80 metres

Cypress Wireless Connectivity to Rpi3B+ – 2018mar15

Cypress Wi-Fi + Bluetooth Combos

7 Best Bluetooth Modules for Raspberry Pi – Tayyaba Dar 2019jun03

  • Hi, The problem is that i am obliged to use only the bluetooth LE integrated in the RpI, I can’t use other parts!– ninpi May 28 at 13:17
  • I see. I found that if you use Rpi directly use BLE connected to Android phone, then you can use FTP app to transfer files, or phone number files etc. You can set up FTP server/client. If you use BLE serial module, then you can do serial communication, using either Rpi or Android phone as text terminal. As I said earlier, I tried the FTP direct connect method and but no luck. Perhaps I will try later. – tlfong01 May 28 at 13:26   
  • Thank you for your help despite not understanding where the error comes from! please if you find a solution let me know ! – ninpi May 28 at 19:37
  • Problem. You too and good luck. Actually I think this is a BLE newbie FAQ. I hope other ninjas can help us. – tlfong01 May 29 at 0:33   
  • Thanks ,i hope too !! – ninpi May 29 at 3:03
  • @ninpi I am making little progress on bluetooth stuff. I found bluez not that newbie friendly and I read the following discussion saying bad words about it. raspberrypi.stackexchange.com/questions/96207/… – tlfong01 Jun 9 at 1:42    
  • Thank you for this information, I already changed the connection protocol because of the constraint of time, I will not use the bluetooth despite that I lost a lot of time in it, but it’s ok! Thanks again – ninpi Jun 9 at 12:13
  • Thank you for your reply. I agree that we both lost a lot of time. But perhaps we both learnt something, such that Rpi is not that ideal, and we need to change our direction if we found schedule too tight. I am lucky not to have any deadline. So I will go slowly, and in case of any good news, I will remember to share with you, and other visitors of this post. Good luck to your project! – tlfong01 Jun 9 at 13:22   
  • I will be glad if you share with me ! Thank you – ninpi Jun 9 at 14:18

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: