README (4692B)
1 RCVD.py: sync BLE-enabled Casio watches from Python 3 2 ----------------------------------------------------- 3 The RCVD project is now fully ported to Python 3. This is an application that 4 allows you to synchronize time and date on your Bluetooth LE enabled Casio 5 wristwatches (see supported models in the FAQ section). The original concept 6 was created for KaiOS 2.5.x and Web Bluetooth API enabled browsers in 2022. 7 This version is a standalone CLI application but optionally can be used as 8 a library. 9 10 == Dependencies == 11 12 RCVD.py has been tested on Python 3.10 and depends on these libraries: 13 bleak (0.21.1+), asyncio (3.4.3+) and ntplib (0.4.0+). Just install all of 14 them by running pip install -r requirements.txt from the project directory. 15 16 Of course, you need to run RCVD on a PC with a Bluetooth 4.0+ adapter or on 17 another Bluetooth-enabled device that supports Bluetooth LE. 18 19 == Usage == 20 21 RCVD can be run like this: 22 23 python rcvd.py [-h] [-t timeout] [-d delta] [-s ntp_server] [-n ntp_version] 24 25 All parameters are optional here: 26 27 * -h: display help screen 28 * -t: BLE scanning timeout in seconds (default 4) 29 * -d: manual delta correction in milliseconds (default 500, see below) 30 * -s: specify NTP server to fetch time from (if no server is specified, then 31 local system time is used) 32 * -n: specify NTP protocol version to use, default is 4, good for most cases 33 34 After running the command, you must press the corresponding time sync button 35 on your watch (usually the lower right) to put it into the BLE sync mode. If 36 possible, press this button at the same time as running the command, but a 37 short delay (within the timeout specified with -t parameter) is allowed. Once 38 the watch is connected and the handshake is performed, RCVD will fetch the 39 current time from the specified source (local system time by default, or the 40 NTP server of your choice) and set it on the watch. Look for the OK indicator 41 on the watch itself to confirm that the setting process has been successful. 42 Refer to the manual for your model on how to do that. 43 44 Depending on your specific watch and host Bluetooth hardware, you may need to 45 set a different delta correction value to account for transmission losses. 46 You can do this by altering the -d parameter when running the command. This 47 parameter defines how many milliseconds are added to the time value to be 48 immediately set on the watch. It is 500 ms by default, but tends to be more on 49 the digital Casio models, so you need to find out yourself which delta gives 50 the most accurate time setting as a result. 51 52 == FAQ == 53 54 - How is this better than the official (and unofficial) Casio syncing apps? 55 56 As of now, RCVD focuses on doing one thing well and works on any CLI-enabled 57 platform, as opposed to the official Casio apps only working on mobile OSes. 58 It doesn't aim to replace them. Just as its JS-based predecessor, RCVD.py is 59 a lightweight alternative for those who just want to sync time on the watches 60 and nothing else. 61 62 - Which Casio models are supported as of now? 63 64 The following models were directly tested with both (JS and Python) versions: 65 GW-B5600, GMW-B5000, OCW-T200, GM-B2100, DW-B5600, GA-B001. 66 67 The following models are theoretically supported too but not directly tested: 68 MRG-B5000, GWR-B1000, GA-B2100, GST-B400, GST-B500, ECB-S100, MSG-B100, 69 ECB-2000, ECB-2200, G-B001. 70 71 If RCVD works with one of the above models (or with some other ones), please 72 let me know at https://matrix.to/#/@luxferre:hackliberty.org and I'll mark it 73 as tested. 74 75 - Will both JS and Python versions be developed in parallel? 76 77 Most likely, no. If there is an issue that really needs to be fixed in the 78 KaiOS/JS version of RCVD, the fix will be backported there, but all new 79 feature development will only be focused upon in the Python version, i.e. this 80 one. This version, by the way, already is ahead of the JS version because it 81 already integrates NTP support. 82 83 For any new Casio models though, if the basic time sync support is trivial to 84 add into the Python version, it will most likely be added to the JS version as 85 well. 86 87 - Are there going to be advanced features for the models supporting them, like 88 alarm setting, reminders, DST rules, timezone DB, waypoints etc? 89 90 Probably. Not in the short term though. And it will most likely be a separate 91 script using rcvd.py as a library. 92 93 - Are there going to be any features utilizing "phone finder" and autosync? 94 95 A research is planned in both of these directions, but, again, its results 96 will be implemented in separate applications, not in this one. 97 98 == Credits == 99 100 Original research, JS library and KaiOS application by Luxferre, 2022. 101 Ported to Python in 2024. Released into public domain with no warranties.