This is my first post at this Forum, I apologize in advance for any mistakes (including language ones).
My intention is to read data from a load cell and send it via Bluetooth to my mobile or laptop. I proudly succeeded doing a prototype with an Uno R3 / HC-05 module / MIT Inventor developed App. But then I decided do downscale the prototype to a Nano 33 IoT, because of it´s size and integrated BLE, wich would dispense the HC-05 module.
After reading a lot and trying to understand how the BLE works, I was finally able to "see" the Nano board at my mobile using NRFConnect. But the data that I´m sending is a float type and NRFC shows it as some kind of HEX type:
It seems to be obvious but I didn´t understand yet how I should use BLECharacteristics, BLEByteCharacteristic, BLECharCharacteristic or BLEFloatCharacteristic. It doesn´t seem to have a relation between the data type at the program and what I see at the mobile as a result after BLE processing. The data appears correctly at the serial monitor.
Some examples that I saw used "(byte) data", but I´m also not sure what is this for...
Is it possible to read and store BLE data with any standard Laptop application (like Excel Data Streamer)? (guess I would need a virtual COM port to do it).
Separate the characteristic type from the internal type. They can be the same, but they do not need to be. Create a type that is easy to convey to others e.g., fixed point, signed or unsigned and then tell people what the resolution is. This has been done by the Bluetooth SIG for temperature, humidity and pressure for instance.
The issue is BLE support in programming environments on Windows. Most of the BLE development focuses on mobile applications. I guess nobody wants to run or cycle around with a Windows PC.
If you must use a PC, the best option is likely a second Arduino working as central and sending the data over virtual COM via USB.
That should not matter. What is more interesting, is what the data represents in the real world. Your BLE service and characteristics should be independent of the implementation. That way you can change your sensor design to something better without changing the BLE interface. The same app should work tomorrow.
I´ve never used any ESP32 modules. Actually I just begun working with microcontrollers and chose Arduino. I guess there are some differences in coding between them, right? But I´ve already found out that Bluetooth classic is far more easy to use than BLE!
I visited the link you´ve posted and filled the form with the HEX expression that I showed in my original post. The page returned me an "invalid HEX number" message. I guess even IEEE is not understanding what my BLE is sending to my phone at all...
Ok, now it makes sense for me that whatever BLExCharacteristics I use, mobile will still show bytes just as it receives it.
The idea was to use a laptop, not a desktop, but anyway BLE support in Windows is surely an issue. Windows identified the IoT board, but BLE application that I´ve tried (Bluetooth LE Lab) didn´t. So it was unable to stablish a communication.