Ping aller-retour Miotiq: byte 9 = command, script ping + écoute réponse
- SensorPayload: byte 9 passe de protocol_version (0x01) à command (0x00 par défaut) - Nouveau set_command() method (0x00=data normal, 0x01=ping test) - Nouveau script SARA/sara_ping_miotiq.py: envoie payload 100 bytes avec command=1, puis écoute la réponse descendante Miotiq pendant 15s via AT+USORD - Endpoint launcher.php sara_ping_miotiq - Bouton "Ping Miotiq" dans la section tests Miotiq (page modem) - Mise à jour error_flags.md avec la nouvelle map complète du payload Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -288,8 +288,8 @@ class SensorPayload:
|
||||
self.payload[66] = 0x00 # error_flags
|
||||
self.payload[67] = 0x00 # npm_status
|
||||
self.payload[68] = 0x00 # device_status
|
||||
# Set protocol version (byte 9)
|
||||
self.payload[9] = 0x01
|
||||
# Byte 9: command (0x00 = data normal, 0x01 = ping test)
|
||||
self.payload[9] = 0x00
|
||||
|
||||
def set_signal_quality(self, value):
|
||||
"""Set 4G signal quality (byte 8)"""
|
||||
@@ -386,6 +386,10 @@ class SensorPayload:
|
||||
"""Set device status flags (byte 68)"""
|
||||
self.payload[68] = status & 0xFF
|
||||
|
||||
def set_command(self, value):
|
||||
"""Set command byte (byte 9): 0x00 = normal data, 0x01 = ping test"""
|
||||
self.payload[9] = value & 0xFF
|
||||
|
||||
def set_firmware_version(self, version_str):
|
||||
"""Set firmware version bytes 69-71 (major.minor.patch)"""
|
||||
try:
|
||||
|
||||
@@ -13,11 +13,17 @@ etre actifs simultanement.
|
||||
## Position dans la payload
|
||||
|
||||
```
|
||||
Bytes 0-65 : donnees capteurs (existant)
|
||||
Byte 9 : command (0x00 = data normal, 0x01 = ping test)
|
||||
Bytes 0-8 : device_id (8 bytes) + signal_quality (1 byte)
|
||||
Bytes 10-65 : donnees capteurs
|
||||
Byte 66 : error_flags (erreurs systeme)
|
||||
Byte 67 : npm_status (status NextPM)
|
||||
Byte 68 : device_status (etat general du boitier)
|
||||
Bytes 69-99 : reserved (initialises a 0xFF)
|
||||
Bytes 69-71 : firmware version (major.minor.patch)
|
||||
Bytes 72-75 : latitude (uint32, x/1000000-90)
|
||||
Bytes 76-79 : longitude (uint32, x/1000000-180)
|
||||
Byte 80 : misc (contexte de mesure)
|
||||
Bytes 81-99 : reserved (initialises a 0xFF)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user