WIN10, HL2, SDR software and APIPA

373 views
Skip to first unread message

Heikki Ahola

unread,
Nov 22, 2020, 2:09:52 PM11/22/20
to Hermes-Lite
Hello Group,

Previously I had network problems with HL2, which, after all, were not related to Win10 Firewall as I first assumed. Something new has come up quite recently with my two HL2 and two WIN10 computers. The first pair is connected via an Ethernet router and works OK with an IP address provided by DHCP. All four different software /QUISK, PowerSDR, Thetis and Spark) are OK. The other pair is connected via a switch which obviously does not have DHCP and an APIPA address is being used. This, however, is not accepted by PowerSDR and Thetis. Looking back,  this may have been the reason for my numerous frustrating periods with HPSDR software. 

Question: Is there any good reason why PowerSDR/Thetis would refuse to use APIPA ?

73 de Heikki (OH2LZI)

DL1YCF

unread,
Nov 22, 2020, 4:13:20 PM11/22/20
to Heikki Ahola, herme...@googlegroups.com
I can only tell that I had to „teach“ piHPSDR not to complain about netmasks if APIPA addresses are in use.
The reason is, that APIPA addresses are legel even if they are outside the subnet of the ethernet adapter
on which they are used. So it may well be that different SDR software behaves differently here.
> --
> You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/59980252-a32a-4bab-951b-68e10ba86467n%40googlegroups.com.

Steve Haynal

unread,
Nov 22, 2020, 11:46:01 PM11/22/20
to Hermes-Lite
Hi All,

My personal opinion is that APIPA is more trouble than it is worth. I've contemplated just removing it so that everyone has to establish a proper working subnet.

73,

Steve
kf7o

"Christoph v. Wüllen"

unread,
Nov 23, 2020, 3:34:01 AM11/23/20
to Steve Haynal, herme...@googlegroups.com
So far I run the HL2 using APIPA, but of course you are right what
I should do is to connect it to a DHCP net *once* and „burn“ a
fixed IP address. This is what I did with the other two SDRs I use.

But DHCP *requirement* is a no-go. In my view the best connection is
a dedicated RJ45 port at the computer (the „normal“ one or a
thunderbolt/USB-C to RJ45 adapter) and a „direct cable“.

In this case running a DHCP server on the Macintosh would be overkill,
I just use the (fixed) addresses 192.168.1.30,31,32,… for my Macs and
192.168.1.100,101,102,… for my SDRs.

Jonas Sanamon

unread,
Nov 23, 2020, 6:10:04 AM11/23/20
to Hermes-Lite
Hi Steve,

How about we keep APIPA but just as a way to reach an unconfigured HL2 in order to set a static IP if "in the field"? 
We could update documentation (Wiki) to say that it should have a DHCP server in the net, or to set static IP but "do not use APIPA address" ?

Best Regards, Jonas

DL1YCF

unread,
Nov 23, 2020, 7:58:58 AM11/23/20
to Heikki Ahola, herme...@googlegroups.com
At least for ANAN SDR’s you cannot do that. This is so because the APIPA address has
netmask 255.255.0.0, and you most likely want to set an address of the form
192.168.1.xxx with netmask 255.255.255.0. So at least for Anan (for the HL2 firmware
I do not know) you *have to* „burn“ the IP addr while starting with DHCP.

James Ahlstrom

unread,
Nov 23, 2020, 8:19:25 AM11/23/20
to Hermes-Lite
Hello Group,

As Heikki says, "APIPA addresses are legal even if they are outside the subnet of the ethernet adapter". This is true for Windows but for Linux it fails, and you would need to set a route by hand to use APIPA. I found all this confusing when I first saw it. I sympathize with Steve that APIPA is more trouble than it is worth.

I don't think a direct connection to the PC solves the problem. You still need an IP or broadcast UDP to talk to the HL2. Burning a fixed IP by a temporary connection to a DHCP network works fine.

The original Hermes protocol has a command "<0xEFFE>< 0x03>< MAC Address><IP Address to set><60 bytes of 0x00>" to set an IP by means of a UDP broadcast. That might be an option. Or we could just revert to the known IP 192.168.1.243 if DHCP fails, and the user would need to configure that subnet (if required) and then burn the desired fixed IP. Or we could tell the user to go find a DHCP server. For any of these three options, APIPA is eliminated.

Jim
N2ADR

DL1YCF

unread,
Nov 23, 2020, 8:58:57 AM11/23/20
to James Ahlstrom, herme...@googlegroups.com

>
> The original Hermes protocol has a command "<0xEFFE>< 0x03>< MAC Address><IP Address to set><60 bytes of 0x00>" to set an IP by means of a UDP broadcast.


This is exactly the flaw in the protocol. It does not specify the netmask, so SDR’s tend to „burn“ the actual netmask and this is why
this fails if connected via APIPA.

> --
> You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/cc645067-4df2-45c4-88ad-8b45b05fa059n%40googlegroups.com.

James Ahlstrom

unread,
Nov 23, 2020, 9:33:13 AM11/23/20
to Hermes-Lite
Hello Group,

On Monday, November 23, 2020 at 8:58:57 AM UTC-5 DL1YCF wrote:

This is exactly the flaw in the protocol. It does not specify the netmask, so SDR’s tend to „burn“ the actual netmask and this is why
this fails if connected via APIPA.

