0

I am working on a project that allow me to control a robot, using rpi, in bluetooth. I have a lot worked on bluetooth and I all work fine in android.

But in iOS it's ... very strange...

I transformed my raspberry into a iBeacon and with an application like Locate (iBeacon) I can see it. I have sucessfully paired my rpi with my iPhone using this tutorial : http://www.wolfteck.com/projects/raspi/iphone/

But even if the rpi is paired it is not visible in bluetooth setting, bluetooth terminal application like (BluTerm and BluetoothLE) and on my cross platform ionic-cordova app using this plugin: don/BluetoothSerial.

To be clear:

what I have:

  • rpi 2 and this bluetooth module: http://plugable.com/products/usb-bt4le
  • Bluez 5.11 installed
  • All bluetooth serial communication working on android
  • Raspberry and iPhone(ios 8.2) paired together. The pairing request from the rpi because ios bluetooth settings don't see my raspberry.
  • Raspberry transformed in beacon and visible with locate app.

What I want:

  • raspberry visible in bluetooth setting/ bluetooth terminal application like (BluTerm and BluetoothLE). Because my cross platform app use the native scan system and terminal like communication.

Some settings :

pi@raspberrypi $ hciconfig hci0 -a
hci0:   Type: BR/EDR  Bus: USB
    BD Address: 5C:F3:70:6B:37:6E  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING PSCAN ISCAN
    RX bytes:9744 acl:101 sco:0 events:300 errors:0
    TX bytes:7945 acl:104 sco:0 commands:149 errors:0
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH SNIFF
    Link mode: SLAVE ACCEPT
    Name: 'raspberrypi-0'
    Class: 0x420100
    Service Classes: Networking, Telephony
    Device Class: Computer, Uncategorized
    HCI Version: 4.0 (0x6)  Revision: 0x1000
    LMP Version: 4.0 (0x6)  Subversion: 0x220e
    Manufacturer: Broadcom Corporation (15)

pi@raspberrypi $ sudo python3 listPairedDevice.py  
18:3A:2D:F5:61:D5 //bdaddr of android device
F4:F1:5A:C6:DD:33 //bdaddr of ios device

pi@raspberrypi $ sudo bluez-test-device trusted F4:F1:5A:C6:DD:33
1

Command for transform my raspberry into a iBeacon:

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 00 00 00 C8 00
0

Bluetooth Serial Modules like HC-05 and HC-06 might interest you. These modules connect through the UART pins (6,8,10) and provide terminal access via the Blueterm.

Your statement "terminal like communication" led me to think terminal access via bluetooth. Hence my suggestion. I do have a HC05 (and HC06) that i use to get console access.

  • No. You won't be able to use a classic bluetooth module with an iDevice unless it is MFI certified, which the HC-05/HC-06 are not. – Chris Stratton Nov 25 '15 at 6:07
  • Hi Chris, I read a little on MFI certified device, there is a way to do it simply for test without company and apple contact ? – Adrien M Nov 26 '15 at 8:47
  • Hi Vittal, thanks for your answer. Are you sur about HC-05/06 and iPhone connection ? Have you a link to a working project or tutorial? – Adrien M Nov 26 '15 at 8:49
1

If it's not visible in your scanning turn Bluetooth advertising ON with:

sudo hciconfig hci0 leadv
  • Hi HallMark, thank you for the answer even if the project is finish now (I just don't use iOS). Bluetooth advertising was ON. Android device could see my device so advertising was on. – Adrien M Aug 2 '16 at 14:24
  • @AdrienRobotLabo: You have used RFCOMM or L2CAP on Raspberry Pi side to get it working with Android? – HallMark Aug 3 '16 at 4:03
  • I have used RFCOMM from command line and pybluez (don't know which protocol pybluez use) from programming. – Adrien M Aug 4 '16 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.