DynamicDevices / ming-original

Balena.io/Docker-compose repo for a containerised #MING (Mosquitto, InfluxDB, NodeRed, Grafana) stack
33 stars 20 forks source link

Add Wifi-Hotspot support #12

Closed MatthewCroughan closed 4 years ago

MatthewCroughan commented 4 years ago

I'm working on this now in my fork, I'm basing it on https://github.com/balena-io/wifi-connect.

ajlennon commented 4 years ago

Take a look at the MakeSpaceLive stuff. I had support for this in there. Also Adrian has worked with this. One problem that needs addressing is it sometimes fails to connect on startup and drops into AP mode which is not the behaviour we want

MatthewCroughan commented 4 years ago

@ajlennon Well for what we want, the whole behavior is not ideal anyway. What we want is to be able to connect it and disconnect it, currently if we were to connect it to the wifi we'd have no way of disconnecting it again easily. Maybe we can have a service variable that wipes the list of wifi credentials in order to drop it into AP mode again.

This is mostly to satisfy Julian's need of it being portable, for the time being until we figure out an ideal recommendable portable travel router to bundle with the stack. I think I can solve it dropping into AP mode permanently by having a time limiter on the shell command that runs wifi-connect, testing it all right now anyhow.

MatthewCroughan commented 4 years ago

On the topic of portable travel routers.. This could be an option to make one for SUPER cheap.. around £15~

image

Two ETH ports a router does make :) ideally it'd be running OpenWRT.

https://store.gl-inet.com/products/gl-ar150-mini-smart-router?variant=3047587807259 These are almost the same size and are $25~ and run openwrt, they have proper atheros chips too so it's arguably 10x better than hacking one with an OPi R1.

ajlennon commented 4 years ago

Nice. I remain very unconvinced though that we can run a Pi as an AP and have a lot of sensors connected...

ajlennon commented 4 years ago

Like those. Are those Atheros chips dual band ?

MatthewCroughan commented 4 years ago

Done in https://github.com/DynamicDevices/ming/pull/13.

@ajlennon as for the question about the chips being dual band, they aren't, but you can get variants like that, more expensive obviously. I think these would be a great start.

ajlennon commented 4 years ago

This is a variant of the GL-AR750 which we were using to begin with for the WiFi security project!

MatthewCroughan commented 4 years ago

@ajlennon So you have a few lying around then? Would love to try them out.

ajlennon commented 4 years ago

I might do actually! Will take a look around

ajlennon commented 4 years ago

Merged the PR