On Saturday, August 13, 2022 we will be working on the Adafruit Customer Support Forums. If you visit over the weekend and things are not complete yet, please check back later, https://adafruit.com/forumupdates
0

nRF51822 Reading data from iOS for PC
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

nRF51822 Reading data from iOS for PC

by universef2 on Tue Jun 28, 2022 6:41 pm

I am trying to use nRF51822 https://www.adafruit.com/product/2267#description for sending data from my iOS iPhone to Windows PC via BLE protocol. If I plug nRF51822 into the PC, is it possible to make PC into a BLE device discoverable by iPhone so that the iPhone can send data to?

I think this is possible according to the tutorial https://learn.adafruit.com/introducing-adafruit-ble-bluetooth-low-energy-friend/uart-test becaust the tutorial says "On the BLEFriend side we can see the 'testing' string that was sent from nRF UART in the terminal emulator". However in the FAQ it says "All of our Bluefruit LE modules currently operate in peripheral mode, which means they can only advertise their own existence via the advertising payload. The central device (usually your phone or laptop) is responsible for listening for these advertising packets, starting the connection process, and inititating any transactions between the devices." So I was confused.

At the same time, how will this dongle interface with the C# program I write for reading data on windows and the iOS program I write for sending data from iOS?

universef2
 
Posts: 1
Joined: Tue Jun 28, 2022 6:33 pm

Re: nRF51822 Reading data from iOS for PC

by adafruit_support_mike on Thu Jun 30, 2022 10:23 pm

It's technically possible, but won't be easy.. or fast.

Bluetooth splits devices into 'central' and 'peripheral' categories. Central devices initiate and control all data connections. Peripherals emit messages that announce their presence (called 'advertising'), but otherwise wait for a central device to connect and tell them what to do. That puts most of the cost and complexity in the central device, allowing peripherals to be smaller, simpler, less expensive, low power, and so on.

BLE is also a slow protocol. In practice, you can expect data transfer rates of maybe 2k per second.

Your iPhone can operate as a BLE central device, through an app like our Bluefruit LE Connect:

https://learn.adafruit.com/adafruit-cir ... le-connect

The nRF51822 can operate as a BLE peripheral, receiving data from the iPhone.

If you want to transfer that data to a computer, you'll probably need to do that through a USB connection. You could use a Serial connection like the Arduino IDE, or you could use a microcontroller that handles USB internally and have it register as a USB device like a keyboard.

The fact that it's possible doesn't mean it's a good idea though. Do you specifically need BLE instead of a more convenient protocol like Wifi?

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.