Client library implementation for MultiCom
- discover nearby compatible devices
- ping
- get
- send
- post
BLE notes: link
Android permissions issues: link
TODO: List prerequisites and provide or point to information on how to start using the package.
Following is some ecample usage of this library. For more detail spin up the example
// create a new client object with selected backends
Client client = Client(
channels: [
UdpChannel(targetPort: 5021),
BleChannel(),
]);
// initiate device discovery
client.sendDiscover();
//... after some devices are found
// obtain a list of discovered devices
devices = client.getDeviceList();
// open a new connection session
session = widget.client.open(devices[0].ddata.devId);
// test ping
Stopwatch stopwatch = Stopwatch()..start();
bool? res = await session.ping();
if (res != null && res) {
log('pong (${stopwatch.elapsed.inMilliseconds}ms)');
} else {
log('ping failed!');
}
stopwatch.stop();