edison-fw / edison-oobe

MIT License
1 stars 2 forks source link

Fixes for Sumo #2

Closed htot closed 6 years ago

htot commented 6 years ago

This changes dependency from 'iwconfig' to 'iw', fixes the path for hostapd.conf and fixes shelljs 'shell.exec' returning 'stdou't instead of 'output' in nodejs (8.9.4 in Sumo)

It does not yet show the list of available AP's

htot commented 6 years ago

I just wanted to share my changes (in a hurry). Thanks for the comments, I'll fix and resend.

alext-mkrs commented 6 years ago

Thanks, LGTM.

htot commented 6 years ago

This fixes the issues above.

Still configure_edison --wifi doesn't work. The reason is wpa_cli scan returns: Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory

This interface also may need replacement (quick googled).

connmanctl scan wifi && connmanctl services works, but does not show the bssid / frequency /signal level / encryption flags / ssid wpi_cli does. We can retrieve them with connmanctl service --properties <service>. Or we could use iw, I found this one liner: iw dev wlan0 scan | egrep "signal|SSID" | sed -e "s/\tsignal: //" -e "s/\tSSID: //" | awk '{ORS = (NR % 2 == 0)? "\n" : " "; print}' | sort which outputs:

-58.00 dBm TP-LINK_941F4A
-68.00 dBm Oranje Plantage 35 2.4G
-74.00 dBm 
-79.00 dBm Oranje Plantage 35 5G
-80.00 dBm ANNE
-85.00 dBm H369A6D5E05
-88.00 dBm Ziggo

Not too bad. What do you think?

alext-mkrs commented 6 years ago

Yes, I thin the iw one looks more promising - so that we use the same tool as much as we can (and we already started using it with your newest patch).

htot commented 6 years ago

Same here. I like connmanctl, for interactively connecting. iw looks like a bit more suitable for calling from a script. Only problem, I don't know python. May be save that for a separate PR?

alext-mkrs commented 6 years ago

Yeah, definitely, in this sense I believe this should be a separate one as I think that might be a bigger endeavor. I do Python rather frequently, so I can take care of that BTW.

htot commented 6 years ago

I was hoping you would say that :-). Merged this.