<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.stereopi.com/app.php/feed/topic/895" />

	<title>StereoPi Forum</title>
	<subtitle>StereoPi Forum</subtitle>
	<link href="https://forum.stereopi.com/index.php" />
	<updated>2020-06-12T20:29:32+00:00</updated>

	<author><name><![CDATA[StereoPi Forum]]></name></author>
	<id>https://forum.stereopi.com/app.php/feed/topic/895</id>

		<entry>
		<author><name><![CDATA[stereomii]]></name></author>
		<updated>2020-06-12T20:29:32+00:00</updated>

		<published>2020-06-12T20:29:32+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=2064#p2064</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=2064#p2064"/>
		<title type="html"><![CDATA[Re: SLP improvement: multiple wifi networks configured]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=2064#p2064"><![CDATA[
Thanks for this hack <img class="smilies" src="https://forum.stereopi.com/images/smilies/icon_e_biggrin.gif" width="15" height="17" alt=":D" title="Very Happy"><br>Works like a charm. Btw I put wifi.conf in /boot. Readable by Windows.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=93">stereomii</a> — Fri Jun 12, 2020 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2020-03-23T12:46:51+00:00</updated>

		<published>2020-03-23T12:46:51+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=1784#p1784</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=1784#p1784"/>
		<title type="html"><![CDATA[SLP improvement: multiple wifi networks configured]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=1784#p1784"><![CDATA[
Observed in version 0.2.3 of SLP<br><br>I usually connect my stereopi to home WiFi network (to easily work on it with the computer) and mobile-phone WiFi network (for in-field control). However, SLP allows to store the ids of only one of these networks at a time.<br>By modifying the scripts, it is possible to have multiple access points registered (the first seen will be used). That way, I do not have to change the configuration of the stereopi anymore.<br><br>In /opt/StereoPi/scripts/wlan.lib.php<br>Add<div class="codebox"><p>Code: </p><pre><code>        shell_exec('cat /etc/wifi.conf &gt;&gt; /run/' . $iface . '.conf');</code></pre></div>just after the line 174<div class="codebox"><p>Code: </p><pre><code>        file_put_contents("/run/$iface.conf", "country=00\n");</code></pre></div>Now, the file /etc/wifi.conf is added in the configuration of WiFi manager (takes precedence because before stereopi configuration). When trying to connect to a wifi network, it first tries the networks listed in this file from the first to the last and then the network written in the stereopi.conf file.<br><br>It is possible to make the stereopi.conf more important by adding the aforementioned added line one line after.<br><br>To construct /etc/wifi.conf, you can (with the filesystem unlocked) do<div class="codebox"><p>Code: </p><pre><code>wpa_passphrase "SSID" "password" &gt;&gt; /etc/wifi.conf</code></pre></div>Example of /etc/wifi.conf file:<div class="codebox"><p>Code: </p><pre><code>network={        ssid="MyPhone"        #psk="SuperPassword"        psk=479ad0624653e3b28b8da0fa355692603071a29f8613217f087eaec1b126ba4e}network={        ssid="MyHome"        #psk="SuperPassword"        psk=83f244c0e1f4079b262ce69d1c7075ddaaff397e1c63cf397ebe8fb27b0d43d5}network={        ssid="MyHome2"        psk=d1b4719a8788e370f0c03f5018422a2eb8bf11c557b6d21656087fd79dcd2f40}</code></pre></div>Note: the #psk line is optional and can be removed like here for the MyHome2 network<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Mon Mar 23, 2020 12:46 pm</p><hr />
]]></content>
	</entry>
	</feed>
