helium / gateway-rs

The Helium Gateway
Apache License 2.0
280 stars 110 forks source link

ignoring send to client with unknown MAC mac=00:00:00:00:00:00:00:00 #482

Closed softlion closed 5 months ago

softlion commented 5 months ago

Hello, I'm using the docker version of

What could cause that issue ?

INFO run: gateway_rs::beaconer: transmitting beacon beacon_id="xxx"
WARN gateway_rs::gateway: failed to transmit beacon beacon_id="xxx" err=error receiving ACK
WARN run: gateway_rs::beaconer: transmit beacon err=gateway error: beacon transmit failed
INFO run: gateway_rs::gateway: ignoring send to client with unknown MAC mac=00:00:00:00:00:00:00:00

I found in the source code that it is when the lora concentrator post that;

            Event::NoClientWithMac(_packet, mac) => {
                info!(%mac, "ignoring send to client with unknown MAC")

That concentrator is a black box, so I don't know what can cause it.

That's the code I use to run gateway rs:

i2cdevice="i2c-0"

sudo docker run -d --name helium \
    --restart unless-stopped \
    --device "/dev/$i2cdevice" \
    --privileged \
    -v /var/run/dbus:/var/run/dbus \
    -e "GW_KEYPAIR=ecc://$i2cdevice:96?slot=0" \
    -e "GW_ONBOARDING=ecc://$i2cdevice:96?slot=0" \
    -e "GW_REGION=EU868" \
    -e "GW_LISTEN=0.0.0.0:1682" \
    -p 127.0.0.1:4467:4467 \
    --network lorawan \
    --hostname helium \
    quay.io/team-helium/miner:gateway-latest
madninja commented 5 months ago

This looks like your json packet forwarder is not configured with a mac address. Perhaps you don't have host networking turned on for the docker it's running in?

softlion commented 5 months ago

It's worked around. I stopped using gatewayrs. Instead I'm using another docker that already contains the multiplexer, and where the lorawan MAC address is provided as an argument to the docker container.

So it looks like the issue is in gateway rs, where it is unable to get the lorawan MAC address, when the host uses linux 6.6+

Do you happen to know what code in gatewayrs is in charge of determining that address ?

softlion commented 5 months ago

This looks like your json packet forwarder is not configured with a mac address. Perhaps you don't have host networking turned on for the docker it's running in?

You are right and I don't want to turn it on, I want to use an internal docker network instead.
Instead I tried mapping only /sys/net, that fixed errors but not that specific issue.

madninja commented 5 months ago

yeah. a valid MAC address is required since the semtech-udp crate supports multiple radios. The MAC address is used to route packets back to right place.. figure out a way to get your packet forwarder to have a mac address. Your environment setup and preferences are a bit beyond the scope of the gateway-rs repo.

You can try asking in the diy channel on Discord as well. I'm sure others have had a similar setup and may be able to help