mm6108->FGH100M-H -> wm6108 ->wm1302(pi hat)->RPi5 over SPI

I am trying to get Halow working with these hardware setup over SPI

  • Raspberry Pi 5
  • Seeed WM1302 pi hat
  • Seeed WM6108 mini PCI card (with Quectel FGH100M-H and mm6108)

Software packages used:

  • OS: Raspberry Linux
  • Kernel version: 6.12.47 (stable_20250916)
  • Morse rpi-linux patch 6.12.21
  • Morse driver 1.16.x
  • Morse firmware: mm6108.bin and bcd_fgh100mhaamd.bin

I found useful information from these:

did the followings

  1. patched the kernel source with Morse rpi-linux - manually resolved a few conflicts
  2. configured the kernel with necessary flags for CRYPTO
  3. built Image, modules, dtbs with .config and System.map
  4. built Morse driver (morse.ko and 80211ah.ko) against the patched kernel
  5. download firmware *bin files
  6. wrote the dts, compiled

My DTS: morse-mm610x-spi-overlay.dts

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709", "brcm,bcm2711"; 

    fragment@0 {
        target = <&spi0>;
        __overlay__ {
            pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
            cs-gpios = <&gpio 8 1>;
            #address-cells = <1>;
            #size-cells = <0>;
            status = "okay";

            mm6108: mm6108@0 {
                compatible = "morse,mm610x-spi";
                reg = <0>; /* CE0 */
                reset-gpios = <&gpio 17 1>;
                power-gpios = <&gpio 23 0>,
                                <&gpio 24 0>;
                spi-irq-gpios = <&gpio 5 0>;
                spi-max-frequency = <10000000>;
                status = "okay";
            };
            spidev@1 { reg = <1>; status = "disabled"; };
            spidev@2 { reg = <2>; status = "disabled"; };
        };
    };
    fragment@1 {
            target = <&gpio>;
            __overlay__ {
                    spi0_pins: spi0_pins {
                            brcm,pins     = <9 10 11>;
                            brcm,function = <4  4  4>;
                            brcm,pull     = <2  2  2>; 
                    };
                    spi0_cs_pins: spi0_cs_pins {
                            brcm,pins     = <8>;
                            brcm,function = <1>;
                            brcm,pull     = <2>;
                    };

                    mm6108_pins: mm6108_pins {
                            brcm,pins       = <17 23 24>;
                            brcm,function   = <1 1 1>;
                            brcm,pull       = <0 0 0>;
                    };
            };
    };
};

Then I deployed them to the SDcard running on RPi 5, created symbolic link to bcf_boardtype_0801.bin.

After reboot. I got these SPI errors “chip select 0 already in use”

[    2.226925] rp1-firmware rp1_firmware: RP1 Firmware version eb39cfd516f8c90628aa9d91f52370aade5d0a55
[    2.229240] spi spi0.0: chipselect 0 already in use
[    2.229249] spi_master spi0: spi_device register error /axi/pcie@1000120000/rp1/spi@50000/spidev@0
[    2.229256] spi_master spi0: Failed to create SPI device for /axi/pcie@1000120000/rp1/spi@50000/spidev@0

and the driver didn’t load

[    9.892319] dot11ah: loading out-of-tree module taints kernel.
[    9.893016] Morse Micro Dot11ah driver registration. Version 0-rel_1_16_4_2025_Sep_18
[   10.185262] morse micro driver registration. Version 0-rel_1_16_4_2025_Sep_18
[   10.185706] morse_spi spi0.0: morse_spi_probe: failed to init SPI with CMD63 (ret:-61)
[   10.185719] morse_spi_probe failed. The driver has not been loaded!
[   10.185721] morse_spi spi0.0: probe with driver morse_spi failed with error -61

My config.txt has these lines, and my DTBO has lines to disable spidev@

dtoverlay=spi0-0cs
dtoverlay=morse-mm610x-spi-overlay

Can someone help me get pass this issue? Thanks

NOTE: I followed Yourself’s repo and blacklisted morse, morse_spi, dot11ah from autostart.

Okay, a quick update. I was able to disable the kernel pre-defined generic spidev device. Now, I no longer see the chip select 0 already in use error.

The next hurdle is morse_spi_probe failed to init SPI with CMD63

[    9.855297] morse micro driver registration. Version 0-rel_1_16_4_2025_Sep_18
[    9.857211] morse_spi spi0.0: morse_spi_probe: failed to init SPI with CMD63 (ret:-61)
[    9.857225] morse_spi_probe failed. The driver has not been loaded!
[    9.857228] morse_spi spi0.0: probe with driver morse_spi failed with error -61

