Closed sibertdeclercq closed 6 months ago
I have little usable knowledge of how Windows does interface selection; I just vaguely remember that Windows is using numeric interface identifiers (so maybe it's just a topic of doing [fe80::...%1] or some other small value).
I'm happy to fix anything that works on normal UDP sockets -- can you open a regular socket in Python to that host with any arguments?
An address beginning with fe80:: is a link-local address. This will work only if applied on the correct interface - both on Windows and Linux. You should have an IPv6 capable router in your network, which either provides you global unicast addresses (usually delegated from your internet provider) or a unique local address (ULA) which you can define yourself (in your router). If your network is configured properly, then any OS, including Windows, will route the request to the correct interface. Background information on IPv6 address types: https://www.ripe.net/media/documents/ipv6_reference_card.pdf
I eventually found the solution.
aiocoap-client -m GET coap://[fe80::21c:e2ff:fe00:3ce2%<interface number>]/info
In contrast to WSL/Linux, the value after the %
should be the interface number, not the interface name. The interface number can be found in ipconfig
I'm trying to use aiocoap as a CoAP client on windows. I'm trying to make requests over IPv6, which fails presumable because I cannot figure out how to tell aiocoap which network interface it should be using.
I've tried using aiocoap-client:
aiocoap-client -m GET coap://[fe80::21c:e2ff:fe00:3ce2]/info
which eventually times outI can get it to work on Linux (WSL) by appending %eth1 to the address:
aiocoap-client -m GET coap://[fe80::21c:e2ff:fe00:3ce2%eth1 ]/info
but this obviously doesn't work on windows.Is this functionality supported for windows somehow?
Enviroment: