Difficulty connecting Alexa device to OpenWrt wifi network

Hello, did you connect an Alexa speaker to the network? Why can't I connect mine to my openwrt's WiFi :frowning:

I have moved your issue to a new thread because the one you originally posted in was for an entirely different topic (controlling OpenWrt with Alexa).

Generally, you follow the directions for connecting an Alexa device to any wifi network. We don't have the ability to support those devices here, but we can verify that your configuration is setup properly.

First, are you getting any errors or other indications of why it won't connect?

Next, let's see your configuration.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

This is all the configuration, I already restored the openwrt and Alexa echoed and it doesn't connect me

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.150",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Xiaomi Mi Router 4A Gigabit Edition",
        "board_name": "xiaomi,mi-router-4a-gigabit",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"
        }
}

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '10.0.0.192'
        option netmask '255.255.255.192'
        option gateway '192.8.8.1'
        option delegate '0'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'
root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option band '2g'
        option cell_density '0'
        option channel '8'
        option country 'PE'
        option legacy_rates '1'
        option htmode 'HT40'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel 'auto'
        option band '5g'
        option htmode 'VHT20'
        option cell_density '0'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'Saavedra.A'
        option encryption 'sae'
        option key 'password'

config wifi-iface 'wifinet3'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Saavedra.A'
        option encryption 'sae'
        option key 'password'
        option network 'lan'

config wifi-iface 'wifinet2'
        option device 'radio1'
        option mode 'ap'
        option ssid 'IoT'
        option encryption 'psk-mixed'
        option key 'password'
        option network 'lan'
        option wmm '0'
        option disassoc_low_ack '0'
        option ieee80211w '0'
root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'saavedra.a'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '193'
        option limit '63'
        option leasetime '10m'
        option dhcpv4 'server'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'
root@OpenWrt:~# cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

You've got several problems...

First, why are you using a /26 network? That's fine in general, but the standard is to use a /24. I'd recommend that just in case the alexa device isn't smart enough to deal with a smaller subnet (it should be, but iot devices are sometimes built with certain assumptions).

Remove the gateway line from below.

Turn off legacy rates and use channel 1, 6, or 11 (these are the no-overlapping channels). Don't use 8 since it's actually likely to experience more noise from both channel 6 and channel 11 on nearby wifi devices.

