If you know the Bluetooth MAC address of the Digi device you want to work with, you can instantiate directly in your application. The API works fine using the generic DigiBLEDevice class, but you can also instantiate a specific one if you know the device type and protocol your device is running.
These are the classes you can instantiate to represent a Digi device with Bluetooth Low Energy support:
| Class | Description |
|---|---|
DigiBLEDevice |
Generic Digi device object |
ConnectCoreBLEDevice |
Generic ConnectCore device with Bluetooth Low Energy support |
XBeeBLEDevice |
Generic XBee device with Bluetooth Low Energy support |
XBeeZigbeeBLEDevice |
XBee device with Bluetooth Low Energy support running Zigbee protocol |
XBeeDigiMeshBLEDevice |
XBee device with Bluetooth Low Energy support running DigiMesh protocol |
XBeeRaw802BLEDevice |
XBee device with Bluetooth Low Energy support running 802.15.4 protocol |
XBeeCellularBLEDevice |
XBee device with Bluetooth Low Energy support running Cellular protocol |
To instantiate any device, you need to provide the following parameters:
-
Bluetooth MAC address
-
Bluetooth authentication password
Instantiate a Digi BLE device using the Bluetooth MAC
DigiBLEDevice myDigiBLEDevice = new DigiBLEDevice("00:00:00:00:00:00", "password");