It looks like: Error -61 translates to “No data available” or “Connection refused”. This error is returned by the kernel driver when it sends an initial command (CMD63) to the physical chip over the SPI bus, but the chip does not respond at all.

I am pretty sure the pin layout table I have is correct. Any ideas what I did wrong?

Hey @salvage4703

Have a quick look at Build Thread: HaLow for Raspberry Pi OS. I have a bit towards the bottom about this exact configuration. Your devicetree looks the same to me though.

Have you physically power cycled the device (reconnected the power) or just soft booted? Unfortunately most of our deployments use a reset script to toggle the reset line on boot. If that’s not run, on warmboots you will see these errors.
If this is the problem, I can provide a driver patch so you don’t need the reset script :slight_smile:

Hi, I still cannot bring up the driver after following your post. Could you kindly provide a driver patch? Thank you very much. I will update to provide the messages and a short paragaph on what I have done.

Can you confirm if the device is showing the same error after a cold boot? The patch won’t help if you are still seeing the same error on a cold boot.

@ajudge I was able to follow your post to bring up the driver. Thank you very much for the detailed guidance.

I’m trying to set up a basic HaLow AP/STA connection following the application note guidelines. I followed the section 7 of the app note, installed the hostapd and wpa_supplicant, started the hostapd on one set of hardware, and wpa_supplicant on the other. The AP appears to start successfully with hostapd_s1g, but no beacons are being transmitted and the station cannot see the AP in scans.

Hardware & Setup x2:

  • Platform: Raspberry Pi 5
  • Pi Hat: Seeed Studio WM1302
  • PCIe Halow card: Seed Studio WM6108
  • Morse Module: Quectel FGH100MHAAMD
  • Kernel: 6.12.25-v8-16k-morse+ (custom build)
  • Driver Version: morse-rel_1_16_4_2025_Sep_18
  • Firmware: mm6108.bin
  • BCF: bcf_fgh100mhaamd.bin
  • Hostap Version: 1.16
  • Country: AU

Symptoms

On AP (node1):

  1. hostapd_s1g starts successfully:
Operating Frequency: 924000 kHz
Operating BW: 8 MHz
Primary BW: 2 MHz
wlan1: AP-ENABLED

  1. Interface shows correct AP mode:
$ sudo iw dev wlan1 info
Interface wlan1
    type AP
    ssid MorseMicro
    channel 149 (5745 MHz), width: 160 MHz, center1: 5815 MHz

  1. BUT TX counters remain at zero:
$ ip -s link show wlan1
TX: bytes packets errors dropped carrier collsns
         0       0      0       0       0       0

  1. morse_cli commands fail:
$ morse_cli -i wlan1 stats -m
NL80211, code -1: Error callback called
NL80211, code -28: Failed to rcvmsgs
Command failed with error code -28

$ morse_cli -i wlan1 channel -a
Failed to get channel frequency
Command failed with error code -28

On Station:

  1. Scans return 0 BSSes:
$ sudo iw dev wlan1 scan
(returns empty - no APs found)

$ sudo wpa_cli -p /var/run/wpa_supplicant_s1g -i wlan1 scan_results
bssid / frequency / signal level / flags / ssid
(empty)

  1. wpa_supplicant debug shows:
nl80211: Received scan results (0 BSSes)
wlan1: No suitable network found

Configuration Files

hostapd.conf:

ctrl_interface=/var/run/hostapd_s1g
interface=wlan1
driver=nl80211
hw_mode=a
ieee80211ah=1
channel=44
op_class=71
country_code=AU
s1g_prim_chwidth=1
s1g_prim_1mhz_chan_index=0
ssid=MorseMicro
beacon_int=100
dtim_period=1
ap_max_inactivity=65536
s1g_capab=[SHORT-GI-ALL]
wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_password=12345678
ieee80211w=2
wnm_sleep_mode=1
sae_pwe=1

wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant_s1g
pmf=2
sae_pwe=1

network={
    ssid="MorseMicro"
    key_mgmt=SAE
    pairwise=CCMP
    psk="12345678"
}

Driver Status

$ lsmod | grep morse
morse                 442368  0
dot11ah               114688  1 morse
crc7                   49152  1 morse
mac80211             1097728  1 morse

$ dmesg | grep morse | grep -i country
morse_spi spi0.0: Country code AE is not supported
morse_spi spi0.0: Failed to set regulatory to country AE, staying in AU
morse_spi spi0.0:     country                                 : AU

