Running from external server
March 30, 2012 at 7:02 PM #601toribParticipant
Can you elaborate on how to get breakout to run from an external server? The info in the guides isn’t complete enough for me.
Thanks.March 30, 2012 at 10:28 PM #602soundanalogousMember
By running from an external server I assume you mean you want to run Breakout Server on one computer and connect to it from another computer.
There are two options:
1. If you want to host your web application remotely but run it locally you need to upload your application to the external server (like you normally would when hosting a website/web application). When you load your application on your computer as long as you have an Arduino board connected and Breakout Server running, you will be able to run your application on your computer. In your application, when you instantiate the IOBoard object you need to make sure you set the IP address to “localhost” because when you load the website in your browser even though it is hosted on an external server, it is really downloaded and running locally which is why you are able to connect to the Arduino board.
2. The second option is to connect an Arduino board to the external server and run Breakout Server on the external server. You can then write an application on your local computer that can communicate with the Arduino connected to the remote server. In order for this to work you need to set the IP address to the address of the remote server when you instantiate the IOBoard object in your application. For example:
var arduino = new IOBoard("192.168.2.34", 8887)(substituting the IP address in quotes with the IP address of the remote server). Your local computer also needs to be connected to the same network as the external server in order for this to work. Depending on your web application you may also need to start a web server on your local machine in order to run your app. If you would like to be able to connect to the Arduino running on the remote server from multiple computers, you need to check the box for Enable Multi-Client Connections in the Settings tab of Breakout Server.April 16, 2012 at 11:28 AM #637taseluioParticipant
dont forget to add a port forwarder with the 8887 port on your router, if you use one.November 3, 2012 at 4:06 PM #773roowilliamsParticipant
Trying to get the PWM LED to run from an external server. All scripts are uploaded and I’m getting no 404’s in console, but for some reason the slider isn’t loading. Clients connect as indicated in the Breakout Server console, but buttons aren’t responsive.
CheersNovember 5, 2012 at 9:27 AM #775soundanalogousMember
Have you had any issues trying to run the pwm_led example on your computer rather than an external server?
Are you trying to run the Breakout Server java application on the external server or are you trying to serve pages from the external server and running Breakout Server on your local machine?
Is the external server running on the same network as the computer your Arduino board is attached to? If the server is external to your local network you may need to set up port forwarding in the router the external server is connected to.
Is the external server running Linux? If so which version (not all Linux variants seem to work well with Breakout Server).
Are you passing “location.hostname” or the IP address of the external server to the IOBoard constructor (line 69 of pwm_led.html). Try the IP address rather than “location.hostname” if you have not already.
Did you copy the entire Breakout/examples/ director to the external server or just the getting_started directory? Many examples require the Breakout/examples/libs directory as well which could explain why the slider is not loading. If you have also copied select files instead of the full Breakout directory to the external server, make sure that your webserver root is set properly (see the Settings panel in Breakout Server).November 11, 2013 at 4:45 PM #941msandersmay10Participant
Ok. I’ve tried your two sets of advice that you posted on torib and have had no luck. I’ve set the IP address to “local host” and have also tried your second option of changing it to my IP address. And yes I can get the breakout java server to connect to your getting started webpage for the trial. What do I need to do?
MattNovember 21, 2013 at 11:08 PM #957blzalewskiParticipant
A third unmentioned option is to create a VPN (virtual private network). You then assign each asset on the network a static IP address and, with the right configuration, you can access anything on the VPN.
- The forum ‘Forum’ is closed to new topics and replies.