But if the original discovery packet gets through to the HL2 by a UDP broadcast, why wouldn't this subsequent UDP broadcast get through? If it does get through, we would burn the specified IP to flash. Then when the HL2 is power cycled, the new fixed IP would be used. For this to be practical, the second broadcast must work on Windows and Linux, and it must be easy to do in the gateware. Otherwise maybe 192.168.1.243 is better. Maybe it is better anyway.

Jim
N2ADR

ron.ni...@gmail.com

unread,
Nov 23, 2020, 12:05:55 PM11/23/20
to Hermes-Lite
Without the HL2 being able to use a self-assigned IP, cabling directly to a new HL2 from a Mac or iPhone would stop working.
And Windows and Linux systems would require enough expertise to install, configure and run a DNS server on the system.
73,
Ron
n6ywu


ron.ni...@gmail.com

unread,
Nov 23, 2020, 12:15:19 PM11/23/20
to Hermes-Lite
In addition, requiring the use of a router to use an HL2 increases the likelihood of users running into packet latency or Tx relay chatter problems that they can't fix without buying new networking gear or moving to a QTH with less interference.
73,
Ron
n6ywu

"Christoph v. Wüllen"

unread,
Nov 23, 2020, 1:08:38 PM11/23/20
to ron.ni...@gmail.com, herme...@googlegroups.com
The solution is: Burn a local IP addr once and then use a direct cable. I just tried it and
„burned“ 192.168.1.98 into the HL2 and my USB-C-to-Ethernet adapter of the
computer is at 192.168.1.30. No problem to connect to HL2 with a direct cable.

NOTE: you have to power cycle the HL2 once you „burnt“ the fixed IP addr
e.g. with SparkSDR, for the new addr. to become effective.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/9a63c659-e465-4566-9c0c-c343690f5eb5n%40googlegroups.com.

ron.ni...@gmail.com

unread,
Nov 23, 2020, 1:17:42 PM11/23/20
to Hermes-Lite
Chicken and egg problem.  
You have to have a working IP address and a reliable network connection before you can configure a new IP address.
Neither of those can be assumed for all generic new HL2 users or their computing platforms.
For instance, apps on the newest iPads currently can't send UDP broadcasts, but can use self-assigned IPs for UDP.
Other systems may follow due to new home IoT device security hazards.
73,
Ron
n6ywu

James Ahlstrom

unread,
Nov 23, 2020, 3:03:32 PM11/23/20
to Hermes-Lite
Hello Group,

On Monday, November 23, 2020 at 8:58:57 AM UTC-5 DL1YCF wrote:

This is exactly the flaw in the protocol. It does not specify the netmask, so SDR’s tend to „burn“ the actual netmask and this is why
this fails if connected via APIPA.

Netmasks are mostly used to generate broadcast addresses. As far as I know, the HL2 has no use for a netmask because it doesn't send broadcasts. But is this right? Does the HL2 use a netmask to recognize broadcasts? If so and if it uses a netmask of 255.255.255.0 then if it returns an APIPA address, it should change its netmask to 255.255.0.0. But I doubt that would solve our problem.

The original question from Heikki was "Question: Is there any good reason why PowerSDR/Thetis would refuse to use APIPA ?". I don't really know, but perhaps the problem is not the IP but rather the broadcast. For a computer at 192.168.1.30 and an APIPA client at 169.254.22.33 there are three possible broadcast addresses, 192.168.1.255, 169.254.255.255 and 255.255.255.255. Heikki, does the PowerSDR/Thetis discover the HL2 and report its MAC address and IP address? If so, can you ping the HL2 at its APIPA address? If so, I am lost on why PowerSDR/Thetis would not work with APIPA.

Heikki, can you use WireShark to get to the bottom of this? Or does someone with more PowerSDR insight know why?

Jim
N2ADR

James Ahlstrom

unread,
Nov 23, 2020, 3:13:01 PM11/23/20
to Hermes-Lite
Hello Ron and Group,

Yes, a chicken and egg problem. The HL2 must have an IP, and the PC must have a route to that IP so it can configure a new IP.

Ron says the newest iPads can't send UDP broadcasts, so the Hermes discovery packet fails. I think Ron is arguing to keep APIPA. Do we know for sure whether APIPA works on iPads? I thought it works on Windows until Heikki ran into problems. I think it fails on Linux.

Jim
N2ADR

Duncan Clark

unread,
Nov 23, 2020, 3:13:48 PM11/23/20
to herme...@googlegroups.com
In message <59980252-a32a-4bab...@googlegroups.com>,
Heikki Ahola writes
>Question: Is there any good reason why PowerSDR/Thetis would refuse to
>use APIPA ?

They work perfectly for me.

I don't use anything else as my shack computer only has wireless to the
home network 100ft away. I use a wired connection straight from my Win10
64bit computer to either of my HL2's. No issues ever with PowerSDR and
Thetis with my 169.x.y.z address. Spark is happy as well.

Duncan
--
Duncan Clark
G4ELJ

Reid Campbell

unread,
Nov 23, 2020, 3:26:32 PM11/23/20
to herme...@googlegroups.com
Hi Duncan,

You answered the question I was about to ask, was this working for
anyone. I did try it a while back without success and I wondered if it
was because I already had a wireless connection but turning it off
didn't help.

I think turning the firewall off has already been suggested?

Cheers

Reid
Gi8TME/Mi0BOT

ron.ni...@gmail.com

