Exact match. Not showing close matches.
PICList
Thread
'[PIC] HTML to browser over EIA232?'
2005\09\27@160423
by
Harold Hallikainen
I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
projects. Is there any way to direct a URL request from a browser to a
COMM port? Say, instead of the or file:// prefix, we did a com1://
prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
sending the request out to the specified IP address over ethernet, it'd
send the GET or POST request out the specified EIA232 port. Our PIC would
just respond to the request. The mydevice in the above URL would be
meaningless, though perhaps the PIC device could ignore requests not
addressed to it (not respond), allowing other devices on a tri-state or
open collector EIA232 bus to respond. I've done "open collector" EIA232
buses by having a pull-down to -12 and a diode between the driver and the
bus. Any device can drive the bus positive (space condition), and the bus
idles at -12V (mark condition). This would be a master/slave arrangement,
since no device gets on the bus unless asked for a response, so contention
would not be an issue.
So, any "wedge" or something that can be put on a Windoze machine so a URL
prefix of com1: com2: etc. would work?
Just kicking around the idea.
THANKS!
Harold
--
FCC Rules Updated Daily at http://www.hallikainen.com
2005\09\27@161534
by
marcel
|
Harold,
your best bet might be to look at a very minimalistic web server (i believe
busybox has one, for example), and then modify it for your purposes. You can
let it run in the background, listening to requests on, say, localhost:81, and
forwarding them appropriately to the serial device.
- Marcel
"Harold Hallikainen" <spam_OUTharoldTakeThisOuT
hallikainen.com> wrote:
{Quote hidden}> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> sending the request out to the specified IP address over ethernet, it'd
> send the GET or POST request out the specified EIA232 port. Our PIC would
> just respond to the request. The mydevice in the above URL would be
> meaningless, though perhaps the PIC device could ignore requests not
> addressed to it (not respond), allowing other devices on a tri-state or
> open collector EIA232 bus to respond. I've done "open collector" EIA232
> buses by having a pull-down to -12 and a diode between the driver and the
> bus. Any device can drive the bus positive (space condition), and the bus
> idles at -12V (mark condition). This would be a master/slave arrangement,
> since no device gets on the bus unless asked for a response, so contention
> would not be an issue.
>
> So, any "wedge" or something that can be put on a Windoze machine so a URL
> prefix of com1: com2: etc. would work?
>
> Just kicking around the idea.
>
> THANKS!
>
> Harold
>
>
2005\09\27@161534
by
marcel
|
Harold,
your best bet might be to look at a very minimalistic web server (i believe
busybox has one, for example), and then modify it for your purposes. You can
let it run in the background, listening to requests on, say, localhost:81, and
forwarding them appropriately to the serial device.
- Marcel
"Harold Hallikainen" <.....haroldKILLspam
@spam@hallikainen.com> wrote:
{Quote hidden}> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> sending the request out to the specified IP address over ethernet, it'd
> send the GET or POST request out the specified EIA232 port. Our PIC would
> just respond to the request. The mydevice in the above URL would be
> meaningless, though perhaps the PIC device could ignore requests not
> addressed to it (not respond), allowing other devices on a tri-state or
> open collector EIA232 bus to respond. I've done "open collector" EIA232
> buses by having a pull-down to -12 and a diode between the driver and the
> bus. Any device can drive the bus positive (space condition), and the bus
> idles at -12V (mark condition). This would be a master/slave arrangement,
> since no device gets on the bus unless asked for a response, so contention
> would not be an issue.
>
> So, any "wedge" or something that can be put on a Windoze machine so a URL
> prefix of com1: com2: etc. would work?
>
> Just kicking around the idea.
>
> THANKS!
>
> Harold
>
>
2005\09\27@162903
by
Maarten Hofman
Rochester, 27 september 2005.
Dear Harold,
From your description I assume you want to keep it simple on the Windows
side, but don't care about the complexity on the PIC side. There might be
simpler methods, but the one I came up with was using SLIP: at the windows
side this would just involve doing "Add New Connection" -> "Connect directly
to another computer" -> "Guest" -> "COM1" -> Properties -> Networking ->
SLIP. Don't forget to set an IP address.
Of course, implementing SLIP on the PIC might not be easy (though it is a
fairly simple protocol, it would imply implementing TCP/IP as well, at least
to the point where you can accept WWW requests, as well as the WWW server)
but it would keep things quite simple on the Windows side. RFC 1055 contains
more information about SLIP. It might be possible to use SLIP to multiple
PICs connected the way you described, and even between PICs, but I doubt
anyone has ever done it.
Greetings,
Maarten Hofman.
2005\09\27@162938
by
John Temples
On Tue, 27 Sep 2005, Harold Hallikainen wrote:
> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port?
I think the biggest problem with this idea is that any modern browser
is going to open multiple concurrent connections to the server. Those
aren't going to multiplex over a serial link.
One approach would be to run a SLIP link to the PIC. If you don't
want a TCP/IP stack on the PIC, I don't see how you could do it
without some additional code on the PC; some sort of proxy server that
the browser would connect to and convert the connections to serialized
requests over the COM port.
--
John W. Temples, III
2005\09\27@163307
by
Howard Winter
Harald,
On Tue, 27 Sep 2005 13:04:20 -0700 (PDT), Harold Hallikainen wrote:
> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1).
You have to stick to the format of a URL - the part before the // is the *protocol* not any sort of address -
com1 is an address. If you were going to do something like this there would need to be a new protocol defined
(let's call it "ser:" for serial! :-)
So you would have something like:
ser://com1.mymachine/analog?chan=1
where:
"com1" is the name of a serial port
"mymachine" is the name of the machine the port is fitted to, and could be omitted if it's the machine you
are running on
"analog" and "chan" (and anything else beyond the final slash) are interpreted by the device on the serial
port.
Serial ports are generally single devices, but there's nothing to stop you adding further layers of addressing
where the serial device connects onwards to other devices, say on a CAN bus, so you could have:
ser://com1/CAN04/temp1?read
if say you wanted device number 4 on the CAN bus to read temperature 1 and return the result, all accessed via
the serial port.
Now, just watch someone go and spoil the idea... :-)
Cheers,
Howard Winter
St.Albans, England
2005\09\27@163347
by
Marcel Duchamp
|
Harold Hallikainen wrote:
{Quote hidden}> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> sending the request out to the specified IP address over ethernet, it'd
> send the GET or POST request out the specified EIA232 port. Our PIC would
> just respond to the request. The mydevice in the above URL would be
> meaningless, though perhaps the PIC device could ignore requests not
> addressed to it (not respond), allowing other devices on a tri-state or
> open collector EIA232 bus to respond. I've done "open collector" EIA232
> buses by having a pull-down to -12 and a diode between the driver and the
> bus. Any device can drive the bus positive (space condition), and the bus
> idles at -12V (mark condition). This would be a master/slave arrangement,
> since no device gets on the bus unless asked for a response, so contention
> would not be an issue.
>
> So, any "wedge" or something that can be put on a Windoze machine so a URL
> prefix of com1: com2: etc. would work?
>
> Just kicking around the idea.
>
> THANKS!
>
> Harold
If I understand you correctly, you might meet your needs with a
Lantronix Xport. It is a web server in a RJ45 connector with network on
one side and a serial port on the other.
It can repsond to wiggles on the serial port and send data to you over
the network. It can even send an email. The host machine gets a comm
port redirector program that allows you to configure the device like a
remote comm port. An eval board is around $50 or $60US.
2005\09\27@164511
by
Bill Freeman
|
Harold Hallikainen writes:
> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> sending the request out to the specified IP address over ethernet, it'd
> send the GET or POST request out the specified EIA232 port. Our PIC would
...
Not exactly what you're asking for, but a web server
supporting cgi-bin scripts (apache) or possibly some other form of
server side scripting (php, mod-perl, mod-python) would allow URLs
somethin like:
http://localhost/cgi-bin/pic-wacker?port=com1?func=analog?chan=1
This has the advantage of being a real URL, so if you wound up
using a tool where you had to choose from a spin-box for the protocol
(http, ftp, file, etc.) you wouldn't get stuck because it doesn't know
a protocol called com1.
Another possibility is that the Python distribution
(python.org, free), and I'm sure other tools like perl, comes with (or
has available) a relativly small web server implementation in that
language. It could easily be modified to apply suitable GET or POST
requests, with whatever filtering/munging that you want, to com ports.
You would still use an ordinary URL such as I suggest above, possibly
on an IP port other than 80.
Bill
2005\09\27@165152
by
D. Jay Newman
> You have to stick to the format of a URL - the part before the // is the *protocol* not any sort of address -
> com1 is an address. If you were going to do something like this there would need to be a new protocol defined
> (let's call it "ser:" for serial! :-)
I'd go with "serial:" I don't see any reason to abbreviate this.
> So you would have something like:
>
> ser://com1.mymachine/analog?chan=1
> where:
> "com1" is the name of a serial port
> "mymachine" is the name of the machine the port is fitted to, and could be omitted if it's the machine you
> are running on
I can't picture using this URL on a different machine.
Otherwise, I *love* it.
--
D. Jay Newman ! Polititions and civilations come and
jay
KILLspamsprucegrove.com ! go but the engineers and machinists
http://enerd.ws/robots/ ! make progress
2005\09\27@165206
by
Richard Prosser
|
It may not be exactly what you decribe but have a look at
<http://www.easyvitools.com/index.html>
he has a com port to browser interface & mini web server.
Also tools for building a windows control panel that drives devices by
serial ports or ethernet etc.
You just use a BASIC style language to describe what you want. The
downside is that it is a bit slow & there is minimal error checking so
incorrect syntax just results in things not working,
If you can find a copy of the earlier demo version ezcom2web server
program it is less restricted than the later one.
RP
On 28/09/05, Marcel Duchamp <.....marcel.duchampKILLspam
.....sbcglobal.net> wrote:
{Quote hidden}> Harold Hallikainen wrote:
> > I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> > projects. Is there any way to direct a URL request from a browser to a
> > COMM port? Say, instead of the or file:// prefix, we did a com1://
> > prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> > sending the request out to the specified IP address over ethernet, it'd
> > send the GET or POST request out the specified EIA232 port. Our PIC would
> > just respond to the request. The mydevice in the above URL would be
> > meaningless, though perhaps the PIC device could ignore requests not
> > addressed to it (not respond), allowing other devices on a tri-state or
> > open collector EIA232 bus to respond. I've done "open collector" EIA232
> > buses by having a pull-down to -12 and a diode between the driver and the
> > bus. Any device can drive the bus positive (space condition), and the bus
> > idles at -12V (mark condition). This would be a master/slave arrangement,
> > since no device gets on the bus unless asked for a response, so contention
> > would not be an issue.
> >
> > So, any "wedge" or something that can be put on a Windoze machine so a URL
> > prefix of com1: com2: etc. would work?
> >
> > Just kicking around the idea.
> >
> > THANKS!
> >
> > Harold
>
> If I understand you correctly, you might meet your needs with a
> Lantronix Xport. It is a web server in a RJ45 connector with network on
> one side and a serial port on the other.
>
> It can repsond to wiggles on the serial port and send data to you over
> the network. It can even send an email. The host machine gets a comm
> port redirector program that allows you to configure the device like a
> remote comm port. An eval board is around $50 or $60US.
>
> -
2005\09\27@170145
by
Andrew
On 27/09/2005, at 9:04 PM, Harold Hallikainen wrote:
> COMM port? Say, instead of the or file:// prefix, we did a
> com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
It should be something more like:
serial://com1/
The protocol for talking to com2 would be the same as talking to com1 -
its the address thats different. Feel free to substitute serial with
some other string.
Obviously no browser supports this as yet but I believe you could do it
via a Mozilla/Firefox plugin. Overload user:password@host:port stuff to
set baud rate etc.
I think if you put it in the right place, you could serialise the
requests within Firefox. Never done it myself of course :-)
Andrew
2005\09\27@171958
by
Robert A LaBudde
|
At 04:04 PM 9/27/2005, Harold wrote:
>I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
>projects. Is there any way to direct a URL request from a browser to a
>COMM port? Say, instead of the or file:// prefix, we did a com1://
>prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
>sending the request out to the specified IP address over ethernet, it'd
>send the GET or POST request out the specified EIA232 port. Our PIC would
>just respond to the request. The mydevice in the above URL would be
>meaningless, though perhaps the PIC device could ignore requests not
>addressed to it (not respond), allowing other devices on a tri-state or
>open collector EIA232 bus to respond. I've done "open collector" EIA232
>buses by having a pull-down to -12 and a diode between the driver and the
>bus. Any device can drive the bus positive (space condition), and the bus
>idles at -12V (mark condition). This would be a master/slave arrangement,
>since no device gets on the bus unless asked for a response, so contention
>would not be an issue.
>
>So, any "wedge" or something that can be put on a Windoze machine so a URL
>prefix of com1: com2: etc. would work?
I'm no expert, but I believe an IP address can be assigned to just about
any device in Windows.
================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: EraseMEralspam_OUT
TakeThisOuTlcfltd.com
Least Cost Formulations, Ltd. URL: http://lcfltd.com/
824 Timberlake Drive Tel: 757-467-0954
Virginia Beach, VA 23464-3239 Fax: 757-467-2947
"Vere scire est per causas scire"
================================================================
2005\09\27@172525
by
Mark Rages
On 9/27/05, Harold Hallikainen <harold
spam_OUThallikainen.com> wrote:
{Quote hidden}> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> projects. Is there any way to direct a URL request from a browser to a
> COMM port? Say, instead of the or file:// prefix, we did a com1://
> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> sending the request out to the specified IP address over ethernet, it'd
> send the GET or POST request out the specified EIA232 port. Our PIC would
> just respond to the request. The mydevice in the above URL would be
> meaningless, though perhaps the PIC device could ignore requests not
> addressed to it (not respond), allowing other devices on a tri-state or
> open collector EIA232 bus to respond. I've done "open collector" EIA232
> buses by having a pull-down to -12 and a diode between the driver and the
> bus. Any device can drive the bus positive (space condition), and the bus
> idles at -12V (mark condition). This would be a master/slave arrangement,
> since no device gets on the bus unless asked for a response, so contention
> would not be an issue.
>
> So, any "wedge" or something that can be put on a Windoze machine so a URL
> prefix of com1: com2: etc. would work?
>
> Just kicking around the idea.
>
> THANKS!
You can make a simple Python web server in less than a screenful of
code: http://fragments.turtlemeat.com/pythonwebserver.php
Join the example given with the excellent pySerial project, and you
get a cross-platform, network transparent GUI without much effort.
I've done exactly this for some of our in-house projects. Very cool.
(You might need to poke a hole in Windows firewall to access the
interface from another computer.)
Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
- fortune cookie
2005\09\27@183718
by
Harold Hallikainen
THANKS for the comments thus far! I realize there are hardware approaches,
such as serial to ethernet adapters (Lantronix, etc.). I'm wondering,
though, of a purely software approach on the Windoze side. I've written a
lot of cgi scripts, and the stuff the browser sends the cgi is pretty easy
to deal with (even with a pic). The trick is to get the browser to send
that directly to the pic (through a serial port) instead of through
ethernet (or slip on the serial port). Just send the GET or POST request
out the serial port and display what comes back.
Since the exchange is all ascii, a PIC could handle it very cheaply
without having to deal with slip, ethernet, or requiring additional
hardware to deal with ethernet. Maybe if the OS treats a com port like a
file, the URL could be
file://com1/somethingOrAnother/?parameter1=123¶meter2=456 .
Just playing around with the idea. Why convert to ethernet if we don't
need to?
Harold
> Harold Hallikainen wrote:
>> I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
projects. Is there any way to direct a URL request from a browser to a
COMM port? Say, instead of the or file:// prefix, we did a
com1://
>> prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
sending the request out to the specified IP address over ethernet, it'd
send the GET or POST request out the specified EIA232 port. Our PIC
would
>> just respond to the request. The mydevice in the above URL would be
meaningless, though perhaps the PIC device could ignore requests not
addressed to it (not respond), allowing other devices on a tri-state or
open collector EIA232 bus to respond. I've done "open collector" EIA232
buses by having a pull-down to -12 and a diode between the driver and
the
{Quote hidden}>> bus. Any device can drive the bus positive (space condition), and the bus
>> idles at -12V (mark condition). This would be a master/slave
>> arrangement,
>> since no device gets on the bus unless asked for a response, so contention
>> would not be an issue.
>> So, any "wedge" or something that can be put on a Windoze machine so a URL
>> prefix of com1: com2: etc. would work?
>> Just kicking around the idea.
>> THANKS!
>> Harold
>
> If I understand you correctly, you might meet your needs with a
> Lantronix Xport. It is a web server in a RJ45 connector with network on
one side and a serial port on the other.
>
> It can repsond to wiggles on the serial port and send data to you over
the network. It can even send an email. The host machine gets a comm
port redirector program that allows you to configure the device like a
remote comm port. An eval board is around $50 or $60US.
>
> -
2005\09\28@085357
by
Gerhard Fiedler
|
Bill Freeman wrote:
> Harold Hallikainen writes:
> > I'm wondering about a cheap and dirty way to get a Windoze GUI for PIC
> > projects. Is there any way to direct a URL request from a browser to a
> > COMM port? Say, instead of the or file:// prefix, we did a com1://
> > prefix (perhaps a URL of com1://mydevice/analog?chan=1). Instead of
> > sending the request out to the specified IP address over ethernet, it'd
> > send the GET or POST request out the specified EIA232 port. Our PIC would
>
> Not exactly what you're asking for, but a web server
> supporting cgi-bin scripts (apache) or possibly some other form of
> server side scripting (php, mod-perl, mod-python) would allow URLs
> somethin like:
>
> http://localhost/cgi-bin/pic-wacker?port=com1?func=analog?chan=1
I guess this is as good as it gets. Inventing a new protocol doesn't make
much sense, because none of the browsers would understand it -- and that's
the start idea of this, if I understand it correctly. What good does you do
a com1: or ser: or serial: protocol if you have to write your own browser
to use it?
So stick with http (that's what you seem to want to use anyway, indicated
by your wanting to use GET and POST, both http commands), run it to a local
web server (enough free ones around, including IIS) and provide a program
there (ASP, PHP, Python, whatever) that performs the serial communication,
in a form very similar to how it would talk to a database.
It seems this guy has done just this (from Richard's post):
http://www.easyvitools.com/ezcom2web/index.html
The thing left to do is to come up with a serial protocol that addresses
all your needs and that you implement in a language of your choice on the
PC as a cgi program or script (so that it can run under control of the
local web server).
Gerhard
More... (looser matching)
- Last day of these posts
- In 2005
, 2006 only
- Today
- New search...