When using wizard to define device as AP as router, it sets its br0 i/f to be 192.168.1.1. When my client connects halow, it assigns the client’s wlan0 i/f 192.168.1.194.
If I setup the AP as bridge, I have to connect it to a router to get ip assignment, whose dhcp assigns the ap 192.168.1.2, for instance, and the client 192.168.1.3.
I needed the log below for this question, so I started the client running first and waited until its boot process was done so I could see what happens after I turn on the AP (using uart0 debug console). In this case, the AP is router. Then I turn on the AP. The log below is from the client and starts happening after the AP got booted, started the morse driver with sd going. In this process, halow gets connected then the AP tells the client its ip addr which sets wlan0 ipaddr to 192.168.1.194. Similar process happens if AP is bridge and connected to a router, the router assigns the ip addr’s.
In this process, if the AP is router, its ip is defined in the build as 192.168.1.1, so the client can use that when it needs to know the AP’s ip addr. However, if the AP is setup as bridge, is there any way for the client to know the AP’s ip addr?
What problem is trying to be solved: I need the AP and client to run socat. socat on each device needs to know the AP ip addr to setup the connection. Thus, if you could advise on a) how does each the AP and client know what the AP ip addr is when assigned and b) the best place to start socat with that information (and easist way to kill socat process if that happens to already be running), that would be very helpful.
Log of client when AP starts interacting with it to connect halow and set client halow ip addr:
Mon Nov 25 22:15[ 778.848568] wlan0: authenticate with 1c:bc:ec:21:64:41
:55 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: SME: Trying to authenticate with 1c:bc:ec:21:64:41 (SSID='NSAP1' chan=11)
Mon Nov 25 22:15:55 2024 kern.info kernel: [ 778.848568] wlan0: authenticate with 1c:bc:ec:21:64:41
[ 779.154268] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
Mon Nov 25 22:15:55 2024 kern.info kernel: [ 779.154268] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
[ 779.268364] wlan0: send auth to 1c:bc:ec:21:64:41 (try 2/3)
Mon Nov 25 22:15:55 2024 kern.info kernel: [ 779.268364] wlan0: send auth to 1c:bc:ec:21:64:41 (try 2/3)
[ 779.388373] wlan0: send auth to 1c:bc:ec:21:64:41 (try 3/3)
Mon Nov 25 22:15:55 2024 kern.info kernel: [ 77[ 779.415546] wlan0: authenticated
9.388373] wlan0:[ 779.426440] wlan0: waiting for beacon from 1c:bc:ec:21:64:41
send auth to 1c:bc:ec:21:64:41 (try 3/3)
Mon Nov 25 22:15:55 2[ 779.448390] wlan0: associate with 1c:bc:ec:21:64:41 (try 1/3)
024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: Trying to associate with 1c:bc:ec:21:64:41 (SSID='NSAP1' chan=-1)
Mon Nov 25 22:15:55 2024 kern.info kernel: [ 779.415546] wlan0: authentic[ 779.491711] wlan0: RX AssocResp from 1c:bc:ec:21:64:41 (capab=0x11 status=53 aid=0)
ated
Mon Nov 25[ 779.508927] wlan0: 1c:bc:ec:21:64:41 denied association (code=53)
22:15:55 2024 kern.info kernel: [ 779.426440] wlan0: waiting for beacon from 1c:bc:ec:21:64:41
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 779.448390] wlan0: associate with 1c:bc:ec:21:64:41 (try 1/3)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 779.491711] wlan0: RX AssocResp from 1c:bc:ec:21:64:41 (capab=0x11 status=53 aid=0)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 779.508927] wlan0: 1c:bc:ec:21:64:41 denied association (code=53)
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: CTRL-EVENT-ASSOC-REJECT bssid=1c:bc:ec:21:64:41 status_code=53
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: PMKSA-CACHE-REMOVED 1c:bc:ec:21:64:41 0
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: morse: disable long sleep on ifname wlan0
Mon Nov 25 22:15[ 779.688501] wlan0: authenticate with 1c:bc:ec:21:64:41
:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: SME: Trying to authenticate with 1c:bc:ec:21:64:41 (SSID='NSAP1' chan=11)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 779.688501] wlan0: authenticate with 1c:bc:ec:21:64:41
[ 779.996029] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 779.996029] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
Mon Nov 25 22:15[ 780.223331] wlan0: authenticate with 1c:bc:ec:21:64:41
:56 2024 daemon.[ 780.235911] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
notice wpa_supplicant_s1g[4230]: wlan0: SME: Trying to authenticate with 1c:bc:ec:21:64:41 (SSID='NSAP1' chan=11)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.223331] wlan0: authenticate with 1c:bc:ec:21:64:41
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.235911] wlan0: send auth to 1c:bc:ec:21:64:41 (try 1/3)
[ 780.312944] wlan0: authenticated
[ 780.322223] wlan0: waiting for beacon from 1c:bc:ec:21:64:41
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: PMKSA-CACHE-ADDED 1c:bc:ec:21:64:41 0
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: Trying to associate with [ 780.368354] wlan0: associate with 1c:bc:ec:21:64:41 (try 1/3)
1c:bc:ec:21:64:41 (SSID='NSAP1' chan=-1)
Mon Nov 25 22:15:56 20[ 780.392131] wlan0: RX AssocResp from 1c:bc:ec:21:64:41 (capab=0x11 status=0 aid=2)
24 kern.info kernel: [ 780.312944] wlan0: authe[ 780.414514] wlan0: associated
nticated
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.322223] wlan0: waiting for beacon from 1c:bc:ec:21:64:41
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.368354] wlan0: associate with 1c:bc:ec:21:64:41 (try 1/3)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.392131] wlan0: RX AssocResp from 1c:bc:ec:21:64:41 (capab=0x11 status=0 aid=2)
Mon Nov 25 22:15:56 2024 kern.info kernel: [ 780.414514] wlan0: associated
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: Associated with 1c:bc:ec:21:64:41
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Mon Nov 25 22:15:56 2024 daemon.notice netifd: Network device 'wlan0' link is up
Mon Nov 25 22:15:56 2024 daemon.notice netifd: Interface 'ahwlan' has link connectivity
Mon Nov 25 22:15:56 2024 daemon.notice netifd: Interface 'ahwlan' is setting up now
Mon Nov 25 22:15:56 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: WPA: Key negotiation completed with 1c:bc:ec:21:64:41 [PTK=CCMP GTK=CCMP]
Mon Nov 25 22:15:57 2024 daemon.notice wpa_supplicant_s1g[4230]: wlan0: CTRL-EVENT-CONNECTED - Connection to 1c:bc:ec:21:64:41 completed [id=0 id_str=]
Mon Nov 25 22:15:57 2024 daemon.notice netifd: ahwlan (6507): udhcpc: started, v1.36.1
Mon Nov 25 22:15:57 2024 daemon.notice netifd: ahwlan (6507): udhcpc: broadcasting discover
Mon Nov 25 22:15:59 2024 daemon.notice netifd: ahwlan (6507): udhcpc: broadcasting discover
Mon Nov 25 22:16:02 2024 daemon.notice netifd: ahwlan (6507): udhcpc: broadcasting select for 192.168.1.194, server 192.168.1.1
Mon Nov 25 22:16:02 2024 daemon.notice netifd: ahwlan (6507): udhcpc: lease of 192.168.1.194 obtained from 192.168.1.1, lease time 43200
Mon Nov 25 22:16:02 2024 daemon.notice netifd: Interface 'ahwlan' is now up
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using nameserver 192.168.1.1#53
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Mon Nov 25 22:16:02 2024 daemon.info dnsmasq[1]: using only locally-known addresses for privlan
Mon Nov 25 22:16:02 2024 user.notice HOTPLUG: ****** 'ifup' - device:'wlan0' interface:'ahwlan' ******
Mon Nov 25 22:16:03 2024 user.notice firewall: Reloading firewall due to ifup of ahwlan (wlan0)