From 1d5dc3c043f18edf7bd1bd51a2be2461fd867a52 Mon Sep 17 00:00:00 2001 From: DL1YCF Date: Sun, 12 Sep 2021 13:44:32 +0200 Subject: [PATCH] hpsdrsim: make MAC address depend on the radio type --- hpsdrsim.c | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/hpsdrsim.c b/hpsdrsim.c index 7f77864..ca4f513 100644 --- a/hpsdrsim.c +++ b/hpsdrsim.c @@ -226,19 +226,20 @@ int main(int argc, char *argv[]) noiseblank=0; nb_pulse=0; nb_width=0; + MAC5=0x66; OLDDEVICE=DEVICE_ORION2; NEWDEVICE=NEW_DEVICE_ORION2; for (i=1; i> 8) & 0xFF; @@ -873,16 +874,16 @@ int main(int argc, char *argv[]) if (buffer[ 6] != 0xBB) break; if (buffer[ 7] != 0xCC) break; if (buffer[ 8] != 0xDD) break; - if (buffer[ 9] != 0xEF) break; - if (buffer[10] != 0xFE) break; + if (buffer[ 9] != MAC5) break; // specifies type of radio + if (buffer[10] != 0xFE) break; // encodes new protocol memset(buffer, 0, 60); buffer [4]=0x02+active_thread; buffer [5]=0xAA; buffer[ 6]=0xBB; buffer[ 7]=0xCC; buffer[ 8]=0xDD; - buffer[ 9]=0xEF; - buffer[10]=0xFE; + buffer[ 9]=MAC5; // specifies type of radio + buffer[10]=0xFE; // encodes new protocol buffer[11]=NEWDEVICE; buffer[12]=38; buffer[13]=103; -- 2.45.2