New Web Server Is Cool


thelamer

ARRR I'm A Pirate
Joined
Dec 9, 2005
Messages
393
Age
40
Location
Lake Zurich IL USA
Website
www.skankpost.com
Just follow this guide here to get your GP2X connected to your computer .LINKED

Then drag whatever non-dynamic web files into \\gp2x\gp2x\usr\gp2x\www\ and type in 10.1.10.235 into your browser window . I know it is a feature built into the firmware , but still pretty cool .

So who is going to be the first to host a small site on thier GP2X as a proof of concept ??

edit: ohh yeah remember to enable web server in your advanced settings on your gp2x . And can you imagine how cool this will be when you can control the music on your gp2x say connected to a stereo from another handheld device on your wireless network . A psp logging into a gp2x it seems like blasphamy but can now be done .
 
Last edited by a moderator:
thelamer posted on May 2 2006 at 07:32 PM said:
Just follow this guide here to get your GP2X connected to your computer .LINKED

Then drag whatever non-dynamic web files into \\gp2x\gp2x\usr\gp2x\www\ and type in 10.1.10.235 into your browser window . I know it is a feature built into the firmware , but still pretty cool .

So who is going to be the first to host a small site on thier GP2X as a proof of concept ??

edit: ohh yeah remember to enable web server in your advanced settings on your gp2x . And can you imagine how cool this will be when you can control the music on your gp2x say connected to a stereo from another handheld device on your wireless network . A psp logging into a gp2x it seems like blasphamy but can now be done .

I think Craigx should run some of his gp2x distribution site from the gp2x, Craig what about it !

Can just see it now "Web server by Gp2x"

lol

Any way I cant get this to work...followed the guide, have a working usb network connection (telnet working and can navigate to the machine in explorer) created a quick bit of html in a .html file, keep getting connection time out from IE...

Any ideas?


OK got something working by using this:

http://gp2x/

This displays the index.php file in the directory and http://gp2x/test.html displays my quick bit of html !

Cool, shame GPH did not make more of this oppertunity and have a nice welcome display or an electronic manual of the changes...
 
Last edited by a moderator:
Netstat gives:

[root@gp2x /]$netstat -na
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 548 10.1.0.235:23 10.1.0.234:1322 ESTABLISHED
udp 0 0 127.0.0.1:1024 127.0.0.1:514 ESTABLISHED
udp 0 0 10.1.0.235:137 0.0.0.0:*
udp 0 0 0.0.0.0:137 0.0.0.0:*
udp 0 0 0.0.0.0:9 0.0.0.0:*
udp 0 0 10.1.0.235:138 0.0.0.0:*
udp 0 0 0.0.0.0:138 0.0.0.0:*
udp 0 0 0.0.0.0:13 0.0.0.0:*
udp 0 0 0.0.0.0:37 0.0.0.0:*
udp 0 0 0.0.0.0:69 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path


[root@gp2x /]$netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 2 10.1.0.235:telnet 10.1.0.234:1322 ESTABLISHED
udp 0 0 localhost.localdom:1024 localhost.locald:syslog ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
[root@gp2x /]$
 
to get my connection to work i needed to bridge my gp2x connection to my computers, thus, i believe the gp2x has the same IP as my computer/home connection, you need to route a port to the GP2x's local ip from your router (no idea how to without a router?)

i havn't gotten it to work myself yet by trying this, but thats what nickspoon said to do in irc. (this is to get it working over the net so others can view it)
 
Wait a second..this uses the mini-b usb port? Wow, thought you had to get a ext to usb thingy for that stuff...Crap I need those too!
 
I was trying to set up a virtual host and route the gp2x's internal IP through my apache / xampp server. In other words, if you type in the IP for my website it redirects to the gp2x www root rather than the one on my windows C:\ drive. But it didn't work, I can only access the gp2x within my own network but not from outside.

