SydiByd
Posts: 2
Joined: Sat Jul 15, 2017 5:10 pm

Raspberry Pi Zero W+BLE protocol+Swift 3 iOS app

Sun Jul 16, 2017 2:02 pm

Hello,

I have to connect my iOS (Swift 3) application to my raspberry pi zero w via BLE protocol and interacting with.
I need to know how my application can connect to my raspberry pi? I can't understand how UUIDs work.


thank you in advance

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

Re: Raspberry Pi Zero W+BLE protocol+Swift 3 iOS app

Sun Jul 16, 2017 2:54 pm

The Adafruit website has a good, brief introduction to BLE: https://learn.adafruit.com/introduction ... troduction

SydiByd
Posts: 2
Joined: Sat Jul 15, 2017 5:10 pm

Re: Raspberry Pi Zero W+BLE protocol+Swift 3 iOS app

Mon Jul 17, 2017 5:40 am

Douglas6 wrote:The Adafruit website has a good, brief introduction to BLE: https://learn.adafruit.com/introduction ... troduction
Thanks for replay,
I'm not only talking about bluetooth, it's about using BLE in my Swift application for iOS to interact with my Raspberry Pi. In other words I'm developping an iOS application by Xcode for my Raspberry Pi Zero W, and I have to find a way to make a connection between my application and RPi.

So I'm cooking with a blend of Swift and Raspberry by adding a Bluetooth flavor.

tonyfedge
Posts: 1
Joined: Thu Feb 15, 2018 9:31 pm

Re: Raspberry Pi Zero W+BLE protocol+Swift 3 iOS app

Thu Feb 15, 2018 9:34 pm

I'm trying to do the same thing and at a loss now. I understand the UUID and have tried several commands to set a custom UUID. Then in my iOS code, I'm looking for that UUID either in the advertisement packet or in the peripheral object itself.

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 2A F2 D8 46 46 A4 4F 5B 84 AA D1 D4 3C 8E 18 8E 00 00 00 00 C5 00

It's possible my iOS code is seeing it, but the name isn't coming across and neither is the UUID I set.

Any help or pointing me in the right direction would be appreciated.

Thanks,
Tony

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

Re: Raspberry Pi Zero W+BLE protocol+Swift 3 iOS app

Fri Feb 16, 2018 11:07 am

You've set the advertising data, but I'm not sure you've turned on advertising. Try following that command with

Code: Select all

sudo hcitool cmd 0x08 0x000A 01

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 36 guests