Q: I am working on connecting Swift to the BMD-300. I can connect to the module. I am confused, however, on how to transfer data from the iPhone to the BMD-300. Once I have the RigLeBaseDevice, what should I do next to send (or receive) data? Do you have more documentation on the protocols to use?
A: Once you’re connected and have an instance of `RigLeBaseDevice`, you can use its `peripheral` property to access the underlying `CBPeripheral` instance (https://developer.apple.com/reference/corebluetooth/cbperipheral). You can use this to write & read from the device.
You should then implement the `RigLeBaseDeviceDelegate` callbacks, which are a wrapper around `CBPeripheralDelegate`, to be notified of value updates.
One example which should illustrate this (in Objective-C, but is conceptually the same in Swift):
Take a look at "baseDevice.peripheral writeValue”, which controls settings on our eval device, and “didUpdateValueForCharacteristic”, which is called whenever the device notifies the app of new data.
Q: We have the RigadoToolbox app downloaded and can send data with the text field to be translated to UART communication with our microcontroller. How is that text field sending the data to the BMD-300? I see how to write to different Characteristics. Is one of those translated to UART, or is there a different way to write that directly?
A: The toolbox is using characteristics in that standard way.
To get the appropriate UUIDs for BMDWare, See "4.3 UART over Bluetooth Smart Service” in our BMDWare data sheet
Once connected, if you loop through the characteristics of the UART service, you’ll see the TX & RX characteristics. Remember to “enableNotificationsForCharacteristic” for the RX to receive updates.