Page 1 of 1

Trouble using PIUI

Posted: Tue Sep 08, 2015 12:09 pm
by JurgenRoman
I've set up my pi as a router using the following:
Edimax wifi adapter
ethernet cable

After this I tried to install piui by doing the following:
following the install instructions
adding "192.168.1.1 piui" to hosts
starting up piui_demo.py
connecting my mobile phone to the pi router
going to http://192.168.1.1 on my mobile web browser
nothing happened


I now have 2 questions:
Does someone have any advice on how to fix this or what information (scripts ect) i need to share for you to maybe figure out my mistake?

Why can I not connect to the Pi via wifi when the ethernet cable isn't attached, while the wifi network still shows up (i don't intend on using the pi as a router, just want to use it for piui)?

Re: Trouble using PIUI

Posted: Thu Sep 10, 2015 6:48 am
by JurgenRoman
bump

Re: Trouble using PIUI

Posted: Mon Sep 14, 2015 10:33 am
by JurgenRoman
bump

Re: Trouble using PIUI

Posted: Wed Sep 16, 2015 10:25 am
by JurgenRoman
bump

Re: Trouble using PIUI

Posted: Tue Oct 20, 2015 2:36 pm
by JurgenRoman
bump, i would really appreciate if annyone could help, I have been stuck on this for ages

Re: Trouble using PIUI

Posted: Tue Oct 20, 2015 2:56 pm
by RaTTuS
what instructions are you following

Re: Trouble using PIUI

Posted: Thu Oct 22, 2015 12:18 pm
by JurgenRoman
RaTTuS wrote:what instructions are you following
Setting up pi as router with edimax:
http://www.daveconroy.com/turn-your-ras ... s-chipset/

Piui tutorial:
http://errantscience.com/blog/2013/06/0 ... -use-piui/

I followed the piui tutorial except for the fact that i changed the hostapd and network/interfaces to be like the ones in the daveconroy tutorial

Everything works fine except 1 thing, my phone connects to the wifi the pi is emmitting, i start the piui_demo.py, i can find the webpage on when going to localhost:9999 on my pi's browser, but not when i go to either 192.168.1.1:9999 or 192.168.1.1 or http://piui on my phone that is connected to the pi


My phone also get's given an ip that starts with 10.0 (we have an apple router at home), can this have anything to do with it?
Shouldn't it get an ip that is something like 192.168.x.y ???

hope this info can help you in helping me :P Already really appreciate the reply

Re: Trouble using PIUI

Posted: Thu Oct 22, 2015 1:01 pm
by DougieLawson
Any address in 10.x.x.x/8 (probably sub-netted as 10.0.xxx.xxx/24) is a private, non-routeable address just like 172.[16-31].xxx.xxx/16 and 192.168.xxx.xxx/24 so that's not a problem. It just means that your Apple router supports having 16 million stations on your LAN.

Re: Trouble using PIUI

Posted: Mon Oct 26, 2015 7:18 am
by JurgenRoman
DougieLawson wrote:Any address in 10.x.x.x/8 (probably sub-netted as 10.0.xxx.xxx/24) is a private, non-routeable address just like 172.[16-31].xxx.xxx/16 and 192.168.xxx.xxx/24 so that's not a problem. It just means that your Apple router supports having 16 million stations on your LAN.
Thanks for the info.

I'm not connecting to the apple router though (the ethernet cable comes from it). Is it correct that I get this specific IP adress?


Also can the fault be some kind of local dns server problem? the pi should probably run it's own dns service since 192.168.1.1 should redirect you to the piui page??

Re: Trouble using PIUI

Posted: Mon Oct 26, 2015 9:31 am
by DougieLawson
Sorry, I have no idea what you're talking about.

On every machine/server/phone/internet TV/etc. in your network you have three significant pieces
1. Unique IP address (within your LAN segment)
2. Netmask (/24 or 255.255.255.0 is normal for a LAN with at most 253 station)
3. Gateway address (which should be identical on each)

The gateway is the controller, the gateway is usually the DHCP server and the DNS server. If everyone can ping the gateway then (firewalls permitting) they should be able to ping and connect to every one of the other 252 stations.

Draw a diagram on the back of a napkin, label up each machine and from each machine test connectivity to each of the others (starting with the gateway).

Re: Trouble using PIUI

Posted: Wed Oct 28, 2015 9:38 am
by JurgenRoman
Found the problem. Because of the apple router the ip is 10.0.x.x and thus wanting to connect to the pi's webserver i had to use that ip (found it using "hostname -I"), this brought me to the nginx standard page

connecting to the piui was possible by simply using "ip:9999"

I would like if i could just type in "http://piui/" and it would take me to the piui-page, but i can't seem to be able to do this
I added the "ip" in the /etc/hosts, should i enter ip:9999 ????

Re: Trouble using PIUI

Posted: Wed Oct 28, 2015 1:40 pm
by JurgenRoman
DougieLawson wrote:Sorry, I have no idea what you're talking about.

On every machine/server/phone/internet TV/etc. in your network you have three significant pieces
1. Unique IP address (within your LAN segment)
2. Netmask (/24 or 255.255.255.0 is normal for a LAN with at most 253 station)
3. Gateway address (which should be identical on each)

The gateway is the controller, the gateway is usually the DHCP server and the DNS server. If everyone can ping the gateway then (firewalls permitting) they should be able to ping and connect to every one of the other 252 stations.

Draw a diagram on the back of a napkin, label up each machine and from each machine test connectivity to each of the others (starting with the gateway).
I figured out what i was doing wrong, I was connecting to an ip i had set in /etc/network/interfaces:
address 192.168.1.1

But this didn't work, figuring out the ip of the PI through "hostname -I" told me the ip

I changend the /etc/network/interfaces
address 10.0.x.x (not actually x's ofcourse)

which i could connect trough to the nginx webserver and the piui bij adding :9999 to the ip

Now that i have this working, i still have 2 questions:

-Is the ip i filled in after "address" a static ip? If i connect to another router, will i have the same ip again? Do i need to put 10.0.1.0 there?

-How can i tell the pi that something like "http://mywebsite/" should connect me to the "10.0.x.x:9999" web adress (something like adding a dns entry?)

Re: Trouble using PIUI

Posted: Wed Nov 04, 2015 2:13 pm
by JurgenRoman
DougieLawson wrote:Sorry, I have no idea what you're talking about.

On every machine/server/phone/internet TV/etc. in your network you have three significant pieces
1. Unique IP address (within your LAN segment)
2. Netmask (/24 or 255.255.255.0 is normal for a LAN with at most 253 station)
3. Gateway address (which should be identical on each)

The gateway is the controller, the gateway is usually the DHCP server and the DNS server. If everyone can ping the gateway then (firewalls permitting) they should be able to ping and connect to every one of the other 252 stations.

Draw a diagram on the back of a napkin, label up each machine and from each machine test connectivity to each of the others (starting with the gateway).

I have 1 more question about networking.

Why is it that i can connect to my raspberry pi via my home router using it's ip (and thus port :80) and this takes me to the nginx page.
But when i try to connect to my raspberry pi via my home router using it's ip and port :9999, it can't connect. It can connect to it tho when i am connected to the wifi my raspberry pi is emmiting