mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software

Home Page:https://doc.sm.tc/station

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random Wi-Fi MAC address as EUI

CedricGoby opened this issue · comments

Hi,

My device is : Raspberry Pi 3 Model B Plus Rev 1.3 with LAN and WLAN + RAK 2245.
I tried this : https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/

My device has a MAC for LAN (wich doesn't change) and a MAC for WLAN (wich change randomly each time I reboot the device).

The system try to register a gateway based on the random WLAN MAC, so I cannot register my gateway to TTN with the EUI from the LAN MAC. And I can't register an EUI based on the WLAN MAC because it changes at every reboot...

Take a look at the console log :
The system try to register a gateway based on the WLAN MAC (DEE9032DB588), not the LAN MAC.
2022-03-22 12:41:24.117 [TCE:ERRO] Infos error: ::0 Failed to fetch gateway: error:pkg/gatewayserver:gateway_eui_not_registered (gateway EUI `DEE903FFFE2DB588` is not registered)

After rebooting the device still try to register a gateway based on the WLAN MAC, but the WLAN MAC has changed... (DA8AFF2B0D4C)
2022-03-22 12:47:08.300 [TCE:ERRO] Infos error: ::0 Failed to fetch gateway: error:pkg/gatewayserver:gateway_eui_not_registered (gateway EUI `DA8AFFFFFE2B0D4C` is not registered)

Hope you can help.

Regards

same here. seems to be issue after adding pi0w 2 to this repo. I switched back to older releases and it works, so issue seems in recent code.

Let me take a look on this @eihnat @CedricGoby thank for your patience!

Hi @mpous, I am experiencing similar behavior. I did some tweaks to the code just adding a Logging Instance, in order to identify what IF clause is it taking:

image

After that, I noticed that the IF clause is behaving unexpectedly, having different ifc vs dname variables, the comparisson sentences will make just WLAN to match, notice that line is not present in the Pink rectangle, because most likely it continues after that>
image

if you add "disable-wifi" in the dt-overlay section you can circumvent the issue.

it will look like vc4-kms-v3d","disable-wifi"

Using the EUI_ADDRESS also does not work, even if I set EUI_ADDRESS to eth0 it still uses the wifi MAC. Only solution is to disable the wifi via devicetree overlay as above.

Just wanted to drop in here to mention that I have also run into this issue.

My setup is running on an RPi 4 with a RAK2243 Ver. A. Basicstation is on version 2.0.5.

Disabling the WiFi using dt-overlay was the fix for me. Happy to share any logs or resources if helpful for the fix.

try disabling wifi (if you using wired ethernet) using "vc4-kms-v3d","disable-wifi" in the Define DT overlays section