Lan port to wan TL-WR802N V4

Can anyone help witch changing Lan port to Wan.
Now it connects as ap client to other Ap.
I want to make a backup when no Ap availble then Wan port is for internet Access.


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 'fd00:8174:62f0::/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 switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '0'

config interface 'wwan'
	option proto 'dhcp'

config interface 'ZT'
	option proto 'none'
	option device 'ztbto32yyo'


Remove eth0 from br-lan.

Then create a new interface for the wan that looks like this

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

This is not working.
WAN
eth0
Protocol: DHCP client
MAC: E4:C3:2A:6C:69:CC
RX: 0 B (0 Pkts.)
TX: 0 B (0 Pkts.)

lets see your latest config

ok works, it downloaded the IP address It was probably the Router because I connected to another router and it downloaded when I reset my basic one it worked but the internet I still don't have

internet appeared only after Wan restart what can I do to make it work automatically.
When ap client connections is broken or not availble then it connect by Wan

You should probably be using travelmate. Check it out and give it a shot.