PHP SDK for AB BLE Gateway
- Install composer
- Run
composer require aprbrother/ab-ble-gateway=dev-master
For BLE Gateway V4, you should install msgpack extension also
pecl install msgpack
$parser = new AprBrother\PacketParser4();
$meta = $parser->parse($content);
$rawData = $meta['devices'];
$data = [];
unset($meta['devices']);
foreach($rawData as $v) {
$data[] = $parser->parse($v);
}
$parser = new AprBrother\PacketParser();
list($meta, $data) = $parser->parse($content);