Apologies.
(ok, edit now seen)
The two machines scan WiFI WAPs. Each produces its own list on it's "screen" (NR)
I am/was getting weird things happening and so I started looking at the messages sent to the lists.
I saw that one machine was double listing one of the WAPs, but the other isn't.
Digging around I looked at the output of the wifiscan
part of the node. (Both machines.)
I saw the double listing there too on one machine, of course.
Going a bit further here is a CLI breakdown of what the commands get.
That way (alas) it seems NR can be excused for being the problem.
But......
The two scripts are the same.
Run on one machine it is one, on the other the WAP isn't double listed.
Just wanting to try and work out why and how to stop it.
(I do remember I asked about something on WAP a long time ago. That was resolved and I don't think it really ties in with this. But I am known to be wrong.)
Any ideas?
Machine #1: (in this case "good")
pi@TimePi:~ $ python3 wifiscan.py
["Telstra6C2C0D", "Telstra Air", "Fon WiFi", "TelstraDAE48B", "Telstra Air", "Fon WiFi", "Tango2", "TelstraCA5E31", "Telstra Air", "Fon WiFi", "", "BigPond121C"]
pi@TimePi:~ $
Machine #2:
pi@TelePi:~ $ python3 wifiscan.py
["TelstraCA5E31", "Fon WiFi", "Telstra Air", "BigPond121C", "Telstra6C2C0D", "Telstra6C2C0D", "PiNet", "Tango2", "Telstra Air", "Fon WiFi", "TPG-VZBS", "TelstraAC4579", "TelstraDAE48B", "Telstra Air", "Fon WiFi", "", "Slowest Internet in the World", "WiFi-D463", "Chilli"]
pi@TelePi:~ $
See the duplicate list for Telstra6C2C0D
Scripts:
Machine #1:
pi@TimePi:~ $ cat wifiscan.py
#wifiscan.py
import subprocess
import json
import re
child = subprocess.Popen('sudo iwlist wlan0 scan | grep ESSID',shell=True,stdout=subprocess.PIPE)
output = child.communicate()[0]
output = output.decode("utf8")
output = output.replace(' ESSID:','')
output = output.replace(' "','')
output = output.replace('"','')
output = output.splitlines()
output = json.dumps(output)
print (output)
pi@TimePi:~ $
Machine #2:
pi@TelePi:~ $ cat wifiscan.py
#wifiscan.py
import subprocess
import json
import re
child = subprocess.Popen('sudo iwlist wlan0 scan | grep ESSID',shell=True,stdout=subprocess.PIPE)
output = child.communicate()[0]
output = output.decode("utf8")
output = output.replace(' ESSID:','')
output = output.replace(' "','')
output = output.replace('"','')
output = output.splitlines()
output = json.dumps(output)
print (output)
pi@TelePi:~ $