HalowLink-2 DHCP through WAN port and external DHCP server not working as expected

Dear MM support service,

we are using a custom board with your MM8108 to give to an Android HHU Halow functionality, and it works very well!

But we are a bit struggling about the setting of the DHCP server:

  • we would like to get the HHU IP address from the existing router’s DHCP server; but when we use the Halowlink-2 wizard to set it in this mode
    • the HHU never receive its DHCP address
    • nor we see DHCP requests coming out from the Halowlink-2
    • while we are pretty sue that DHCP request frames are sent out by the HHU
    • it is “as if” the DHCP frames coming from the HHU were never forwarded to the WAN port, so they never reach the external DHCP server
  • if instead we use the local Halowlink-2 DHCP server, then our HHU gets its IP address and can browse the Internet through the lan-wan forwarding, and all works fine
    • but this way the IP address is assigned by the HalowLink2 internal DHCP server and not the router’s one, as we would like to do

We wonder if some additional setup is required to get the HalowLink-2 to get its IP address from an external DHCP server.

Please let us know if you need further info.

Best regards and thanks for your help

Michele

Hi @michele

There shouldn’t be any additional configuration required to get DHCP forwarded from the HaLow interface to the WAN port in this instance. I personally use this exact configuration in my home lab and it works as intended without additional configuration.

On the HaLowLink2, can you run

tcpdump -i br-wlan -n 'udp port 67 or port 68'

and then connect the HHU again. I’d be interested to know what the HaLowLink is seeing with regards to DHCP traffic.

Make sure your ethernet cable is from the HaLowLink’s WAN port to your HHU, not its LAN port (which will remain as a management interface).

Hi, I think I need to clarify the setup;

  • An Android smartphone, the HHU, connected through the USB port to a board that gives the HHU an Ethernet-(via USB)-to-HaLow bridge
  • Your HaLowlink-2 receives the HHU frames via HaLow and (should) forward them through its WAN port toward the external DHCP server and the Internet

So the smartphone has Internet connectivity through USB C connector and HaLow, there is no Ethernet cable involved

Sounds like you have the following topology:

Router (LAN) ↔ (WAN) HalowLink-2 (Halow) ↔ HaLow board (USB-C) ↔ Phone

If that’s right, then you want your HL2 to bridge traffic to the Router, rather than act as a router itself (double NAT). To do that, you can configure the HalowLink2 through the Wizard to give HaLow devices an IP address on your existing routers network:

If you have already done this, and are still not having success, then the issue could be related to the HaLowLink-2 dropping the frames because they are being bridged from the phone via the HaLow board.
To get this to work, you will need to make sure your board signals to the AP that it is operating in “4 address” mode. This tells the AP that the chip may not be the source of the traffic, and that the traffic may be passed on from another device.

How are you managing the MM8108 chip? EG do you have a microcontroller like ESP32 bringing up the chip and creating the ethernet over usb interface? That will change how we enable the board to signal it is operating in 4 address mode.

Hi, we already tried setting the Halowlink-2 as you suggested with no luck: the DHCP frames sent by the HHU do not exit from the Halowlink-2.

The MM8108 chip is handled through an STM32U585 chip, similar to the one used in the evaluation kit, and we used the same reference software to bring up the HaLow link.

Do you think that we need to change in mmwlan.h:

    .use_4addr = MMWLAN_4ADDR_MODE_DISABLED --> MMWLAN_4ADDR_MODE_ENABLED                       

?

Yes, that’s the one, although just to confirm you shouldn’t modify mmwlan.h, instead you would modify the code that loads the variables, eg if you’re using the app_wlan_start helper code you would modify it in that function.

    struct mmwlan_sta_args sta_args = MMWLAN_STA_ARGS_INIT;
    sta_args.use_4addr = MMWLAN_4ADDR_MODE_ENABLED;
    load_mmwlan_sta_args(&sta_args);    

See here:

I’ll open a ticket to add an mmconfig variable to mm_app_loadconfig.c for use_4addr so that this is easier.

Once you set that to enabled, your traffic should be forwarded :slight_smile:

Hi, Idennis!

Many thanks for your reply!

I have already forwarded the firmware with the changes you suggested to my colleague that is handling the test with the Halowlink-2, and I hope that on a short notice I can give you a feedback!

Many thanks again

Michele

1 Like

Hi, Idennis!

I have the results:

  • the Halowlink-2 that my colleague is using is unable to get the DHCP address even after that the use_4addr field has been set on startup to MMWLAN_4ADDR_MODE_ENABLED
  • I am using another Halowlink-2 on a different network, and it gets the DHCP address and Internet connectivity regardless of the setup of the use_4addr field, i.e. it works OK with both the values MMWLAN_4ADDR_MODE_DISABLED and MMWLAN_4ADDR_MODE_ENABLED
  • both the Halowlink-2 have been setup using the wizard in Access Point mode; they are indeed connected to different networks
  • next week I’ll check again my colleague setup to identify where the culprit is

In the meantime, thanks again for your help!

I would recommend you try to monitor your network traffic with tools like wireshark and tcpdump to find out where the traffic is getting to and where it’s falling over.

Thanks for the update!