
rbonari

Hello,
I have ventured into the HTTP Servers, both regular and custom and was really impressed. Pretty cool stuff !
First question I have is that I was able to successfully connect to the regular server page with my Android Phone and as my project is fairly large, I couldn't scroll through the whole screen of the project. Would I be correct in assuming that this is a limitation of the Samsung Galaxy S4 Screen Size?
I noticed in the web server control that there are two IP Addresses the show in the control. The first one is the regular IP Address and the other one is the remote port for accessing server outside of my network. Then I noticed when I was connected that I have clicked on the connection button that there was yet another IP Address. The IP Address in the control screen along with the remote address is an IP Address that is already used on my network. The IP Address I get when I connect on connection button shows an IP Address that is not used on my network and this makes sense. Not sure how these IP Addresses are all related. We have two different IP Addresses and a remote address.
Also, which IP Address is the one I should be forwarding? Is it the address in the drop down box when I click on connection or the one of two that shows up in the main control box? Also, would I be correct in assuming that I can change the port number to one that is currently not used on my router? Also, what are some common IP Addresses that I could use that aren't currently used and would be safe to use.
I can view the web server page on my Android phone on my local network but can't access yet outside of my network. Tried port forwarding both IP addresses, with a different port number than 80 and no luck. This is where I think I might be using port numbers that are already used?
With regards to the custom web server, I looked at the example in the scripts folder and got it to work somewhat. The reason not everything worked is because I am using the Adventure Bot for my project and I am sure the author of the example custom web server used a different robot, etc. I was wondering if anyone has the example HTML code for a basic HTTP Custom Server? Example code is always great for learning purposes. I did check out the question mark for the custom web server but there was no examples. Any help on creating a custom web server would be great to help me understand what is going on with it. TheTechGuru is gracious enough to volunteer to help me out when he gets back from vacation as he wants to do some similar things with his robots that I want to do. Thought I would learn as much as I can before he gets back so I know what he is talking about somewhat?
Thanks for all the help and what a great community !
The window size is based on the size of the FOSCAM mjpeg stream. It only supports VGA at 15fps (640x480).
The H.323 stream supports higher resolution, but for that you need to use the EZ-B camera object instead, and you lose the fast video response.
Alan
Hello Alan,
That sounds good to me. I thought it might have something to do with speed but size is fine as is. I was just curious.
What are your thoughts on the Movement Panel for the I Create 2 platform? Would the page Movement Panel ad is need to be changed. My first guess is that it should work.
Also, can buttons be added to right side of page to accomadate some of the special functions of the Create 2 platform?
What is your thinking on using Create 2 platform along with ez-b4 and foscam camera for telepresense robot?
Thanks afain Alan ! Rick


The web page will work with any Movement Panel in the project. It just issues the built in direction commands.
Adding additional buttons is easy, just need to have scripts to map them to.
Alan
Alan,
If I wanted to try and add buttons on the right side of the page, how would I go about positioning them? I see how the scripting is done but not clear on how you position buttons where you want them. Thanks again Alan ! Rick


@Rick,
The buttons are laid out in an HTML table.
Take a look at this page http://www.w3schools.com/html/html_tables.asp then look at the entries in the foscam.html file and it should make sense how it is set up.
Basically, there is one big table of three rows and one column. Each row holds one of three smaller tables. (this was done to make the buttons all align to the left of the page and look correct on a mobile screen. Without it, they centered on the web page, but that was not the center of the screen on the Android browser. Probably other ways to do this, but it was also how DJ had laid out the default, except he had 2 columns, with the video in the second column, and it seemed to make sense).
The first table is the movement panel, which is a 3x3 table, but some entries are empty, the second is the Foscam movement control, which is also 3x3, but all fields have a button in them, and the last is the additional controls, which is a 2x2 table.
You could add another table, or add a column or row to any of the existing ones, whichever makes the most sense.
Alan
Thanks much Alan ! I will check it out and get back with you as to how things go. Rick

Hello Alan,
I have been able to modify and add buttons to the custom web server thanks to your help but have run into an issue when trying to port forward the custom web server page. There is an IP address in the custom web server that it shows in the control and when I port forward that IP Address using the port forwarding address I get some unexpected results. I have two html pages in the HTTP Server Root directory. One is the default.html file and the other is the foscam.html file.
If I port forward the basic default html file the port forwarding works and I see the foscam video. However if I try and port forward the foscam html file the movement controls and buttons work in the page but no foscam video shows.
I tried renaming the default.html file to default1.html and I renamed the foscam.html file default.html. still no video display. Again the buttons and movement control display and work but the video doesn't show.
This doesn't make much sense to me. If the foscam video displays o.k. with the original default.html page why not in the modified foscam.html page? The only thing I am thinking is that you display the foscam video in the foscam.html page in an IFrame. Not sure why this would make a hill of beans to port forwarding as IFrames are commonly used in web pages?
Your help on this is much appreciated !Rick B.



To use the iFrame, you also need to forward your Foscam port to the Foscam IP address and modify the IP in the iFrame to your external IP address or hostname if you are using a dynamic dns service.
Otherwise it is trying to display an internal ip address that cannot be seen from the Internet.
I explained this in my initial instructions :
Alan