1
0
Fork
You've already forked ipv6-crimes
0
Trying to get multicast ipv6 working on an esp32 chip
  • Rust 100%
2026年03月04日 12:55:39 +11:00
.cargo Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
src Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
.clippy.toml Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
.gitignore Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
build.rs Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
Cargo.lock Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
Cargo.toml Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00
Readme.md docs: more testing info 2026年03月04日 12:55:39 +11:00
rust-toolchain.toml Multicast initial tests. Can Send, Can Receive on Static IP, Can't Receive on multicast 2026年03月04日 12:37:14 +11:00

IPv6 multicast testing on esp32

I really want IPv6 multicast working on a fleet of esp32 wifi boards.

This repo is my testing ground.

Testing

Using a ESP-RS devkit connected to a USB port run

cargo run --release

Remember to set the env variables SSID and PASSWORD to a suitable WiFi network available to connect to.

Receiving Multicast messages on linux

To help with testing it is possible to use socat to listen to UDP6-DATAGRAM!

I got this from https://unix.stackexchange.com/questions/735181/ipv6-multicast-fails-when-it-should-loop-back-to-self

sudo ip addr add ff05::1234 dev wlan0 autojoin
socat UDP6-DATAGRAM:'[ff05::1234]':9988,bind=:9988,ipv6-add-membership='[ff05::1234]':wlan0,setsockopt=41:19:i0,setsockopt=41:17:i$(ip -j link show wlan0 | jq '.[].ifindex') -

Note that wlan0 should match the interface your laptop/desktop is using.

What is it meant to do?

The code will connect to wifi, join the multicast group FF05::1234 (Scope Site Local) and listen on port '9988'.

Once initially connected it will send out a udp packet to the multicast group and then wait for incoming packets on port '9988'