Issue #029 [WontFix/closed] - Cannot access WebIOPi over wifi

Posted by olarn.u

What steps will reproduce the problem?

  1. Install WebIOPi
  2. install hostapd and udhcpd to make Pi as Wireless Access Point
  3. WebIOPi work well with wire plugged. Unplug the wire and reboot. Cannot access https://pi:8000/webiopi/

What is the expected output? What do you see instead? -> It should work well both wiring and wireless

What version of the product are you using? On what operating system? -> Raspberry both model A and B. Tenda 150N USB wireless. Raspbian “wheezy” update 2013-02-09. Browser are Safari on iPhone, Chrome on iPhone, Safari 6.0.2 on OSX 10.8.2


Comment 1

Posted by trouch

check your iptables and specific configuration, this is not a webiopi issue


Comment 2

Posted by olarn.u

I thinks It's WebIOPi Issue. It may specifics to work with eth0. But what I want is let WebIOPi work with wlan0.

After I try to start it manual with "python3 -m webiopi" command. It print traceback bellows.

================================================

$ python3 -m webiopi

Traceback (most recent call last): File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.3-py3.2-linux-armv6l.egg/webiopi.py", line 94, in getLocalIP s.connect(('8.8.8.8', 53)) socket.error: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.2/runpy.py", line 161, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python3.2/runpy.py", line 74, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.3-py3.2-linux-armv6l.egg/webiopi.py", line 489, in main(sys.argv) File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.3-py3.2-linux-armv6l.egg/webiopi.py", line 481, in main server = Server(port=port, passwdfile=passwdfile) File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.3-py3.2-linux-armv6l.egg/webiopi.py", line 106, in __init__ self.host = getLocalIP() File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.5.3-py3.2-linux-armv6l.egg/webiopi.py", line 98, in getLocalIP except (socket.error, e): NameError: global name 'e' is not defined

================================================

if config looks like this.

ifconfig

eth0 Link encap:Ethernet HWaddr b8:27:eb:3d:64:bb
UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

mon.wlan0 Link encap:UNSPEC HWaddr C8-3A-35-C6-E3-37-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:68847 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:15753841 (15.0 MiB) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr c8:3a:35:c6:e3:37
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:334 errors:0 dropped:46 overruns:0 frame:0 TX packets:285 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:48780 (47.6 KiB) TX bytes:57719 (56.3 KiB)

================================================

I configured RPi as Access Point and it works fine. I sets wlan0 to static IP (10.0.0.1) and unplugged eth0 off. I can get IP address on client correctly. Ping 10.0.0.1 is fine and I can browse home page from Apache (i didn't install in this case). So, I don't thing its about iptables.

Well, I'm Java and Objective-C programmer and have no experience with Python. You may not necessary to change your code. Just give me some snipped code (or Google hint) and tell me where I can hard code to make it work only with wlan0.

Thank again.

Best Regards, Olarn U.


Comment 3

Posted by trouch

"mon.wlan0" ... french speaking ? WebIOPi binds on all IPs/interfaces. The IP shown is just a hint. Your error is due to a syntax error in exception handling when trying to get this hint. see issue #25, it's fixed on the trunk


Comment 4

Posted by jasonnp

I am having this same problem with the current version how does one go about solving this problem?


Comment 5

Posted by olarn.u

Do not change locale on RPi.