coapjs / node-coap

CoAP - Node.js style
MIT License
531 stars 154 forks source link

Support for ipv6 scope id #334

Closed MarcCircosta closed 2 years ago

MarcCircosta commented 2 years ago

I wonder, is there a way to use this library with an ipv6 link local address, with the scope id included? I have an embedded device on my ppp0 interface that I'm trying to connect to, but get this:

input: 'coap://[fe80::0011:2233:3200:0001%ppp0]:12345/RCI', code: 'ERR_INVALID_URL'

Any suggestions are welcome, thanks.

JKRhb commented 2 years ago

Hi @MarcCircosta! While the error you got is probably a parsing error, the research I did so far indicates that you cannot specify the interface ID in an IP address due to Node.js :/ https://github.com/nodejs/help/issues/2073#issuecomment-515728635 Have you found any other information in this regard?

MarcCircosta commented 2 years ago

Hi Jan, thanks for your quick response. I agree, it seems it would require some hacking at, and isn't a great option. I think a better solution is have my embedded device advertise via mDNS. I'll probably focus my efforts there. Thanks for your help.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions.