Hotspot setup on Wyse 3040 (AW-CM389MA wifi adapter) problems

Required Information

  • DietPi version | cat /boot/dietpi/.version -
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=7
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bookworm

  • Kernel version | uname --all
    Linux DietPi 6.1.0-25-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux

  • Architecture | dpkg --print-architecture
    amd64

  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    Native PC (x86_64)

  • Power supply used | (EG: 5V 1A RAVpower)
    5V 2A

  • SD card used | (EG: SanDisk ultra)
    none

Additional Information (if applicable)

Good day everyone,

I’m trying to setup Hotspot on Wyse 3040 with Marvell (AW-CM389MA) wifi m.2 card. All drivers are installed already. Wifi card seems to be working. Hostapd and dhcpd installed and configured.

The problem is that I can’t connect to the created wifi network. I tried many devices without success. Help me please.

root@DietPi:~$ cat /etc/network/interfaces
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/

# Drop-in configs
source interfaces.d/*

auto lo eth0 mlan0

iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 192.168.2.1

# WiFi
# allow-hotplug mlan0 
iface mlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
#gateway 192.168.42.1
#dns-nameservers 9.9.9.9 149.112.112.112

# iptables NAT rules
up iptables-restore < /etc/iptables.ipv4.nat
up ip6tables-restore < /etc/iptables.ipv6.nat
root@DietPi:~$ cat /etc/hostapd/hostapd.conf
interface=mlan0
#bridge=br0
driver=nl80211
ssid=Wyse3040
country_code=US
hw_mode=g
channel=3
#ieee80211n=0
#ieee80211ac=0
#ieee80211ax=0
#wmm_enabled=0
macaddr_acl=0
auth_algs=1
#ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
root@DietPi:~$ cat /etc/dhcp/dhcpd.conf
authoritative;
#default-lease-time 43200;
#max-lease-time 86400;

subnet 192.168.42.0 netmask 255.255.255.0 {
	range 192.168.42.10 192.168.42.250;
	option broadcast-address 192.168.42.255;
	option routers 192.168.42.1;
	option domain-name "local";
	option domain-name-servers 9.9.9.9, 149.112.112.112;
}
root@DietPi:~$ systemctl status isc-dhcp-server.service 
● isc-dhcp-server.service - LSB: DHCP server
     Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
     Active: active (running) since Mon 2024-09-30 14:02:21 BST; 15min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 706 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=0/SUCCESS)
      Tasks: 1 (limit: 2199)
     Memory: 6.5M
        CPU: 160ms
     CGroup: /system.slice/isc-dhcp-server.service
             └─718 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf mlan0

Sep 30 14:02:19 DietPi systemd[1]: Starting isc-dhcp-server.service - LSB: DHCP server...
Sep 30 14:02:19 DietPi isc-dhcp-server[706]: Launching IPv4 server only.
Sep 30 14:02:19 DietPi dhcpd[718]: Wrote 0 leases to leases file.
Sep 30 14:02:19 DietPi dhcpd[718]: Server starting service.
Sep 30 14:02:21 DietPi isc-dhcp-server[706]: Starting ISC DHCPv4 server: dhcpd.
Sep 30 14:02:21 DietPi systemd[1]: Started isc-dhcp-server.service - LSB: DHCP server.
root@DietPi:~$ systemctl status hostapd.service 
● hostapd.service - Access point and authentication server for Wi-Fi and Ethernet
     Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-09-30 14:02:19 BST; 16min ago
       Docs: man:hostapd(8)
    Process: 691 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=0/SUCCESS)
   Main PID: 696 (hostapd)
      Tasks: 1 (limit: 2199)
     Memory: 4.9M
        CPU: 130ms
     CGroup: /system.slice/hostapd.service
             └─696 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf

Sep 30 14:02:19 DietPi systemd[1]: Starting hostapd.service - Access point and authentication server for Wi-Fi and Ethernet...
Sep 30 14:02:19 DietPi hostapd[691]: nl80211: kernel reports: Registration to specific type not supported
Sep 30 14:02:19 DietPi hostapd[691]: mlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Sep 30 14:02:19 DietPi systemd[1]: Started hostapd.service - Access point and authentication server for Wi-Fi and Ethernet.
Sep 30 14:04:27 DietPi hostapd[696]: mlan0: STA 46:eb:28:97:ec:89 IEEE 802.11: associated
Sep 30 14:04:28 DietPi hostapd[696]: mlan0: STA 46:eb:28:97:ec:89 RADIUS: starting accounting session E36C387086830E7E
Sep 30 14:04:28 DietPi hostapd[696]: mlan0: STA 46:eb:28:97:ec:89 WPA: pairwise key handshake completed (RSN)
Sep 30 14:04:46 DietPi hostapd[696]: mlan0: STA 46:eb:28:97:ec:89 IEEE 802.11: disassociated

Do you get some error message when you try to connect to the network?

Did you set a country code?

Error doesn’t appear. After a few seconds I get message ‘cannot connect to the wifi’.

Look at configuration above, I set country to US, but I tried already other countries like DE, UK etc.

UPDATE:

When I’m trying to connect using PC, connection is established, but I didn’t get proper ip and mask values. I’m getting 169.254.24.250 and 255.255.0.0.

can you try setting a STATIC IP on your client. Does it allow to connect to your network?

Can you give the output of ip a, maybe it gives some additional hints.

root@DietPi:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether f0:d4:e2:f2:f8:81 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.5/24 brd 192.168.2.255 scope global dynamic eth0
       valid_lft 68312sec preferred_lft 68312sec
3: mlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether a8:1d:16:8c:36:9f brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.1/24 brd 192.168.42.255 scope global mlan0
       valid_lft forever preferred_lft forever

Unfortunately I can’t.

You can’t change or you can’t connect with the PC?

I can change to static addresses, but still I can’t connect to the AP.

I thought your PC was able to connect but did not get an IP address. So it is not connecting at all?

Yes, that’s correct. I’m able to connect to the AP, but there’s no response from dhcp server, even when I put static addresses it doesn’t work.