BLE Bluetooth data cannot be received

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
111
2222

1 Like

Please forgive my English is not very good

1 Like

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

1 Like

What is the error reported by the green error block?

undefined


My code

1 Like

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?

If I change the uuid in the code, an error will occur

1 Like

Your BLE device is emulating a serial port so use this UUID
00001101-0000-1000-8000-00805f9b34fb

I changed it in the app, and it still got the same error

1 Like

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

1 Like

can’t read the characteristic provided

1 Like

can’t read the characteristic provided
This is an error reminder

1 Like

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.


I don’t know if you can see it clearly. Is it because I have a 16-bit string in front of me?

1 Like