How to initiate a TCP/IP connection, or send an HTTP GET request
Max
Posts: 13
Hey guys. I'm trying to get two BASIC stamps to communicate with each other over the local internet on my college campus. I've been having trouble Googling resources for this kind of thing. I was going to use a Lantronix WiMicro, but the distributor crapped out and never shipped them. So, I am connecting both stamps to computers running Apache and PHP.
It's pretty easy to have PHP initiate a connection to the stamp based on an HTTP request, because you can just have PHP execute a shell command using `s. What I am stumped on is having the stamp itself initiate a TCP/IP connection!
I'm trying to figure out Serproxy, but there isn't really any documentation. Also, it seems like Serproxy might not be able to initiate TCP/IP connections based on serial activity... is that right? I'm looking at PHP Serial extension too, but I'm just not sure if I have the time to set it up.
All I need to do is for each computer to have a program listening for activity on the serial port, and to send a really simple TCP/IP packet to a specific IP address, generated by the serial activity.
Any ideas?
It's pretty easy to have PHP initiate a connection to the stamp based on an HTTP request, because you can just have PHP execute a shell command using `s. What I am stumped on is having the stamp itself initiate a TCP/IP connection!
I'm trying to figure out Serproxy, but there isn't really any documentation. Also, it seems like Serproxy might not be able to initiate TCP/IP connections based on serial activity... is that right? I'm looking at PHP Serial extension too, but I'm just not sure if I have the time to set it up.
All I need to do is for each computer to have a program listening for activity on the serial port, and to send a really simple TCP/IP packet to a specific IP address, generated by the serial activity.
Any ideas?
Comments
http://www.precidia.com/products/ipocket_232.html
A couple years ago there were around $79, not sure on current prices.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
Good luck finding something else if this doesn't help! I'm out of ideas [noparse]:)[/noparse]
http://www.stampplot.com
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
At the moment I'm using Max/MSP. It's a visual programming language put out by Cycling '74. It took about 10 minutes to connect two computers... unfortunately, it's $500 and the only reason I got to use it is because my college has a license for its computer center boxes!
So, if you have something like a Perl script monitoring the BS2 via a serial connection, you could just send a request to Perl, and have the script do it's thing.
Here's an article that you might find useful: www.linuxjournal.com/article/7403