WIFI Hotspot configuration for the next emonpi image

I recently documented how to setup a WIFI hotspot on an EmonPI/EmonBase which provides a convenient way of doing mobile or remote energy monitoring by providing access to the raspberrypi where there is no local ethernet or wifi network: http://openenergymonitor.blogspot.co.uk/2015/09/how-to-setup-wifi-hotspo...

Beyond remote monitoring, quite a few devices use a wifi hotspot to provide the initial access to a device needed to configure access to an existing wifi network. Martin's thermostat board with the esp8266 is a great example https://harizanov.com/wiki/wiki-home/three-channel-wifi-relaythermostat-...

Id like to add this as a feature to the next ready-to-go SD card image but I cant work out how to make the configuration switch easily from access point mode to connecting to a chosen wifi network and Im wondering if anyone with a bit more linux networking knowledge than me could point me in the right direction.

At the moment I need to run:

sudo ifconfig wlan0 10.0.1.1 
sudo service isc-dhcp-server start

at startup (in /etc/rc.local) in order for the hotspot to start. I think the key to solving the problem is to remove the need for this. and then leaving the wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf line uncommented in /etc/network/interfaces with the hostpot credentials in wpa_supplicant.conf. But I cant quite work out how to get the hotspot to run without the startup forcing of wlan0 ip address. Any thoughts would be very welcome!

thanks, Trystan

glyn.hudson's picture

Re: WIFI Hotspot configuration for the next emonpi image

I'm trying to take up the baton for this development, discussion new thread: 

https://openenergymonitor.org/emon/node/12305

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.