unread,
Nov 23, 2020, 3:28:16 PM11/23/20
to Hermes-Lite
My UDP broadcast problems started occurring on Macs and iOS devices after an OS update (the OS that all new Macs and iOS devices ship with).  My guess is that these new security "fixes" were added to better protect everybody's new home IP cameras, speaker/microphones,  thermostats, and etc.

So I wonder if any differences in behavior on Heikki's system could be due to a Windows update or system version or configuration?

73,
Ron
n6ywu

James Ahlstrom

unread,
Nov 23, 2020, 3:41:11 PM11/23/20
to Hermes-Lite
Hello Reid and Duncan,

Just to be clear, Duncan is using one network interface to WiFi and a different interface to HL2, and these two interfaces have different IPs and netmasks. This is not the same as using one interface to a switch which connects to both the Internet and the HL2.

Reid, do you remember what your configuration was when APIPA didn't work?

Jim
N2ADR

Reid Campbell

unread,
Nov 23, 2020, 3:56:30 PM11/23/20
to herme...@googlegroups.com
Hi Jim,

I normally use a wired connection to gigabit switch. I removed that connection and plugged the HL2 into it. I normally have the WiFi turned off on the laptop, so I switch it on to get a normal network connection. PowerSDR couldn't find the HL2, so I though it was because there was two interface. Switching the WiFi off didn't help.

I also use a docking station, so suspected that but as I had some testing to do, so I gave up and went back to testing via the normal wired network which has a DHCP.

Cheers

Reid
Gi8TME/Mi0BOT
--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

Reid Campbell

unread,
Nov 23, 2020, 4:15:38 PM11/23/20
to herme...@googlegroups.com
I Just setup up my configuration again. PowerSDR couldn't find anything until I switched of the Domain firewall. Now there is some sort of connection but no receive. I have now switched off all firewalls, still no receive.

The IP address of the PC Ethernet port is 169.254.68.136 and the IP address shown on the HL2 setup panel is 169.254.19.221.

Does that make sense? Would that mean we should have a 255.255.0.0 net mask?

Cheers

Reid
Gi8TME/Mi0BOT

Roger Critchlow

unread,
Nov 23, 2020, 4:23:18 PM11/23/20
to Hermes-Lite
I use APIPA on Linux exclusively for my HL-2 since I discovered that my fancy pants router was cleverly batching packets for me.  It would be a personal pain to me if you disabled it in the gateware.  It would also mean that portable operation and live demos would involve lugging a network router and additional power supply, not to mention lots of fun trying to get the laptop to operate on the HL-2 subnet and guest wifi network simultaneously.

-- rec -- ad5dz --

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

Reid Campbell

unread,
Nov 23, 2020, 4:31:38 PM11/23/20
to herme...@googlegroups.com
Here is the discovery packet and response. Does that make sense? Is the issue to do with the PC and HL2 being different subnets?

Cheers

Reid
Gi8TME/Mi0BOT



Roger Critchlow

unread,
Nov 23, 2020, 5:50:37 PM11/23/20
to Hermes-Lite
I found this pointer in /etc/network/if-up.d/avahi-autoipd while looking for the source of the "169.254.0.0/16 dev wlp0s20f3 scope link metric 1000" route reported by "ip route".  

The article is 15 years old, but I'll bet some of the hardware on this list is at least that old.  In any case, you can check with "route" to see if the link-local routes are already active.

Mixing link-local IP addresses and routable IP addresses 
https://developer.apple.com/library/archive/qa/qa1357/_index.html

-- rec --


Josh Logan

unread,
Nov 23, 2020, 8:49:28 PM11/23/20
to Roger Critchlow, Hermes-Lite

I think this thread is good and the outcome will be acceptable after a transition time.  But I want to pause for a moment and call out some terminology issues.  I don't think netmask is the cause of any of these issues.  I think routing is more often the cause of problems.

APIPA or IPv4LL is what is setting up the IP space.  Netmask is tightly tied to the IP range.  If your local IP is 192.168.1.120 with a netmask 255.255.255.0 (/24) it will only be able to directly talk to 255 local IPs.  If I look at my machines it looks like it has a route to 169.254.0.0/16 on the Ethernet card, but no IP set on the interface.  Even if you try to scan all of 169.254.0.0/16 I don't believe it will ever send a packet to the radio that will work.  The radio might respond, but routing will not work.  You need an IP with 169.254.x.x and the netmask 255.255.0.0 (/16) setup to get traffic to and from the radio.  The only time subnet would come in is if the host subnet is 255.255.255.0 (/24) and not the correct 255.255.0.0 (/16).

I would also say as soon as an IP is assigned to the computer I feel like APIPA is not the right way to talk to the radio.  I personally run a USB2 to Ethernet adapter directly connected to the radio.  This works for my setup currently and got the radio away from chatty network devices that impacted operation.  If APIPA support is removed I would look at running DHCP server on this Ethernet interface, or set a static IP via my DHCP network, or the current APIPA network.  

I used both subnet and CIDR notations above.  Different computers may show a route or subnet a different way and I wanted both to be recognised.

73, KD7HGL
Josh



ron.ni...@gmail.com

unread,
Nov 23, 2020, 10:20:05 PM11/23/20
to Hermes-Lite
Note that IP address are usually assigned to interfaces, not to computers.  And most computers can route to multiple interfaces.  For instance on my Mac, I can have separate IP address spaces for WiFi and for a USB-to-ethernet dongle, and route to both.  On an iPhone, I think I get 3 IP address spaces, one IP space for WiFi, one IP space for cellular WAN, and possibly another for any Lightning-to-ethernet dongle (which will get a self assigned IP if connected to a HL2 or a Raspberry Pi not running DNS).

