Bluegiga set as a receiver with iPhone Peripheral - iphone

I have a BLE dongle named Bluegiga (BLED112).
Bluegiga USB dongle
By using the BLEGUI I can see my bluetooth GATT profile Service UUID and characteristic UUID.
While press the connect button it shows connected but, I am sending data from iPhone It is not received in BLEUI. The central (Bluegiga) is running in a windows PC.
If anyone used the Bluegiga dongle, please help me to correct the same for a data transfer from iPhone to the target.

Related

Can a peripheral request to a central for connection?

I am fairly new to BLE, recently I have done an experiment where I have made an iOS app which is central, it scan for a particular peripheral and connect to it and finally it writes something to the characteristics to do an action. Link: Swift-BLE . Now I have got a new project where the central would be the iOS app and the peripheral would be a raspberry pi 3 B+ running on Linux. It should have an on off switch for activating BLE link. Once On is should start scanning for ble peripheral devices. When getting a connection request from the Linux peripheral it should display the passcode and connect to it. Next it should sent it a long JSON string and read back a JSON string from the gatt profile.
I don't know how a peripheral request for a connection with the central, and how the central handle it. Any suggestion would be really helpful.
Again, my question is not how to discover, connect peripheral, my question is how can a peripheral send request to central for a connection & how the central process it. Is it possible ?

How can I advertise RFCOMM Bluetooth service programmatically with swift/Objective-C? or Connecting through ExternalAccessory Framework

I Need to advertise RFCOMM Bluetooth service programmatically from iPhone, I know that iPhone supports BLE only unless there is membership in MFI program, I have POS Device licensed from iPhone under MFI Program but I can not neither connect nor send/receive from iPhone, I have searched and found that ExternalAccessories could work with RFCOMM bluetooth profile but I don't how !?
I Tried this snippet but unfortunately it returns empty Array
let connectedAccessories = EAAccessoryManager.shared().connectedAccessories
but with no results ! and after connection how can I send/receive data between iPhone and my Point of sale machine ?
I have fixed it through External Accessory Framework, that's the only way to create a bluetooth channel between and iOS Device and MFI Accessory.
to check if your accessory under MFI Program or not check this URL : https://mfi.apple.com/MFiWeb/getAPS.action

Share iPhone's internet connection with a non apple device. Tethering

I have a non Apple device used to process some data. It has bluetooth support.
It can be paired with the iPhone via bluetooth.
The device must use iPhone's internet connection to access a remote server.
See the flow:
I pair the device with the iPhone in Settings->Bluetooth.
I use ExternalAccessory framework to send data to the paired device.
The device processes the data and uses iPhone's internet connection to send the data to a remote server.
There is no problem in pairing the device to iPhone ( no jailbreak, by the way ).
Also, the firmware of the device is to be modelled in order to sent https requests via a valid internet connection.
The problem is the tethering, that will allow the iPhone to share it's WIFI or 3G connection with the device.
All I have found so far is tethering the iPhone with a computer, but no word about other non apple devices.
Any idea/link?
Take into account:
The device has bluetooth hardware and can be legally paired with the iPhone, no jailbreak needed.
The data processed by the device MUST avoid the application, and go directly to the remote server: I am not allowed to get the data from the device and use NSURLConnection to pass it to the remote server.
Please suggest a way to share iPhone's internet connection with non apple device.

Remote control a microcontroller over bluetooth from a webapp on Iphone/ipad?

I have a microcontroller application that I will add a Bluetooth serial interface to.
Now I want to remote control the microcontroller from the Iphone (the user interface of the microcontroller application will show up in the iphone). I suppose the standard
way to to this is to develope an iphon app with Bluetooth support.
But I would like to have a web app (webpage that loads from an server on the internet over the iphones 3G conenction) that will send and receive serial data to the microcontroller through bluetooth (through JavaScript or similar). Is this possible ?
In that case I can easily add an iphone user interface to my microcontrollerbased product
with easy distribution of the web upp from a normal webserver.
Any ideas how to do this, or if it is possible?
Kind regards
TP
If you add WiFi or Ethernet support to your microcontroller, you can serve the webapp right from the device.
This way is definitely cheaper than mobile device <--Internet--> Server Machine <--Bluetooth--> Microcontroller.

How to integrate iPhone with other non iPhone devices using serial port?

Anybody knows how to integrate iPhone with other non-iPhone devices using serial port?
You can't directly. There may be some sort of serial line (i2c) on the dock connecter, but it is not exposed through the SDK, the Made for iPhone/ExternalAccessory.framework stuff is only for USB and BT.
You could conceivably use a WiFi/serial bridge (such things do exist) since you can send whatever you want over a TCP tunnel, but I doubt that is what you want.
Underlying ExternalAccessoryFramework for 30-pin connector it's the real UART handshaking (using Tx, Rx, Gnd, Vcc and some detect pins and no flow control) but not USB. Those pins of USB are only used for iTunes, Xcode and powering. The iOS app does not need to understand UART and only needs to send/receive bytes through NSOutputStream and NSInputStream.
But you need to pay Apple for MFi(Made For iPhone) Program first and buy some confidential IC to enable your accessory to communicate with iOS. They will require you to propose a product plan and expected sales and consider whether they would accept you as a MFi manufacturer.
You can get the info on using the ExternalAccessory framework from apple's developer portal.
You can't get the required serial handshake(?) info without joining the Made for iPhone program. This requires that you are developing a commercial device.
I have tried to get information on this protocol from apple through my university and have thus far failed.
I successfully received serial communication from the Arduino on the iPhone. I made a google doc explaining my process.
https://docs.google.com/document/d/1Yi9_hcw8XSyYNCG2OJT9oHlTG-dC-Dnuc58VIULa81Q/edit