Control bathroom mirror clock via Bluetooth with Raspberry Pi

Hello forum,

Perhaps someone here knows a simple solution to the following question :slight_smile:

I have purchased a new bathroom mirror.
It has a builtin digital clock, which can only be set via Bluetooth.
There is a simple app for Android and iOS that does this job.
To be more precise, you connect your smartphone to the mirror’s Bluetooth and press “Synchronize time” in the app.
Now I wanted to ask if anyone here has any ideas on how to implement this with a Raspberry Pi.

The Pi runs permanently near the mirror anyway and has Bluetooth.
If the power fails, the time on the clock is lost.
Tomorrow the time will be changed (again), which the Pi could do automatically overnight.
I’m too lazy to go into the bathroom with my cell phone every time and reset the mirror.

What exactly is this Bluetooth module?
I have no idea. It just answers with the Bluetooth name YMIOT-BT.
Everything is covered from behind so that no light comes in from behind, so I can’t see the controller.
If you search for the Bluetooth name, you will only find the name “Shenzhen Yuming Electronics” as a possible manufacturer.
If you search for the MAC of the Bluetooth chip, absolutely nothing comes up.

Is there anything else helpful?
Yes, I have recorded the Bluetooth interface with my smartphone and have a Wireshark log.
Here I can see that the time is transferred in plain text.
Here is an excerpt:

0000   02 0c 20 22 00 1e 00 43 00 13 ff 33 03 23 3b 35   .. "...C...3.#;5
0010   2c 32 37 2e 30 33 2e 32 30 32 34 20 31 37 3a 32   ,27.03.2024 17:2
0020   31 3a 31 37 3b 24 79                              1:17;$y

At least I get this information via the Raspberry Pi when I search for Bluetooth devices:

[NEW] Device A9:DA:B9:D4:E4:AD A9-DA-B9-D4-E4-AD
[CHG] Device A9:DA:B9:D4:E4:AD Name: YMIOT-BT
[CHG] Device A9:DA:B9:D4:E4:AD Alias: YMIOT-BT
[CHG] Device A9:DA:B9:D4:E4:AD ManufacturerData Key: 0x7262
[CHG] Device A9:DA:B9:D4:E4:AD ManufacturerData Value:
  32 32 78 78 11 22 33 44 55 66 aa bb 00 00        22xx."3DUf....  
[CHG] Device A9:DA:B9:D4:E4:AD RSSI: -74

Is it possible to create a script that connects to the mirror maybe once a day or every 12 hours and sets the time?
Would be really great.
I haven’t done much with Bluetooth so far, so this is still new territory for me.

Does it use BLE ? Then this may help but require a special module GitHub - dishbreak/bluesync: BlueSync is a time synchronization protocol intended to run on top of Bluetooth Low Energy (BLE).

No idea if the mirror has BLE.
Unfortunately, I don’t see that.
BlueSync looks good though.
I’ll give it a try.