Houssam
(Houssam)
22 August 2016 21:50
1
moving toward raspberry pi 3 board with full metallic case isn’t a good idea for built-in wifi
to solve this problem i decided to use external wifi dongle
but the lcd keeps disply built-in wifi status
The Shop might be able to supply you with a replacement plastic end plate, if you bought the official emonPi from the OEM shop.
You will need to change wlan0 to wlan1 in various places in the emonPi LCD python script:
seconds = float(f.readline().split()[0])
r.set('uptime', seconds)
lcd[0] = datetime.now().strftime('%b %d %H:%M')
lcd[1] = 'Uptime %.2f days' % (seconds / 86400)
elif page == 7:
lcd[0] = sd_image_version
lcd[1] = "Serial: " + serial_num
elif page == 8:
ret = subprocess.call(ssh_status, shell=True)
if ret > 0:
#ssh not running
lcd[0] = "SSH Enable?"
else:
#ssh not running
lcd[0] = "SSH Disable?"
lcd[1] = "Y press & hold"
sshConfirm = False
You will also need to do the same for the emoncms wifi module if you want to configure wifi via local emoncms:
<?php
class Wifi
{
public function start()
{
exec('sudo ifup wlan0',$return);
return "wlan0 started";
}
public function stop()
{
exec('sudo ifdown wlan0',$return);
return "wlan0 stopped";
}
public function restart()
{
exec('sudo ifdown wlan0',$return);
This file has been truncated. show original
And update /etc/sudoers
to use wlan1
# Emoncms Wifi Module
Wifi configuration module for emoncms. Installed on emonPi pre-built SD card image
![wifi-config](http://openenergymonitor.org/emon/sites/default/files/wifi-config.png)
# Install
```
cd /var/www/emoncms/Module
git clone https://github.com/emoncms/wifi
```
Give web user permission to execute system wlan commans:
Append the following to the end of `/etc/sudoers`:
`sudo nano /etc/sudoers`
```
www-data ALL=(ALL) NOPASSWD:/sbin/ifdown wlan0,/sbin/ifup wlan0,/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf,/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf,/sbin/wpa_cli scan_results,/sbin/wpa_cli scan,/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf,/etc/init.d/hostapd start,/etc/init.d/hostapd stop,/etc/init.d/dnsmasq start,/etc/init.d/dnsmasq stop,/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf
This file has been truncated. show original
If you email shop support we can arrange a plastic acrylic end-plate for you .
Houssam
(Houssam)
5 September 2016 13:36
5
Mr.Glyn, I can not modify files listed above because I don’t have write privilege , can you tell me how to change file system read write permissions .
Thank you in advance.
To make the file system RW:
$ rpi-rw
then back to read-only when your done:
$ rpi-ro