BLE date time characteristic #10500
GarryMoveOut
started this conversation in
General
Replies: 1 comment 1 reply
-
Have you looked at aioble (https://github.com/micropython/micropython-lib/tree/master/micropython/bluetooth/aioble) -- it makes using BLE from MicroPython much simpler.
I think the issue here is in your def set_time(self, curr_time, notify=False, indicate=False):
print(">>>Sending time: " + curr_time)
# YYYY uint16, MM uint8, DD uint8, HH uint8, MM uint8, SS uint8,
self._ble.gatts_write(self._temp_tx, struct.pack("<HBBBBB", 2023, 1, 13, 11, 40, 55)) # hard coded time only for test
^^^^ should be self._time_tx
Which specification are you trying to access, I'm not aware of any restricted documents. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have ESP32C3 with BLE. I creating board to save temperature measurements and then download it on phone with BLE. Currently reading current temperature and humid is working well. But my next step is to read time on ESP32 and then change it (if is wrong) to sync time. For now I do not have app for phone. Now for develop tests I use tool nRF Connect.
My problem is that I can not read date time I receive empty value in nRF Connect. I found some old forum post. I do not have access to Bluetooth specification, it is restricted. My next step will be writing time (not implemented below), firstly I want to read date and time. What is wrong with my code?
Beta Was this translation helpful? Give feedback.
All reactions