Is this also true of Win10 systems?

When the Mac is ethernet wired directly to either an HL2 or a Raspberry Pi with no router in-between, the Mac will self assign a 169.254.*.* IP address to its own ethernet interface, such that I can ping back to the Mac from the Raspberry Pi.  
But the Raspberry Pi's self assigned IP shows up if I ping raspberrypi.local , allowing me to ssh in.  Is this via ZeroConf?
Interesting question: Could the HL2 be set up to respond to a ping to hermeslite2.local in the same way?

73,
Ron
n6ywu

Heikki Ahola

unread,
Nov 24, 2020, 12:04:03 AM11/24/20
to Hermes-Lite
Hi Jim and the Group,

It seems to me that I have touched quite a sensitive subject here, hi !  Unfortunately, I left for the countryside and cannot do any further testing right away, but, if I remember correctly, PowerSDR setup did show only the APIPA IP address 169.etc without any MAC address. I have not tried Wireshark but most certainly will as I am "back-in-the office". 

73 de Heikki (OH2LZI)


Steve Haynal

unread,
Nov 24, 2020, 12:20:36 AM11/24/20
to Hermes-Lite
Hi All,

Thanks for the discussion. I have never used APIPA. When I need to connect a HL2 directly to a computer, I first connect the HL2 to my local network and then assign a fixed IP which is in the expected subnet that the target computer uses. After I am done, I either disable the fixed IP while directly connected, or boot the HL2 in factory mode, let the DHCP server assign an IP, and then disable the fixed IP.

I think it is too late to eliminate APIPA, even though it seems like a bit of a wart.

The HL2 gateware has no notion of netmasks. It simply checks MAC, IP and port of arriving packets for correct destination values before accepting.

The HL2 has a different way of writing a fixed IP to flash and so doesn't implement the openhpsdr "set IP" command. I can implement that, at least to set a temporary IP, if there is interest.

73,

Steve
kf7o

Christian Veith

unread,
Nov 24, 2020, 1:57:19 AM11/24/20
to Steve Haynal, Hermes-Lite
  Hi Steve,
Why has the HL2 no option to configure a Netmask?

Netmasks are very important to decide where a packet should go. Send via ethernet to a local client or to a default gateway. This is always a decision based on the own network address, the subnet mask and the destination ip address. Assuming to have a specific netmask, such as a 255.255.255.0) would lead to problems with other constellations.

Little Example
Not using or respecting a  netmask is a bad thing. How should a system react? i'm using a 172.16.0.0/23 subnet in my network. When i put the HL2 on the lower half (172.16.0.0 - 255) SDR Console can't find the HL2. When the HL2 is on the 172.16.1.0-255 range it's no problem. PC is running on the upper half in both cases.

