I try to use micropython to develop an app to get sensor data, but I can’t receive and send Bluetooth values right now
The information sent by my hardware device is JSON encoded. The address is ujson – JSON encoding and decoding — MicroPython 1.14 documentation
My APP receiving code and sending code
Please forgive my English is not very good
The characteristic UUID should be
0000003A-0000-1000-8000-00805F9B34FB
You will receive/send data when using this ID.
Due to the time difference, I just saw your message, but I still can’t receive any information after I changed it
What is the error reported by the green error block?
In your FSRGB Click, set the text to [green error block] not your own text so if there is an error it displays the error message not your own text.
can’t writ the characteristic provided
Am I going to change the feature value in my code to the same?
Your BLE device is emulating a serial port so use this UUID
00001101-0000-1000-8000-00805f9b34fb
I advise you to try reading data from the device first.
If you want to write to the device then you need to try different options. Most of these devices assume hex codes and not ASCII. Another issue which such devices is that if they work in buads then the device will expect a stream of single characters not a one string.
So start with reading from the device as it is simpler.
But I can’t receive any messages now
can’t read the characteristic provided
can’t read the characteristic provided
This is an error reminder
Then it might be that this device has its own characteristic UUID which you need to find out and use. Or the device is not yet connected as a Bluetooth device to your mobile.