Ja das stimmt. Die Payload ist auch nachrangig.
Ging hauptsächlich herauszufinden, wer funkt wie oft.
Moderator: Co-Administratoren
Ja das stimmt. Die Payload ist auch nachrangig.
Code: Alles auswählen
virtual bool process(Message& msg) {
uint8_t flags;
uint8_t type;
DPRINT(F("rssi: "));
DHEX(radio().rssi());
DPRINT(F(" length: "));
DHEX(msg.length());
DPRINT(F(" count: "));
DHEX(msg.count());
DPRINT(F(" flags: "));
flags = msg.flags();
DPRINT(F("0x"));
DHEX(flags);
DPRINT(F(" "));
if (flags & 0x40) { DPRINT(F("RPTED ")); } else { DPRINT(F(" ")); }
if (flags & 0x20) { DPRINT(F("BIDI ")); } else { DPRINT(F(" ")); }
if (flags & 0x10) { DPRINT(F("BURST ")); } else { DPRINT(F(" ")); }
if (flags & 0x04) { DPRINT(F("BCAST")); } else { DPRINT(F(" ")); }
if (flags & 0x02) { DPRINT(F("+WKMEUP ")); } else { DPRINT(F(" "));}
if (flags & 0x01) { DPRINT(F("WKUP ")); } else { DPRINT(F(" ")); }
DPRINT(F(" type: "));
type = msg.type();
DPRINT(F("0x"));
DHEX(type);
DPRINT(F(" "));
switch (type)
{
case 0x00: DPRINT(F("DevInfo "));
break;
case 0x01: DPRINT(F("Config "));
break;
case 0x02: DPRINT(F("Response "));
break;
case 0x03: DPRINT(F("ResponseAES "));
break;
case 0x10: DPRINT(F("Info "));
break;
case 0x11: DPRINT(F("Action "));
break;
case 0x3E: DPRINT(F("SwitchEvent "));
break;
case 0x3F: DPRINT(F("Timestamp "));
break;
case 0x40: DPRINT(F("RemoteEvent "));
break;
case 0x41: DPRINT(F("SensorEvent "));
break;
case 0x53: DPRINT(F("SensorData "));
break;
case 0x5A: DPRINT(F("ClimaEvent "));
break;
case 0x70: DPRINT(F("Weather "));
break;
default: DPRINT(F("- unknown - "));
}
DPRINT(F(" from: "));
msg.from().dump();
DPRINT(F(" to: "));
msg.to().dump();
DPRINT(F(" msg: "));
for (uint8_t l = 0; l < msg.length() - 9; l++) DHEX(msg.buffer()[l + 9]);
DPRINTLN(" :");
this->led().ledOn(millis2ticks(100));
return true;
}
Code: Alles auswählen
AskSin++ V4.1.0 (Jun 11 2019 12:45:05)
CC init1
CC Version: 14
- ready
rssi: 51 length: 0C count: 33 flags: 0x86 BCAST+WKMEUP type: 0x5A ClimaEvent from: xxxx96 to: 000000 msg: 9CE03F :
rssi: 3C length: 0E count: 61 flags: 0xA0 BIDI type: 0x11 Action from: 00FFFF to: xxxxA1 msg: 0201000000 :
rssi: 45 length: 0E count: 61 flags: 0x80 type: 0x02 Response from: xxxxA1 to: 00FFFF msg: 010100001C :
rssi: 56 length: 16 count: 29 flags: 0x86 BCAST+WKMEUP type: 0x53 SensorData from: xxxx5E to: 000000 msg: 0041018B4200FA43009144FF6F :
rssi: 52 length: 1A count: 0A flags: 0x84 BCAST type: 0x70 Weather from: xxxx02 to: 00FFFF msg: 010E27643E014400003100000000009415 :
rssi: 52 length: 0D count: 02 flags: 0x80 type: 0x41 SensorEvent from: xxxx96 to: xxxxA1 msg: 07D50080 :
rssi: 50 length: 0C count: 33 flags: 0x84 BCAST type: 0x70 Weather from: xxxx96 to: 000000 msg: 00E03F :
rssi: 28 length: 17 count: 01 flags: 0x84 BCAST type: 0x70 Weather from: xxxx05 to: 00FFFF msg: 00DF277B3F00E2FFFD0009DD0000 :
rssi: 53 length: 0C count: 74 flags: 0x86 BCAST+WKMEUP type: 0x70 Weather from: xxxxC2 to: 000000 msg: 00E055 :
rssi: 34 length: 0C count: 1B flags: 0x84 BCAST type: 0x70 Weather from: xxxx10 to: 000000 msg: 00D85A :
rssi: 45 length: 0F count: B0 flags: 0x84 BCAST type: 0x53 SensorData from: xxxx01 to: 00FFFF msg: 582500000630 :
Code: Alles auswählen
./hmsniff -v -U /dev/cu.usbserial-14210
Waiting for application to settle...
HM-MOD-UART opened!
2019-06-11 16:21:10.565079: 1A088470F1D0014A80E8011427742B043F33005A003C000063C2BD
Packet information:
Length: 26
Message ID: 8
Sender: f1d001
Receiver: 4a80e8
Control Byte: 0x84
Flags: CFG RPTEN
Message type: Weather event (0x70 0x01)
Message: 011427742B043F33005A003C000063C2BD
LL NR FL CM sender recvr payload
2019-06-11 16:21:10.565: 1A 08 84 70 F1D001 4A80E8 011427742B043F33005A003C000063C2BD (Weather event)
2019-06-11 16:21:20.059161: 0C6E865A4E92EC000000F4EF41
Packet information:
Length: 12
Message ID: 110
Sender: 4e92ec
Receiver: 000000
Control Byte: 0x86
Flags: WAKEMEUP CFG RPTEN
Message type: Thermal control (0x5a 0xf4)
Message: F4EF41
2019-06-11 16:21:20.059: 0C 6E 86 5A 4E92EC 000000 F4EF41 (Thermal control)
Genau, das ist eine Applikation die vollständig im Browser läuft. Vom esp wird nur ein minimaler Code gezogen und eben die ganzen Telegrammdaten. Wenn es wirklich interessiert wie das alles funktioniert fasse ich es gerne mal in einen Text