From 603b5f8f0d21fc400a4de08ade37045349d778fa Mon Sep 17 00:00:00 2001 From: c vw Date: Thu, 13 Jan 2022 16:25:11 +0100 Subject: [PATCH] Init additional fields after OZY discovery, most importantly the number of receivers supported. --- discovery.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- 2.45.2