APIPA in all is working for the HL2 but users need to respect some things.
1. APIPA is always link local and won't be routed.
2. APIPA uses always 169.254/16 network. When your Client has another subnet mask than 255.255.0.0 your OS is not implementing RFC3927 correctly. (See https://tools.ietf.org/html/rfc3927)
3. When the PC got a fixed IP Address and HL2 got APIPA, communication won't work. Switch PC to DHCP and get a apipa too or configure a static IP on HL2.

Working in System Administration for 16+ years now using fixed ip addresses has it's use case but generally it's a pain in the a...

Just my 2 cents.

Best regards
Christian, DL5CV

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

Reid Campbell

unread,
Nov 24, 2020, 5:47:15 AM11/24/20
to herme...@googlegroups.com
Hi Group,

I did a few more tests this morning. I set a static IP for the PC
Ethernet port in the same sub net as the HL2 (I used 169.254.19.20),
still no joy.

I switched off the firewalls still no joy.

The discovery seems to happen OK but when it comes to setting up the UDP
stream, it fails.

I then tried my development Thetis and after a few seconds it connected
and there was a UDP stream. I then used the official release of Thetis,
didn't connect. Seemed to discover OK but no UDP stream. I tried to set
the IP in the setup panel to the HL2 IP address, still no UDP on the
official Thetis release. I couldn't shut down Thetis, has to use Task
Manager to kill it.

When back to my development release of Thetis, now it has stopped
working. Have to shut it down with Task Manager.

I went around all the SDR software I have installed (SparkSDR,
SDRConsole, Quisk, PowerSDR Beta 8, Thetis & Thetis (Dev)) and none will
now connect with the direct Ethernet connection. The only connection
that was working was the development release of Thetis but it's now stopped.

I think this is something in the software when trying to make the UDP
connection and probability a quirk of Windows (now there's a surprise).

Cheers

Reid
Gi8TME/Mi0BOT

James Ahlstrom

unread,
Nov 24, 2020, 7:22:50 AM11/24/20
to Hermes-Lite
Hello Christian and Group,

When I wrote the gateware for the HiQSDR I had no use for a netmask either. It is true that the netmask controls routing, but the HL2 is a leaf device and does no routing. The netmask is also used to generate correct broadcast addresses, but the HL2 does not generate any, and only has to recognize a broadcast. The HL2 depends on the local network for routing.

Jim
N2ADR

Jonas Sanamon

unread,
Nov 24, 2020, 8:13:42 AM11/24/20
to Hermes-Lite
Hi All,

Just to clarify: The Hermes lite does not support routing. So You cannot have the HL2 in one subnet and the SDR client in another even if You have IP connectivity between the subnets via a router. In other words, it does not implement functions for netmask or default gateway.

This also sets some constraints if You want to use a VPN to reach a remote HL2. Your VPN client needs to get an IP address in the same subnet as the HL2. Maybe this can be worked around using NAT and port forwarding but it won't be pretty :-)

Regards
Jonas - I can of course be absolutely wrong. Use with caution. :-)

Christian Veith

unread,
Nov 24, 2020, 10:59:25 AM11/24/20
to Hermes-Lite
Jonas tnx for the clarification. 

I could stop my plans on separating all ham located stuff in another subnet then :(

I thought there was a full IP stack used in the hl2.

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

James Ahlstrom

unread,
Nov 24, 2020, 2:30:13 PM11/24/20
to Hermes-Lite
Hello Group,

In Heikki's original post, he said that PowerSDR and Thetis failed with an APIPA address. I think he implied that Quisk and Spark did work. If so, I can take a guess at what is going on.

Quisk has special code to enumerate all the available network interfaces. It makes a list of the broadcast address for each interface and adds 255.255.255.255. Then it sends the Hermes discovery broadcast to each. When the HL2 replies with an APIPA address, hopefully Windows will notice that APIPA traffic is coming from that interface and create a route.

If the PC has multiple interfaces, for example a wired Ethernet and WiFi, I don't see how the PC could know where to send broadcasts or 169.254.0.0 traffic. I guess Windows decides that APIPA must go to one or the other, but I doubt it will send traffic to both. Anyway, I don't want to know what Windows does. I make it a practice never to run two interfaces, because it is too confusing if and how the PC will route between them. If having a valid route for 169.254.0.0 is the problem then the HL2 may work if WiFi is turned off, but fail if it is on even if the HL2 is always on the wired connection. It does seem that APIPA should work if the PC gets an APIPA address and the HL2 gets one too. Otherwise we are left with a lot of guess work about what Windows does.

Jim
N2ADR

James Ahlstrom

unread,
Nov 24, 2020, 2:44:46 PM11/24/20
to Hermes-Lite
Hello Jonas and Group,

I am not too sure, but lets think about this. Suppose the PC is at 192.168.1.11 and the HL2 is at 192.168.2.22 (both 255.255.255.0, or /24) and there is a router between these two subnets. Somehow the PC sends a discovery broadcast to the HL2 and it replies to 192.168.1.11 even though it is on network 192.168.2.0. The return Ethernet address is the router, so the reply goes to the router. If the router is smart enough, and if there is a route back to 192.168.1.0, then I think this should work. The HL2 can not route no matter what it does because it does not have two network interfaces, so that is not an issue. Of course, I could be wrong too!

Jim
N2ADR

Duncan Clark

unread,
Nov 24, 2020, 2:48:39 PM11/24/20
to herme...@googlegroups.com
In message <XCm9UWA6...@ntlworld.com>, Duncan Clark writes
>I use a wired connection straight from my Win10 64bit computer to
>either of my HL2's. No issues ever with PowerSDR and Thetis with my
>169.x.y.z address. Spark is happy as well

Ok.

I run Win10 Pro 64bit 20H2 on a 3 year old Shuttle DS81 with an I5 and
8Gb of ram with an SSD hard disk.

Wireless via a USB stick.

Two GB LAN connectors, 3 and 4.

No 3 with a fixed IP of 192.168.3.1 I use for a Remote desktop
connection into a an old Win7 box that runs a Delta 44 card for my
Softrock panadapter on my PicaStar using Rocky. Still better than any
other audio system I have tried with Rocky.

Lan No. 4 connection also has a fixed IP 192.168.2.160 which was setup
originally to talk to my HL1 which has a fixed IP.

My HL2 is plugged into that LAN 4 connector and despite the fixed IP,
Windows 10 sets up an APIPA connection using a Virtual LAN. I hadn't
even realised that the connection was originally set to a fixed IP. It
just simply worked.

See attached photos.

Both of my HL2s connect fine to Thetis, Reid's PowerSDR, OpenHPSDR Power
vSDFR and KissKonsole. I flashed my newer one tonight with Spark to 72p5
without issues.

APIPA works fine for me.
Network adapters.PNG
Network connection to HL2.PNG
HL2-1.PNG
APIPA1 - Power SDR HL2-1.PNG
APIPA2 - Thetis HL2-2.PNG
APIPA2 - Power SDR HL2-2.PNG

Eric Lund

unread,
Nov 24, 2020, 2:49:36 PM11/24/20
to Hermes-Lite
Just to toss in my $0.02 worth, I have noticed that sometimes (infrequently) I am getting an APIPA address on my HL2 and most of the time I get the DHCP static address I configured for it in my DHCP server.  I haven't determined why the APIPA address pops up occasionally yet, a quick power-cycle of the HL2 seems to set it straight.  Using Quisk on Ubuntu 20.04, I am able to talk to the HL2 in both cases, but the APIPA address causes the packets to wander through the mean streets of a slow section of my network on their way to the HL2, meaning I will get TX dropout when I don't have the DHCP address.  Quisk is kind enough to display the IP address it is using to talk to the HL2, so it is easy to see when things are going awry.  In general it is not a big problem for me, but I did find the behavior interesting.  It is undoubtedly something in my network misbehaving.

The SSDP or whatever Quisk uses to find the radio on startup seems to work wonderfully, regardless of what address it is given.  I assigned it a DHCP static address mainly so that I would know where it landed.

Eric
AC0OP

Jonas Sanamon

unread,
Nov 24, 2020, 2:51:51 PM11/24/20
to Hermes-Lite
Hi James,

In Your example, at arrival at the HL2,  the source address of the discovery packet from PC is the PC's address, not the router's address unless the router does NAT which it really should not normally do between internal LAN subnets.

Regards, Jonas - This i'm actually sure of :-)

ron.ni...@gmail.com

unread,
Nov 24, 2020, 2:59:20 PM11/24/20
to Hermes-Lite
If the HL2 doesn't use the Metis "Set IP" command <0x03><MAC><IP>, what protocol does one use to set a fixed IP?
(on a fresh unit with factory installed gateware 69 or 70).
73,
Ron
n6ywu

Roger Critchlow

unread,
Nov 24, 2020, 3:28:53 PM11/24/20
to ron.ni...@gmail.com, Hermes-Lite
The fixed IP (or MAC) address is stored in the EEPROM, as described in the excellent protocol document on the wiki:


-- rec -- ad5dz --

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

Christian Veith

unread,
Nov 24, 2020, 4:01:09 PM11/24/20
to Hermes-Lite
Hi James,

When the router is between pc and hl2 then we are talking about physical independent ethernets?

What happens when you send an broadcast to your local IP network is that it is not routed by default to other networks. You must specify the hl2s subnet broadcast address. The router will then broadcast that packet to the hl2s network with ff-ff-ff-ff-ff-ff as the layer2 destination address.

The hl2 would then have the routers Mac address as the layer2 sender and the PC's IP address as the UDP source.


--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.

"Christoph v. Wüllen"

unread,
Nov 25, 2020, 3:14:36 AM11/25/20
to James Ahlstrom, herme...@googlegroups.com
Are you sure the router forwards the broadcast from one subnet to the other? I am not.
> --
> You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/f73faa09-5511-4830-b52c-23e761816d3an%40googlegroups.com.

si...@sdr-radio.com

unread,
Nov 25, 2020, 3:48:11 AM11/25/20
to "Christoph v. Wüllen", James Ahlstrom, herme...@googlegroups.com
For anyone interested, here's an answer to this question. The summary is No, but read on...

https://networkengineering.stackexchange.com/questions/58997/do-routers-forward-broadcast-traffic

Simon Brown, G4ELI
https://www.sdr-radio.com
To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/D7243EAA-2990-40EA-BD52-D25054F591E9%40darc.de.

Reid Campbell

unread,
Nov 25, 2020, 3:57:35 AM11/25/20
to herme...@googlegroups.com
Hi Group,

I played a bit more with a direct connection this morning. I check my
network settings and found I had several adaptors. One was a VPN which I
noticed had about 8G of data transmitted. That worried me, so I
uninstalled it as it is never used (NordVPN).

There was another adaptor for VirtualBox. I disabled that. There was one
for Bluetooth which was already unconnected and a WiFi one, which I
disabled. That just left he wired Ethernet port.

Connected up the HL2 directly to the Ethernet port and tried all the
different software. Everything connected except Thetis but after a
database reset, it connected as well.

I reconnected the WiFi and the VirtualBox interfaces and I can still
connect to the HL2, so I think it is a routing issue within Windows.
With all the interfaces enabled, I pulled the Ethernet cable from the
HL2 and power cycled it. I was still able to connect from PowerSDR Beta 8.

I think the solution is to disable all interfaces except the one to be
connect to the HL2 to get the initial connection and then re-enable your
normal interfaces to the rest of the world.

Cheers

Reid
Gi8TME/Mi0BOT

James Ahlstrom

unread,
Nov 25, 2020, 7:42:04 AM11/25/20
to Hermes-Lite
Hello Jonas,

Yes, the source IP address of the discovery packet at the HL2 is the PC address. I meant to say that the source Ethernet address of this discovery packet is that of the router.

I tried again to use an APIPA address for the HL2 on my Linux Ubuntu 18 system, and to my surprise it worked fine. I am sure I tried this in the past and it failed until I put in a route for 169.254.0.0. I see from the routing table that there is a link-local destination to interface eth0, so it looks like this is the route in use. See https://en.wikipedia.org/wiki/Link-local_address. But Eric, AC0OP, says APIPA causes traffic to "wander", and this can happen if, for example, the link-local address points to the WiFi interface and not the wired interface.

Others have supported the use of APIPA and I am starting to like it too.

Jim
N2ADR

James Ahlstrom

unread,
Nov 25, 2020, 7:49:53 AM11/25/20
to Hermes-Lite
Hello Christoph,

On Wednesday, November 25, 2020 at 3:14:36 AM UTC-5 "Christoph v. Wüllen" wrote:
Are you sure the router forwards the broadcast from one subnet to the other? I am not.

I am confused by the treatment of broadcasts by the router,  but cvei..  has provided a good explanation. So, no, I am not sure either. There is also the issue of a PC with multiple interfaces.

Jim
N2ADR

ron.ni...@gmail.com

unread,
Nov 25, 2020, 10:43:48 AM11/25/20
to Hermes-Lite
Hi Jim,

For discovery, I used a modified version of the code (I think Steve's) in discover.cxx, which uses GetIpAddrTable() or getifaddrs() to send a discovery packet to *every* interface of type AF_INET.  Not just one, as PCs very often have multiple interfaces with multiple IP address ranges.  Seems to work no matter how I connect the HL2 to the computer.

As for self assigned IP addresses in the 169.254 range  (windows people call them APIPA?), I've used them for years to connect to Raspberry Pi's, as I didn't want to connect a new Raspberry Pi to a router until I secured the admin account and firewalls.  Raspberry Pi's also have ZeroConf or Bonjour, which allows connecting to them by name "raspberrypi.local", no matter how connected to whichever interface.

73,
Ron
n6ywu

Jaroslav Škarvada

unread,
Nov 25, 2020, 10:58:36 AM11/25/20
to Hermes-Lite
Hi,

I noticed the same. There may be some bug in the DHCP code in the
gateware. I also had the following reproducer (not sure whether it's
directly related to this particular issue):
- setup DHCP server and static DHCP address for HL2
- let HL2 to obtain the static address through the DHCP
- disconnect ethernet cable for few minutes
- reconnect ethernet cable back to HL2
- HL2 uses APIPA
There is no way to recover from it other than power cycle. Unfortunately
I haven't time to study this problem more deep

73! Jaroslav, OK2JRQ

Eric Lund napsal(a):
> --
> You received this message because you are subscribed to the Google
> Groups "Hermes-Lite" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hermes-lite...@googlegroups.com
> <mailto:hermes-lite...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hermes-lite/d58de268-aad4-452a-9490-b7a604d9ca2bn%40googlegroups.com
> <https://groups.google.com/d/msgid/hermes-lite/d58de268-aad4-452a-9490-b7a604d9ca2bn%40googlegroups.com?utm_medium=email&utm_source=footer>.


"Christoph v. Wüllen"

unread,
Nov 25, 2020, 11:26:29 AM11/25/20
to Jaroslav Škarvada, herme...@googlegroups.com
This is not a „static IP“ address, since you do not tell HL2 to use
a static address but you tell your DHCP server to tell the HL2
always the same addr, but when a lease is lost, then anything can
happen.

So hat others mean with „static IP“ is if the IP is stored
in HL2’s EEPROM, and in this case I do not think it falls back
to self-assigned upon disconnection.
> To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hermes-lite/8f70bab4-46af-66c5-669c-516f7247d35c%40yarda.eu.

Steve Haynal

unread,
Nov 27, 2020, 1:47:34 AM11/27/20
to Hermes-Lite
Hi All,

Just a few comments on this thread. Yes, there is a bug when you unplug/replug an ethernet cable after DHCP is used. See https://github.com/softerhardware/Hermes-Lite2/issues/148 I will try to fix it soon, but it is a minor inconvenience for now.

Setting the fixed IP for the HL2 is described on the protocol wiki page. There is also working code in hermeslite.py and Quisk for examples. It would be fairly easy for me to implement the protocol1 IP set as a temporary IP set, not written to eeprom. Let me know if there is any benefit or interest to this.

73,

Steve
kf7o

James Ahlstrom

unread,
Nov 27, 2020, 1:23:12 PM11/27/20
to Hermes-Lite
Hello Group,

I added another Ethernet device to my PC so I could do some tests. The eth0 is the usual on-board Ethernet connected to my LAN 192.168.1.0. The added eth1 is a USB to wired Ethernet adapter with address 192.168.2.201 connected to a switch which is otherwise unconnected. The eth1 must be connected to something or else it is viewed as absent. When I reboot my Linux Ubuntu 18 system, the routing table shows link-local pointing to eth1. The link-local route is used for 169.254.0.0 (APIPA) addresses.

I disconnect the DHCP server and power on the HL2 which is connected to the PC through a switch. The HL2 gets an APIPA address, but Quisk fails to receive a discovery reply. I can ping the HL2, but I must use ping -r -I eth1 169.254.19.221 instead of just ping. I then unplug the eth1, and the routing table only shows eth0, as eth1 is gone. But the link-local entry is missing. Now Quisk receives a discovery reply and shows the IP and MAC, but there is no data received from the HL2.

Next I leave the eth1 disconnected and reboot. Now link-local points to eth0. I then turn on the eth1, and link-local still points to eth0. I then turn on the HL2, the HL2 gets an APIPA address and Quisk works fine.

Note that the HL2 was always connected to the PC in the above tests, but that Quisk could be made to fail with APIPA if there was an additional interface eth1 that was present at reboot. Adding it later did not cause a problem. All this is very confusing. But it seems that APIPA addresses have a problem when there is more than one interface in use in the PC. That is not surprising as the target for APIPA is arbitrary since there is no defined network 169.254.0.0/16 in the routing table. Normal IPv4 does not allow specifying the interface, as this is supposed to be handled by the routing table. Specifying a route for APIPA is possible, but requires privileges.

We can get some wisdom from IPv6. It has self configuration like APIPA but requires specifying a zone when it is used, and the zone points to the correct interface. See wikipedia. Adding IPv6 to HL2 is a thought, but might be too much work.

I am not sure what to do about this, or if anything should be done. We could just say that people should understand their subnets, but normal people think that if they plug an HL2 into their PC, the PC should find it. I believe we should think about this and not rush into making any changes.

Jim
N2ADR

Alan Hopper

unread,
Nov 27, 2020, 3:02:00 PM11/27/20
to Hermes-Lite
  Hi Jim and group,
I completely agree Jim.
I've often thought that we need a guide to plugging the radio direct to a pc but realized I did not know enough to write one. Reading this thread has convinced me that I knew even less than I thought :)  I guess the most common need for this is to plug your nice new HL2 into a laptop that also has a wifi connection, perhaps we should concentrate on finding ways to make the most common setups work. One thing I noticed ( on mac especially ) is that the broadcast discovery does not setup the routing, on some computers the routing seems to take a while after the first direct packet is sent and packets can be dropped over this time, this shows up as the radio not starting on the first attempt. I now send a discovery packet direct after the initial discovery as a sort of ping in the hope that the routing is setup by the time the user starts the radio.  The use of flooded direct discovery packets might help with some of this.
73 Alan M0NNB

Steve Haynal

unread,
Nov 27, 2020, 7:14:49 PM11/27/20
to Hermes-Lite
Hi Jim and Group,

I am all for making it easier to just plug your HL2 in have it work, but don't have much time at the moment. I will try to support any efforts by making any requested gateware changes. IPV6 support is an interesting idea. Maybe for the future.

73,

Steve
kf7o

James Ahlstrom

unread,
Nov 28, 2020, 12:33:27 PM11/28/20
to Hermes-Lite
Hello Alan, Steve and Group,

Alan, thanks for the tip. I connected my Windows 10 laptop to the Internet with WiFi and left the wired connection at the default configuration. When I turned it on, it got a WiFi address from DHCP. When I plugged the HL2 into the wired connection, the PC configured the wired interface with an APIPA address, the HL2 also used an APIPA address, and everything worked. So that is one (perhaps) common configuration that works!

So if APIPA address are in use, they work fine on an APIPA subnet provided the PC has a network interface with an APIPA address and there is no DHCP available.

Alan, you mentioned routing. I don't see anything in IP networking that would change a routing table based on seeing APIPA traffic. I think my tests showed that Linux does not do this. Windows might, but I don't know. Also, I don't see anything in IP networking that allows you to circumvent the routing table and send APIPA traffic to an interface that you know has an APIPA host.

But IPv6 is easier. It has built in self-configuration and a zone suffix to send traffic to an interface. The zone is specifically designed for self-configuration.

Steve, don't bother with changing the gateware for now. Let's think about this some more.

Jim
N2ADR

Duncan Clark

unread,
Nov 28, 2020, 5:25:53 PM11/28/20
to herme...@googlegroups.com
In message <XCm9UWA6...@ntlworld.com>, Duncan Clark writes
>In message <59980252-a32a-4bab...@googlegroups.com>,
>Heikki Ahola writes
>>Question: Is there any good reason why PowerSDR/Thetis would refuse to
>>use APIPA ?
>
>They work perfectly for me.

For those that can't get APIPA to work on Windows 10 and don't use a
router maybe this will do the trick - not tried it yet.

Portable DHCP - a simple to use DHCP server

Apparently you can enable a DHCP server for a particular network
connection.

https://technologyrss.com/install-portable-dhcp-server-windows-10/

ron.ni...@gmail.com

unread,
Nov 28, 2020, 5:31:41 PM11/28/20
to Hermes-Lite
Hi Steve,

Far from seeming like a "wart", your inclusion of Link-Local Address assignment is one of the features of the HL2 that makes it possible to use a fresh HL2 when directly connected to some of the highest performance computers made, and that billions of people posses.  These extremely popular portable computers self assign a link local IP address to a directly connected ethernet port when there is no router, that self-assigned IP address and its routes are not configurable by users, and AFAIK no DHCP servers can be run.  So the fact that the HL2 can provide an IETF RFC3927 Link-Local Address is a great feature that makes the HL2 into a usable plug-and-play SDR for portable ops, and without having preconfigure the HL2 or having to lug around a router, or some heavy power-inefficient x86 box.  :-)

And not just for lightweight portable ops, but for potential emergency communications as well, where one might not have access to a router, the internet, or any WAN ; just an HF antenna.

Oh, and link local IP addresses also work with the ethernet port on Raspberry Pi's that aren't running their own DHCP services.

Great feature.  Thanks!

Roger Critchlow

unread,
Nov 28, 2020, 6:11:38 PM11/28/20
to ron.ni...@gmail.com, Hermes-Lite
I agree completely.  

This whole discussion has been very confusing to me.  

I suspect that the issue is that APIPA addresses don't route over the network, which is part of their definition, they are Link Local addresses, addresses which are local to the link which makes them.  So if you connect with APIPA on one machine, it is not possible for a different machine to use that APIPA connection.    The machine that connects with APIPA to the HL2 may be able to use the APIPA address, but the address is local to the machine that made the link.  This is to prevent the routing network from getting a 64k x 64k routing issue to resolve.  Maybe works differently with IPV6, but this is the way IPV4 works.

But then Jim declares a success when a Win10 machine connects with APIPA on ethernet while connected with routing over WiFi, which is exactly the way it is supposed to work, and exactly the way it works for me on Ubuntu 20.04, and exactly the way I suspect it works for everyone who uses it successfully.  So when Jim says that, I'm confused, it sounds like there's a problem  getting APIPA to work at all.

As the Apple technical question response I posted explains, there can be a problem even with that simple set up.  If the machine that connects with APIPA doesn't add a route to the link local APIPA subnet, then the APIPA subnet won't even be visible to programs running on the machine that connects, they will only see the routed network connection.  And that's the way Windows handled APIPA by default 15 years ago. and for how many more years?  But it's easy to check, run "route" in a command line window and see if there are any routes to the link-local subnet.  If not then consult the apple memorandum for the fix.

-- rec -- ad5dz --

--
You received this message because you are subscribed to the Google Groups "Hermes-Lite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermes-lite...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages