I have an Arduino with an IR LED hooked up to a WR703N (with extroot) via a CP2102 USB to UART bridge. I'm trying to recreate the project documented at http://www.righto.com/2009/11/controlli … -with.html in which the click of a button on a web page results in an IR LED blinking out remote control codes for e.g. a TV, amplifier etc.
The WR703N is running OpenWrt trunk as of 2015-03-11 (Chaos Calmer Bleeding Edge, r44634) and I'm locally hosting the package repository built at the time I generated my image. My issue is with Python.
After some initial difficulties with file clashes between various Python packages I was able to install Python with this:
opkg install python python-pip --force-overwrite
At this point I assume everything is installed OK (Python version is 2.7), but I'm not sure how to confirm other than confirming that something happens with:
python -h
My issue arises when I try to run the server.py script found at the above URL, which imports the "cgi" module; this doesn't exist and so I get the error:
ImportError: No module named cgi
Upon attempting to install the cgi module via either:
easy_install cgi
or:
pip install cgi
I get the error
ImportError: No module named io
As such I've hit a bit of a roadblock and my Google-fu has thus far proved inadequate.
My questions are:
Is it possible to install the "io" module? If so, how?
What is the best way (assuming it's possible) to install Python modules such as "cgi" in OpenWrt?
Any help is greatly appreciated. Apologies for the tenuous "hardware hacking" connection here; I couldn't see a more suitable forum.
Thanks.