Search code examples
flutterbluetooth-lowenergydomain-driven-design

Download data from Bluetooth low energy device


I want to download data from a BLE device, and it will come in the form of a file. I have documentation and Java code that can do this, but I am unable to achieve it in Flutter. I can send data, but then will start communication with device and will start download file to tachograph that connected to mobile phone. Can you help me guys?

I need code that can properly classify incoming data and determine what to send in response to each category.

https://i.sstatic.net/FBi5V.png

(https://i.sstatic.net/hVvQn.png)

https://i.sstatic.net/FBi5V.png

Data types:

https://i.sstatic.net/F4BZR.png

https://i.sstatic.net/EgZGg.png


Solution

  • I recommend to download ddd file, brcause the tachograph accepts UART format bytes in general (there are tx rx pins). Using BLE protocol you are connecting to the tachograph module and subscribe for incoming data (characteristic uuid 0000ffe1 or 0000ffe1. it depends on ble module firmware). Then send command bytes (as byte array) and wait for response for each command.

    -> 81 EE F0 81 E0
    <- 80 F0 EE 03 C1 EA 8F 9B
    -> 80 EE F0 02 10 81 F1
    <- 80 F0 EE 02 50 81 31
    

    etc.