From: c vw <dl1ycf@darc.de>
Date: Thu, 13 Jan 2022 15:25:11 +0000 (+0100)
Subject: Init additional fields after OZY discovery, most  importantly
X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/about/module-simplejson-index.html?a=commitdiff_plain;h=603b5f8f0d21fc400a4de08ade37045349d778fa;p=pihpsdr.git

Init additional fields after OZY discovery, most  importantly
the number of receivers supported.
---

diff --git a/discovery.c b/discovery.c
index 5c4568f..c6ffbd8 100644
--- a/discovery.c
+++ b/discovery.c
@@ -225,11 +225,23 @@ void discovery() {
     discovered[devices].protocol = ORIGINAL_PROTOCOL;
     discovered[devices].device = DEVICE_OZY;
     discovered[devices].software_version = 10;              // we can't know yet so this isn't a real response
-    discovered[devices].status = STATE_AVAILABLE;
     strcpy(discovered[devices].name,"Ozy on USB");
     discovered[devices].frequency_min=0.0;
     discovered[devices].frequency_max=61440000.0;
+    for(int i=0;i<6;i++) {
+      discovered[devices].info.network.mac_address[i]=0x10+i;
+    }
+    discovered[devices].status = STATE_AVAILABLE;
+    discovered[devices].info.network.address_length=0;
+    discovered[devices].info.network.interface_length=0;
     strcpy(discovered[devices].info.network.interface_name,"USB");
+    discovered[devices].use_tcp=0;
+    discovered[devices].use_routing=0;
+    discovered[devices].supported_receivers=2;
+    fprintf(stderr,"discovery: found USB OZY device min=%f max=%f\n",
+                            discovered[devices].frequency_min,
+                            discovered[devices].frequency_max);
+
     devices++;
   }
 #endif