I currently have a DEX BLE-1 adaptor from Honeywell used to retrieve dex data from vending machines. I have a swift 3 iOS app that uses CoreBluetooth to make scans and pair to the peripheral. The adaptor has has three services: serial port, battery, and dex service. The dex service has three characteristics: firmware version, session, and settings. I suppose the session characteristic is used to retrieve the dex; however, I am not sure how to do so.
I use the didUpdateValueFor peripheral method to get the value relating to the uuid of the characteristic of session but the value is nil.
func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) {
if characterstic.uuid.uuidString == uuidSession {
if(characteristic.value != nil) {
print(characterstic.value)
}
}
}
Is the DEX supposed to be retrieved from the session characteristic value? It seems to be a few bytes, maybe I have to concatenate the bytes? But the value is nil anyways. I am new at this but should this be done through the serial port? I read somewhere you could establish a connection through it, or is this totally off?