mrw wrote: 
> I don't have a Radio TTL'd at the moment, so I can't confirm this:
> I would guess that the re-association generates a WPA "CONNECTED"
> message that would cause the -wpa_cli- -wpa_action- script to do:
> > 
Code:
--------------------
  >   > 
  > # Kick DHCP client to do a renewal
  > kill -usr1 `cat /var/run/udhcpc.$IFNAME.pid`
  > 
--------------------
> > 
> Plausibly, the result of this could have resulted, in an environment
> of poor connectivity, a failure to do a proper renewal. The
> consequences of that on "Check Network" could be various... I shall
> not speculate without reading through the code.
> Incidentally, the -wpa_action- script fails on a WPA "DISCONNECTED"
> message because the busybox shell doesn't seem to like an -if- clause
> with no command inside it. But it didn't have to do anything anyway,
> so it shouldn't matter. Having said that, I wonder how -wpa_cli- would
> respond to the failure... 
> I'll have a go the next time my Radio is TTL'd to see what really
> happens.
Thanks for the tip. My own investigation using the TTL serial connection
revealed that the simple wpa_cli reassoc command caused the jive
Settings | Advanced | Diagnostics: "Check Network", "Wireless Info", and
"Server Info" displays to (incorrectly) report network failure, when, in
fact, the network was working, and the music kept playing.

This has lead to a new requirement for the script: keep jive happy. I
had forgotten about this stuff because the "Repair Network" never worked
for me and was lulled into complacency by the music playing, and the
wireless icon staying, or returning to, white. 

I haven't reviewed the jive code, so I don't know why it reported
connection failure. Repair Network reported an arp error with the
radio's ip address already taken. This has to be worked around. 

Here is this morning's workaround, which seems to keep jive happy. Here,
anyway. It adds statements to the ResetQuick() function to first take
the wireless network down, then re-associate, then to bring the network
up: ifconfig eth1 down ; wpa_cli reassoc ; ifconfig eth1, which you can
enter (all on one line!) from your ssh terminal and not be disconnected.


After a bit more testing, the following will be pushed to the GitHub
development branch, and eventually to a new release.


Code:
--------------------
    -Version="0.7.3 3/20/2021"
  +Version="0.7.4 3/22/2021"
  
  @@ -148,8 +148,6 @@
  
  -ResetQuick() {                          # 0.7.0
  +ResetQuick() {                          # 0.7.4 new requirement: keep jive 
happy 0.7.0
  DTQRST=`date -Iseconds`
  -    echo $DTQRST "Resetting wlan..."
  +    echo $DTQRST "Resetting wlan..." $IFACE
  +    ifconfig $IFACE down                # 0.7.4 keep jive happy
  wpa_cli reassociate
  +    ifconfig $IFACE up                  # 0.7.4 keep jive happy
  DTEND=`date -Iseconds`
--------------------


In the meantime. we are waiting on reports of the script no longer
always working. It might be that the QuickReset() confusing jive is the
problem, but more might be required.
....
The TTL connection can be a nuisance, but you can program a cheap (<$10)
NodeMCU ESP32 board to be a telnet to TTL serial adapter. It requires 4
wires: gnd, TxD, RxD, and power (5v or higher). One of the jumpers needs
a cap in series to avoid holding off the NodeMCU during its boot. I can
post details if interested.


------------------------------------------------------------------------
POMdev's Profile: http://forums.slimdevices.com/member.php?userid=70558
View this thread: http://forums.slimdevices.com/showthread.php?t=109953

_______________________________________________
Radio mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/radio

Reply via email to