Here is more detailed dmesg output

$ dmesg | grep -i “morse|error|fail” | tail -30
[    3.993528] morse_spi spi0.0:     mcs_mask                                : 1023
[    3.993530] morse_spi spi0.0:     no_hwcrypt                              : N
[    3.993532] morse_spi spi0.0:     enable_ext_xtal_init                    : N
[    3.993533] morse_spi spi0.0:     enable_otp_check                        : Y
[    3.993535] morse_spi spi0.0:     bcf                                     : bcf_fgh100mhaamd.bin
[    3.993536] morse_spi spi0.0:     serial                                  : default
[    3.993538] morse_spi spi0.0:     debug_mask                              : 8
[    3.993540] morse_spi spi0.0:     tx_status_lifetime_ms                   : 15000
[    3.993542] morse_spi spi0.0:     tx_queued_lifetime_ms                   : 1000
[    3.993543] morse_spi spi0.0:     max_txq_len                             : 32
[    3.993545] morse_spi spi0.0:     default_cmd_timeout_ms                  : 600
[    3.993546] morse_spi spi0.0:     reattach_hw                             : N
[    3.993548] morse_spi spi0.0:     hw_reload_after_stop                    : 5
[    3.993550] morse_spi spi0.0:     enable_short_bcn_as_dtim_override       : -1
[    3.993552] morse_spi spi0.0:     fw_bin_file                             :
[    3.993553] morse_spi spi0.0:     sdio_reset_time                         : 400
[    3.993555] morse_spi spi0.0:     macaddr_suffix                          : 00:00:00
[    3.993557] morse_spi spi0.0:     macaddr_octet                           : 255
[    3.993558] morse_spi spi0.0:     max_total_vendor_ie_bytes               : 514
[    3.993560] morse_spi spi0.0:     coredump_include                        : 1
[    3.993562] morse_spi spi0.0:     coredump_method                         : 1
[    3.993563] morse_spi spi0.0:     enable_coredump                         : Y
[    3.993565] morse_spi spi0.0:     spi_use_edge_irq                        : N
[    3.993567] morse_spi spi0.0:     spi_clock_speed                         : 50000000
[    3.993568] morse_spi spi0.0:     enable_mm_vendor_ie                     : Y
[    3.993570] morse_spi spi0.0:     fixed_guard                             : 0
[    3.993571] morse_spi spi0.0:     fixed_ss                                : 1
[    3.993573] morse_spi spi0.0:     fixed_bw                                : 2
[    3.993574] morse_spi spi0.0:     fixed_mcs                               : 4
[    3.993576] morse_spi spi0.0:     enable_fixed_rate                       : N

What I’ve Tried

  1. Verified both nodes have driver loaded correctly
  2. Confirmed firmware and BCF loaded successfully
  3. Checked regulatory domain is set to AU on both nodes
  4. Verified devices are physically close (6 inches apart without antenna)
  5. Restarted hostapd multiple times
  6. Tried manual scans with iw and wpa_supplicant

Based on the symptoms, it seems the firmware is not communicating with userspace applications:

  1. Driver loads successfully - dmesg shows firmware/BCF loaded with correct checksums
  2. hostapd reports success - AP-ENABLED message appears
  3. BUT no actual transmission - TX counters stay at 0, no beacons sent
  4. morse_cli fails with -28 - indicates netlink communication failure between driver and firmware
  5. No response to any commands - firmware appears unresponsive to all control requests

Questions

  1. Is it normal to have hostapd report “AP-ENABLED” but TX counters stay at 0?
  2. Why is morse_cli failing with error -28 (netlink communication failure)?
  3. Is there a firmware initialization step I’m missing?
  4. Are there any debug parameters or test modes I should try?

Any help would be greatly appreciated!

Hi @salvage4703

Apologies for the late reply.

No if hostap has started the AP, it should be beaconing.

I don’t recommend this, having an unloaded output (ie, no antenna connected), can damage the front end. Instead place the units ~1-2m away and use an antenna.

Please share the full dmesg output, after starting hostap. Consider loading the morse module with modparam debug_mask=0xf .

Please also run hostapd_s1g with -vv for extra logging.

If the driver is loading the firmware and BCF, there shouldn’t be anything that you are missing.

If you’re running this on a Raspberry Pi as per the build thread, you might find that NetworkManager is trying to take control of the interface and preventing a secondary application from starting it. Try running nmcli dev status to see if Network Manager is trying to manage your interface. If so, use

nmcli dev set wlan1 managed no

and then try to start hosapd_s1g as normal.

1 Like