Connection problems with a linux phone

Hello, I have a pinephone problems to connect to one GL.inet S-1300 running 21.02.5, it was connecting fine until two days ago, I was running arch then I formatted the phone intalled mobian and could not connect anymore. Then I isntalled postmarket OS the problem persisted, but then I try connecting on another network with a TP-link WDR4300 with 23.03.3 and it works fine. Any ideas what could it be? I just rebooted the S1300 and the problem persists.

Is this running GL-Inet's firmware (based on 21.02.5) or is it using a genuine OpenWrt version?
What is the output of:

ubus call system board

genuire OpenWrt, not GL.inet fork

# ubus call system board
{
	"kernel": "5.4.215",
	"hostname": "OpenWrt",
	"system": "ARMv7 Processor rev 5 (v7l)",
	"model": "GL.iNet GL-S1300",
	"board_name": "glinet,gl-s1300",
	"release": {
		"distribution": "OpenWrt",
		"version": "21.02.5",
		"revision": "r16688-fa9a932fdb",
		"target": "ipq40xx/generic",
		"description": "OpenWrt 21.02.5 r16688-fa9a932fdb"
	}
}

Ok... good.

So, first thing -- consider upgrading to 22.03.3 to stay at the latest. But 21.02 is still supported for now, so that's fine, too.

Let's take a look at your configuration files:

Please 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:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
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 ula_prefix 'fd4c:7d05:f623::/48'

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

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'eth1'
	option proto 'dhcp'

config interface 'wan6'
	option device 'eth1'
	option proto 'dhcpv6'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '3 4 0'

cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/a000000.wifi'
	option band '2g'
	option htmode 'HT20'
	option channel 'auto'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'xxxx'
	option encryption 'sae-mixed'
	option key 'xxxxxxx'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/a800000.wifi'
	option band '5g'
	option htmode 'VHT80'
	option channel 'auto'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'xxxxxx'
	option encryption 'sae'
	option key 'xxxxxxxxxxxxxxxx'

config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'ap'
	option ssid 'xxxxxxxxxxxxxxxx'
	option key 'xxxxxxxxxxxxx'
	option encryption 'sae-mixed'
cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	option ra_slaac '1'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

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'
cat /etc/config/firewall
config defaults
	option syn_flood	1
	option input		ACCEPT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

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

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

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
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

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
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

# Allow essential incoming IPv6 ICMP traffic
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

# Allow essential forwarded IPv6 ICMP traffic
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

# allow interoperability with traceroute classic
# note that traceroute uses a fixed port range, and depends on getting
# back ICMP Unreachables.  if we're operating in DROP mode, it won't
# work so we explicitly REJECT packets on these ports.
config rule
	option name		Support-UDP-Traceroute
	option src		wan
	option dest_port	33434:33689
	option proto		udp
	option family		ipv4
	option target		REJECT
	option enabled		false

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#	option src		lan
#	option src_ip	xxxxxxxxxxxxxxxxxx
#	option dest		wan
#	option proto	tcp
#	option target	REJECT

# block a specific mac on wan
#config rule
#	option dest		wan
#	option src_mac	xxxxxxxxxxxxxxxxxxxx
#	option target	REJECT

# block incoming ICMP traffic on a zone
#config rule
#	option src		lan
#	option proto	ICMP
#	option target	DROP

# port redirect port coming in on wan to lan
#config redirect
#	option src			wan
#	option src_dport	80
#	option dest			lan
#	option dest_ip		xxxxxxxxxxxxxxxxxx
#	option dest_port	80
#	option proto		tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#	option src		wan
#	option src_dport	22001
#	option dest		lan
#	option dest_port	22
#	option proto		tcp

### FULL CONFIG SECTIONS
#config rule
#	option src		lan
#	option src_ip	xxxxxxxxxxxxxxxx
#	option src_mac	xxxxxxxxxxxxx
#	option src_port	80
#	option dest		wan
#	option dest_ip	xxxxxxxxxxxxxxxx
#	option dest_port	120
#	option proto	tcp
#	option target	REJECT

#config redirect
#	option src		lan
#	option src_ip	xxxxxxxxxxxxxxxxxx
#	option src_mac	xxxxxxxxxxxxxxxx
#	option src_port		1024
#	option src_dport	80
#	option dest_ip	xxxxxxxxxxxxxxxx
#	option dest_port	120
#	option proto	tcp

Start by setting your country code in the wifi configuration. If that doesn't fix your problem, try using WPA2 Personal (PSK2) instead of sae and sae-mixed (WPA2/3 mixed mode is problematic on many different devices; WPA3 is not universally supported, either).

I copied and paste the output from 6days ago, the only things changed is wpa2 only for the 2.4 connections and I set the time and time zone that was missing.

Already did it, which fixed the connection for an android device, but my pinephone was working even before it.

So let's see the latest wireless config file to make sure there aren't any other errors.

# cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/a000000.wifi'
	option band '2g'
	option channel 'auto'
	option cell_density '0'
	option htmode 'HT40'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'my wifi2.4'
	option key 'passwd
	option encryption 'psk2'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/a800000.wifi'
	option band '5g'
	option htmode 'VHT80'
	option channel 'auto'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'my wifi5.0'
	option encryption 'sae'
	option key 'passwd'

config wifi-iface 'wifinet2'
	option device 'radio0'
	option mode 'ap'
	option ssid 'my guest 2.4 wifi'
	option key 'passwd'
	option encryption 'psk2'

I don't see the country codes set anywhere, and I still see sae encryption on the "my wifi5.0" sSID.

1 Like

I tried upgrading to 23.03.3, but the router was getting bricked, I recover about 3 times with uboot. Than got back to 21.02.5

This might be worth opening another thread to discuss... maybe someone can help you figure out what is happening, or, if there is no good explanation for what is happening, it may potentially be a bug. But that's a different conversation, of course.

1 Like

On LUCI for the 5.0 wifi I see Encryption: WPA3 SAE (CCMP), and under system-general settings-time zone I have it correct. Seems to not be holding it?

Will do it, already opened it on GL.inet forum: https://forum.gl-inet.com/t/s1300-problems-installing-latest-versions-of-openwrt/26512

right... and I'm suggesting you make it WPA2 Personal (PSK), since WPA3/SAE is not universally supported.

The country code is different than time zone. You will find country code in the wifi settings. This should be set according to where you are so that your device operates properly and within the regulations of your region.

If you're trying to install the official OpenWrt firmware, you should raise the issue here rather than with GL-inet. Issues that pertain to their forks should be discussed on the gl-inet forums.

2 Likes

I see, I left the 5.0 Ghz with wpa3 only as I don't use it for the phones, but will convert to wpa2 only as well.

Indeed, I saw it now, it was set to 'hardware's default(US)' Changed to my land, thanks!

1 Like

great. Did it fix the issue?