Another thing I was wondering about, would it be possible to turn the gp2x into a standalone webserver if I bought a USB to RJ45 adaptor and plugged my gp2x directly into my linksys router? What would I need apart from a driver for the adaptor obviously? That would totally rock to have a server without actually running my pc 24 hours a day :)

"SunSpire"
 
You may be able to connect it directly to a USB capable cable modem via usb host on the gp2x, but it's unlikely your ISP will allow two simultaneous connections...
 
You dont need ethernet bridges or public ip's on the gp2x to host a site on it..

its actually very simple, all you need is to forward a port, lets say you have adsl or something, with a small embedded router..

the router gets your public ip, which we will say is 80.155.123.30.
then your router does NAT, meaning you can have many internal computers on.
so your router is internally 192.168.0.1, and your pc is 192.168.0.2.
then you connect your gp2x to the pc. the pc's usb ethernet interface is 192.168.1.1 and the gp2x is 192.168.1.2.

then you make your router forward port 80 to your pc, and make your pc forward port 80 to the gp2x

meaning:
HTTP REQUEST -> NAT ROUTER -> PC -> GP2X
technical way:
HTTP REQUEST FROM INTERNET -> 80.155.123.30 (NAT ROUTER) -> 192.168.0.2 (PC) -> (192.168.1.2) GP2X
 
btw, this can also work if you use a pc as router, or just are directly connected to the internet on a pc..

i can setup this with my gp2x, if anyone would like to see it as an example
 
Redeeman posted on May 3 2006 at 08:23 AM said:
You dont need ethernet bridges or public ip's on the gp2x to host a site on it..

its actually very simple, all you need is to forward a port, lets say you have adsl or something, with a small embedded router..

the router gets your public ip, which we will say is 80.155.123.30.
then your router does NAT, meaning you can have many internal computers on.
so your router is internally 192.168.0.1, and your pc is 192.168.0.2.
then you connect your gp2x to the pc. the pc's usb ethernet interface is 192.168.1.1 and the gp2x is 192.168.1.2.

then you make your router forward port 80 to your pc, and make your pc forward port 80 to the gp2x

meaning:
HTTP REQUEST -> NAT ROUTER -> PC -> GP2X
technical way:
HTTP REQUEST FROM INTERNET -> 80.155.123.30 (NAT ROUTER) -> 192.168.0.2 (PC) -> (192.168.1.2) GP2X

OK, so I need to set something in the router, currently my USB interface is set to 10.1.0.234 and the gp2x is 10.1.0.235... or am I miss understanding...



Redeeman posted on May 3 2006 at 10:46 AM said:
btw, this can also work if you use a pc as router, or just are directly connected to the internet on a pc..

i can setup this with my gp2x, if anyone would like to see it as an example


Go on you know you want to....

:D
 
Last edited by a moderator:
Redeeman posted on May 3 2006 at 08:23 AM said:
You dont need ethernet bridges or public ip's on the gp2x to host a site on it..

its actually very simple, all you need is to forward a port, lets say you have adsl or something, with a small embedded router..

the router gets your public ip, which we will say is 80.155.123.30.
then your router does NAT, meaning you can have many internal computers on.
so your router is internally 192.168.0.1, and your pc is 192.168.0.2.
then you connect your gp2x to the pc. the pc's usb ethernet interface is 192.168.1.1 and the gp2x is 192.168.1.2.

then you make your router forward port 80 to your pc, and make your pc forward port 80 to the gp2x

meaning:
HTTP REQUEST -> NAT ROUTER -> PC -> GP2X
technical way:
HTTP REQUEST FROM INTERNET -> 80.155.123.30 (NAT ROUTER) -> 192.168.0.2 (PC) -> (192.168.1.2) GP2X

thats exactly what i said, port forwarding.
the connection bridging was to get my actual gp2x *working* even for me, it wouldn't work at all until i ddi that.
 
Last edited by a moderator:
Back
Top