Herelink with pymavlink UDP port error


I am trying to use pymavlink to create a GUI which displays basic mavlink data along with some custom features.
To do this, I connect both the Herelink and my PC to my mobile’s hotspot connection. I am able to connect to Mission Planner via UDPCL using my herelink’s IP address ( with port number (14552), so it is clear that the UDP connection is working fine.

However, when I close the Mission Planner and try to connect pymavlink to the above IP address, I get the error “The requested address is not valid in its context” as shown below:

I am running only a basic code as shown below:


Can anyone please help with the issue?


Can you try udpout instead of udpin?

I found that their definitions for in and out are sometimes confusing.

Thank you soo much Alvin. It works with udpout.
Yes, their definitions are very confusing. Logically it should be udpin, since we are reading a UDP stream and not generating it. But it works perfectly with udpout.