10 liens privés
Voir les requêtes d'une app Android
import asyncio
from bleak import BleakScanner
from functools import partial
from atc_mi_interface import general_format, atc_mi_advertising_format
bindkey = {
}
async def ble_coro():
count = [0]
stop_event = asyncio.Event()
def detection_callback(count, device, advertisement_data):
format_label, adv_data = atc_mi_advertising_format(advertisement_data)
if not adv_data:
return
mac_address = bytes.fromhex(device.address.replace(":", ""))
atc_mi_data = general_format.parse(
adv_data,
mac_address=mac_address,
bindkey=(
bindkey[device.address] if device.address in bindkey else None
)
)
# print(f"{count[0]}. {format_label} advertisement: {atc_mi_data}. "
# f"RSSI: {advertisement_data.rssi}")
if atc_mi_data.search_all("^MAC")[0] == 'A4:C1:38:79:A9:41':
print(atc_mi_data.search_all("^temperature")[0])
print("battery_level:", atc_mi_data.search_all("^battery_level"))
# count[0] += 1
# if count[0] == 5:
# stop_event.set()
async with BleakScanner(
detection_callback=partial(detection_callback, count)
) as scanner:
await stop_event.wait()
print("Stopped")
asyncio.run(ble_coro())
connection client à un serveur ble
sudo tcpdump -ni wlp1s0 arp puis ping
sudo nano /etc/ttwatch.conf #fichier de config
pur updater le GPS, télécharger le fichier f2p1enc.ee https://choaristudio.com/, ou https://www.landquest.fr/ ou https://mail.hieroglyphe.net/agps/agps/agps/agps/ lancer un server web en python car sinon le hhtps bug (matcher l'adresse dans le fichier de conf)
sudo ttwatch --eph7days --update-gps
sudo ttwatch --get-activities
les fichiers exportés vont là : /root/ttwatch/ezeerfwatch
on peut utilier l'utilitaire ttbincnv pour faire cracher des gpx