RPi3 connecting to WEP router using Python
<p>I've been trying to connect to WiFi networks using Python, but hitting a dead end.</p>

<p>I'm using the wireless module in Python: <a href="https://github.com/joshvillbrandt/wireless" rel="nofollow noreferrer">https://github.com/joshvillbrandt/wireless</a></p>

<pre><code>from wireless import Wireless

wireless = Wireless()
wireless.connect(ssid, password)
</code></pre>

<p>However, this seems to only work for WPA and WPA2 routers.</p>

<p>I've also looked to see if I can do it via the terminal (so then I could call it in Python): <a href="https://askubuntu.com/questions/16584/how-to-connect-and-disconnect-to-a-network-manually-in-terminal">https://askubuntu.com/questions/16584/how-to-connect-and-disconnect-to-a-network-manually-in-terminal</a></p>

<pre><code>iwconfig wlan0 essid SSID key PASSWORD
</code></pre>

<p>However, this doesn't seem to connect to the router either.</p>

<p>So I was wondering whether anyone knows how to connect to a WEP router, or if I'm doing something wrong?</p>