Hi Miyako,

The specific device we are currently connecting to is a prototype RFID reader 
for cattle. We have it working correctly on iOS using CoreBluetooth. Basically, 
when we want to connect we create a central manager which looks for a certain 
peripheral name. The peripheral only has one service (0xFFE0) which has seven 
characteristics (0xFFE1 - 0xFFE7). Some are read only, some are read/write, and 
some are subscribe-able. As soon as the connection is established we read and 
subscribe to various characteristics and then call back methods are fired when 
information comes in from the reader. Occasionally we also write something to 
one of the characteristics. Then, of course, we disconnect.

I’m hoping to bring the same functionality to the desktop versions in 4D. So it 
would need to be able scan for BLE devices. Probably a callback would be 
registered for whenever another device was found. We we see the name of what we 
want we can ask the plugin to quit scanning for devices and then get the 
services it offers. Probably another callback to receive these and then 
something similar to get a list of characteristics for a service. Then methods 
to read/write/subscribe to a characteristic with callbacks for the 
read/subscribe possibilities. And then something to tear it all down and 
disconnect. Pretty much everything has to work with callback methods because of 
timing nature of BLE.

Anyway, basically what you found, but on macOS and Windows. I was hoping 
CoreBluetooth existed on macOS and something similar for Windows. For example, 
I found a free app on the Mac App Store called Adafruit Bluefruit LE Connect 
which can see our device and discover the service and characteristics and 
assumed they were using built in frameworks, but maybe not?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<can...@synergyfarmsolutions.com>
<www.synergyfarmsolutions.com>


> On Oct 11, 2017, at 7:02 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> it seems the cross platform libraries are all cross-mobile-platforms.
> 
> couldn't find anything for desktop windows and macos.
> 
> https://developer.apple.com/documentation/corebluetooth?language=objc
> https://developer.apple.com/library/content/samplecode/TemperatureSensor/Introduction/Intro.html
> 
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff536585(v=vs.85).aspx
> https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE
> 
> do you have a specific peripheral in mind?
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to