Internet to Serial Proxy
Internet to Serial Proxy is an open source application which facilitate the communication between a Web API and an Arduino connected to a Mac USB Serial Port.
INTERNET < > Internet to Serial Proxy < > USB ARDUINO
![]()
Version 03 – Compiled for OS X Lion tested with Mountain Lion
Still running Snow Leopard? Get the previous version.
What it does
First, you DO NOT NEED an Arduino Internet Shield. The Internet to Serial Proxy open the chosen TCP/IP port and listen to it. When it get a connection, it transmit what it get to the connected serial port. The data send from the Arduino are also sent to a specified URL. It’s also monitor what’s the Arduino send through the serial port. It’s pretty basic. You can also send a manually entered string to the serial device.
Project sources
Visit the Internet to Serial Proxy project home page on Github to get some PHP scripts and an Arduino program example, submit issues or get informed about current developments.
Screenshot



July 1st, 2012 at 07:25
Any chance we can get a build that works under macos 10.5?
July 28th, 2012 at 23:26
This is super helpful!
I’m new to using PHP and flash – I was wondering if you could help me figure out what PHP script i need to have to facilitate a connection between a really basic flash app and your proxy program. I looked at all of your example scripts, but i don’t really understand how to facilitate the connection.
Cheers!
August 7th, 2012 at 22:43
I’m no Flash guy, but I think you only need to understand how pass variables from PHP to flash and the opposite. The PHP example script I give is only about sending these variable through the Internet to Serial Proxy. Your flash application P needs to get these variables from the PHP script. I’m sorry, but I can’t help you more with Flash things.
August 7th, 2012 at 22:58
I’m sorry, but I can’t. Xcode 4 don’t come with the 10.5 SDK. The sources files are available. You can try building it yourself. I think it will work without any modifications.
October 22nd, 2012 at 15:53
Hi Kevin, I´m a newbie to arduino and have limited client/server knowledge. I hope your proxy software can solve a problem I have in my project. So have I understood this correctly; I can have my mbookair connected to internet with WIFI and my Arduino connected to my mbookair with USB. Then request a page on the web in my browser that say, returns values, which in turn I can use to control my arduino pins? Correct?
October 23rd, 2012 at 23:53
Almost. You can’t directly open your browser to ip:port of the Internet to Serial Proxy (ISP) app. It will do nothing. You have to push information to it. You can get the two php scripts and host them on your Macbook using MAMP or host them on an external standard Web server. If you opt for the second solution, you will need to have the ip:port of your Macbook accessible from outside of your home network.
You then will have to write some code on the Arduino and the Web server. So as a sample you can send a character like “x” to the ISP app and the app will send it to the Arduino. Then you have to interpret this “x” character in the Arduino and do something with it, like light a LED. You can see a bit more in «Please follow the protocol» post.
October 30th, 2012 at 07:57
Is there any way of sending the data received from the arduino as part of the web address?
I am trying to call a specific webpage for individual button pushes on the Arduino…
October 30th, 2012 at 09:31
This is not impossible. The problem is this direct call will not close itself. The browser will hang trying to get a response that never comes. If you still want to do it this way, you will have to interpret all the HTTP header in the Arduino. The first line contains the parameters you can send by calling Internet to Serial Proxy with a query parameter like http://localhost:port?a=your-stuff (the IP and port of Internet to Serial Proxy). You will get data shown below, the you could read and use the first line. The best way is to make your script call a php script (or else) then make this script open a socket and send stuff to ISP.
GET /?a=TEST%20STRING%20SEND%20TROUGHT HTTP/1.1
Host: localhost:8883
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: UTF-8,*;q=0.5
Cookie: SQLiteManager_currentLangue=2
October 31st, 2012 at 12:31
Hello Kevin, this seems like a great app, but I’m not getting the program connected to net (not sure why)
Basically, what I have is an RFID reader plugged into Arduino.. Through your program I’ve managed to set up the connection with the serial, and the values are being presented in the Activity Log.
Then, what I want is to send these values to my .php page. I have set up a XAMPP localhost server and placed a file (example.php) there, but am not sure how to send the values, or how to get them in the file. I would be really greatfull if you could help out!
October 31st, 2012 at 14:39
let me reformulate: I opened up the socket successfully using the code you give in the “PHP Script Send Example” …
Then, how do I recieve the output of the arduino in my PHP webpage? I basically want the same information that is getting outputed in the “Activity Log” of the program, in the PHP webpage.. is this possible?
October 31st, 2012 at 14:45
It’s not much of a connection. Just set the url to get in the App. If it’s on your local host, the url will look like http://localhost/example.php. In your PHP script, you have to read the q parameter from the query string. You can record this data into a database or a file, then use this cumulated data to do something. Or create a script to trigger an action.
October 31st, 2012 at 14:51
It’s two thing. One to send something to the Arduino. It’s what you seem to have working. And an other when the Arduino send something to the net. It’s no synchronous communication here.
November 5th, 2012 at 22:55
Kevin, nice work with the ISP. Was wondering if you had plans to implement POST as well as GET, so one can send larger chunks of data? I cant recall off the top of my head what the max number of characters you can submit via GET… but one can definitely send more with POST.
Thanks,
–Greg
November 6th, 2012 at 18:35
If I remember correctly, the serial UART have a 128 characters buffer length. So you can’t send longer strings to it.
March 23rd, 2013 at 00:00
Hi! I’m really new to this. I really hope you can help me out.
Basically, I need to send an RFID serial number to a PHP page. I’ve successfully connected the RFID USB Reader and the serial number is reflected in the Activity Log.
My Net is not connected and I’m not sure why.
My Preferences are as follows:
Listen to port: 8888
Request URL: http://localhost:8888/rfid.php
(I am using MAMP)
In my rfid.php, I’m using this code:
However, I don’t seem to get the serial ID reflected on my rfid.php page.
Could you please point out my mistake?
I hope to hear from you soon, Thank you!
March 23rd, 2013 at 00:03
oops, my code wasn’t reflected in the previous post
$response = $_GET['q'];
print ($response); //this is supposed to print out my RFID serial ID
error_log(“Internet to Serial Proxy Response: {$response}”);
March 25th, 2013 at 12:55
Hi. In the Internet to Serial Proxy app, can you see what is sent from the Arduino in the console log? Normally what is seen there is sent to the php page. Do you see a “Succeeded!” message after the string that must be sent in the ISP app log window?