There's no value in having a separate SSID for your IoT network if it's actually connecting to the same lan. But that said, use WPA2. Do not use psk-mixed... just psk2 (and don't use sae-mixed either) -- this ia very likely to cause an issue.

Your DHCP server is not valid (the start is out of range, and the limit is already larger than your /26 subnet). This means it probably isn't providing any DHCP leases.

I'd recommend changing your network interface to be a /24 and then use the default values (start =100; limit = 150). Also, why do you have a 10m lease time?

1 Like

in addition to the things @psherman pointed out, did you try connecting to the same wifi with something else than your Alexa device ?

Yes, with my phone and my laptop, when I connect Alexa to another router there is no problem so the problem is the openwrt configuration.

your openwrt configurtion ...

2 Likes

option wmm '0'

this restricts all radios to wifi-g and less.

2 Likes

Alexa devices are temperamental, mine will not connect to certain channels and bandwidth configuration.
For example my echo plus refuses to connect to 2.4ghz channel 13 at 20mhz even though it's a valid configuration here in the UK.
It also begrudgingly connects to 5ghz channel 149 at 80mhz, but if that is set to 160MHz the Alexa happily informs me the router has a problem please reboot the router.

Alexa devices expect wireless to be broadcasting in North American standard only as nowhere else can possibly exist.

If you are not in North America, channels 1,5,9 and 13 can be used instead of 1, 6 and 11.

1 Like

Reinstall the original firmware of the router and search for the Wi-Fi configuration, this is the result.
The file is the following /etc/Wireless/mt7603e/mt7603e.dat
Any ideas?

# Generated by uci2dat
# The word of "Default" must not be removed
Default
CountryRegion=1
CountryRegionABand=10
CountryCode=PE
BssidNum=3
SSID1=IoT
SSID2=minet_ready
SSID3=
SSID4=
WirelessMode=9
TxRate=0
Bsd=0
Channel=11
BasicRate=15
BeaconPeriod=100
DtimPeriod=1
TxPower=100
PERCENTAGEenable=
EntryLifeCheck=0
ed_th_nonCE=512
ed_chk=0
DisableOLBC=0
BGProtection=0
MaxStaNum=32
TxAntenna=
RxAntenna=
TxPreamble=0
RTSThreshold=2347
FragThreshold=2346
TxBurst=1
PktAggregate=0
TurboRate=0
WmmCapable=1
APSDCapable=1
DLSCapable=0
APAifsn=3;7;1;1
APCwmin=4;4;3;2
APCwmax=6;10;4;3
APTxop=0;0;94;47
APACM=0;0;0;0
BSSAifsn=3;7;2;2
BSSCwmin=4;4;3;2
BSSCwmax=10;10;4;3
BSSTxop=0;0;94;47
BSSACM=0;0;0;0
AckPolicy=0;0;0;0
NoForwarding=0;0;0;
NoForwardingBTNBSSID=0
HideSSID=0;1;0
dynbcn=0
rssithreshold=0
StationKeepAlive=0
ShortSlot=1
AutoChannelSelect=0
IEEE8021X=0
IEEE80211H=0
DfsCalibration=0
DfsEnable=0
CSPeriod=10
WirelessEvent=1
IdsEnable=0
AuthFloodThreshold=32
AssocReqFloodThreshold=32
ReassocReqFloodThreshold=32
ProbeReqFloodThreshold=32
DisassocFloodThreshold=32
DeauthFloodThreshold=32
EapReqFooldThreshold=32
PreAuth=0
AuthMode=WPA2PSK;OPEN;OPEN
EncrypType=AES;NONE;NONE
RekeyInterval=0
PMKCachePeriod=10
WPAPSK1=password
WPAPSK2=
WPAPSK3=
WPAPSK4=
DefaultKeyID=1
Key1Type=1;1;1;1
Key1Str1=
Key1Str2=
Key1Str3=
Key1Str4=
Key2Type=1;1;1;1
Key2Str1=
Key2Str2=
Key2Str3=
Key2Str4=
Key3Type=1;1;1;1
Key3Str1=
Key3Str2=
Key3Str3=
Key3Str4=
Key4Type=1;1;1;1
Key4Str1=
Key4Str2=
Key4Str3=
Key4Str4=
BsdMaclistMode=0
BsdList2g=
BsdList5g=
AccessPolicy0=0
AccessControlList0=
AccessPolicy1=0
AccessControlList1=
AccessPolicy2=0
AccessControlList2=
AccessPolicy3=0
AccessControlList3=
WdsEnable=0
WdsEncrypType=NONE
WdsList=
Wds0Key=
Wds1Key=
Wds2Key=
Wds3Key=
RADIUS_Server=192.168.2.3
RADIUS_Port=1812
RADIUS_Key1=ralink
RADIUS_Key2=
RADIUS_Key3=
RADIUS_Key4=
own_ip_addr=192.168.5.234
EAPifname=br-lan
PreAuthifname=br-lan
HT_HTC=0
HT_RDG=0
HT_EXTCHA=0
HT_LinkAdapt=0
HT_OpMode=0
HT_MpduDensity=5
HT_BW=0
VHT_BW=0
VHT_SGI=1
VHT_STBC=0
VHT_BW_SIGNAL=0
VHT_DisallowNonVHT=0
HT_AutoBA=1
HT_AMSDU=0
RX_AMSDU=1
HT_BAWinSize=64
HT_GI=1
HT_MCS=33
WscManufacturer=xiaomi
WscModelName=R4A
VHT_LDPC=0
WscDeviceName=XiaoMiRouter
WscModelNumber=0002
WscSerialNumber=
MiDeviceName=XiaoMiRouter
MiDep=2
GuestWpsDevice=XiaoMiRouter_guest
WeakEnable=0;0;0
WeakThreshold=0;0;0
KickThreshold=0;0;0
RadioOn=1
FixedTxMode=0
AutoProvisionEn=0
FreqDelta=0
CarrierDetect=0
PreAntSwitch=1
PhyRateLimit=0
DebugFlags=0
ITxBfTimeout=0
ETxBfNoncompress=0
FineAGC=0
StreamMode=0
StreamModeMac0=
StreamModeMac1=
StreamModeMac2=
StreamModeMac3=
RDRegion=
DfsLowerLimit=0
DfsUpperLimit=0
DfsOutdoor=0
SymRoundFromCfg=0
BusyIdleFromCfg=0
DfsRssiHighFromCfg=0
DfsRssiLowFromCfg=0
DFSParamFromConfig=0
FCCParamCh0=
FCCParamCh1=
FCCParamCh2=
FCCParamCh3=
CEParamCh0=
CEParamCh1=
CEParamCh2=
CEParamCh3=
JAPParamCh0=
JAPParamCh1=
JAPParamCh2=
JAPParamCh3=
JAPW53ParamCh0=
JAPW53ParamCh1=
JAPW53ParamCh2=
JAPW53ParamCh3=
FixDfsLimit=0
LongPulseRadarTh=0
AvgRssiReq=0
DFS_R66=0
BlockCh=
GreenAP=0
WapiPsk1=
WapiPsk2=
WapiPsk3=
WapiPsk4=
WapiPsk5=
WapiPsk6=
WapiPsk7=
WapiPsk8=
WapiPskType=
Wapiifname=
WapiAsCertPath=
WapiUserCertPath=
WapiAsIpAddr=
WapiAsPort=
RekeyMethod=DISABLE
MeshAutoLink=1
MeshAuthMode=OPEN
MeshEncrypType=NONE
MeshDefaultkey=1
MeshWEPKEY=
MeshWPAKEY=
MeshId=MESH
HSCounter=0
HT_BADecline=0
HT_STBC=0
HT_LDPC=0
HT_TxStream=2
HT_RxStream=2
HT_PROTECT=1
HT_DisallowTKIP=0
HT_BSSCoexistence=0
WscConfMode=6;6;6
WscConfStatus=2;2;2
WCNTest=0
WdsPhyMode=
RADIUS_Acct_Server=
RADIUS_Acct_Port=1813
RADIUS_Acct_Key=
Ethifname=
session_timeout_interval=0
idle_timeout_interval=0
WiFiTest=0
TGnWifiTest=0
ApCliEnable=0
ApCliSsid=
ApCliBssid=
ApCliAuthMode=
ApCliEncrypType=
ApCliWPAPSK=
ApCliDefaultKeyID=0
ApCliKey1Type=0
ApCliKey1Str=
ApCliKey2Type=0
ApCliKey2Str=
ApCliKey3Type=0
ApCliKey3Str=
ApCliKey4Type=0
ApCliKey4Str=
EfuseBufferMode=0
E2pAccessMode=2
BW_Enable=0
BW_Root=0
BW_Priority=
BW_Guarantee_Rate=
BW_Maximum_Rate=
AutoChannelSkipList=12;13;
WscConfMethod=
WscKeyASCII=
WscSecurityMode=0
Wsc4digitPinCode=
WscVendorPinCode=
WscV2Support=
HT_MIMOPS=3
G_BAND_256QAM=0
DBDC_MODE=0
txbf=0
ETxBfEnCond=0
ETxBfIncapable=1
ITxBfEn=0
IgmpSnEnable=1
MUTxRxEnable=0
ITxBfEnCond=0
DynamicVGA=1

@arian.alvarezs you've already got the answer from @brada4 on the stock firmware wmm is enabled and on Openwrt you have it as disabled.

You're forcing alexa to connect to 802.11g when it knows the wireless is 802.11n capable so it's going no thanks

Wifi setup to replicate (separate AP, can be in same network as everyday AP):
set country
dtimperiod=1 -> find in luci, change default 2 to 1
wpa2psk and force aes , no mention of PMF, so do not enable that.
you can set AP in each band, but be careful to NOT enable any roaming protocols on that AP(s)

Ok thanks everyone for your help, I was experimenting with different settings and my conclusion is the following to connect the echo dot 4 to the network:

āœ“ Use WPA2-PSK and AES only
āœ“ WMM Mode activate
āœ“ Use only IP range 192.168.x.0/24 Where x is any number between 0 and 255.
The last two are really important, they cannot be changed, the first is for security.

@frollic @hecatae @brada4 @psherman

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.