EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

reading in data from rs232 port, require to resend as an email

Started by Lyn April 2, 2008
I am reading in some temperature sensor data, via RS232 (actually
converted to  USB via a CP2102  ), approx every hour into a Windows XP
PC. It reads fine into Windows Hyperterminal.  I want to be able to
send this data out via email as it arrives. Is there any application
that can do this, free or commerical, please? I have searched using
Google but not found anything.
Lyndsay Williams
www.girtonlabs.com
You may consider to use a scripting language supporting serial port I/O 
and SMTP. My favorite is Tcl/Tk, it's free (even for commercial 
purposes) and has both:
	http://www.tcl.tk/

The ActiveState distribution has "batteries included", the tcllib/smtp 
package:
	http://www.activestate.com/Products/activetcl/

Tcl basics on serial ports:
	http://wiki.tcl.tk/_search?_charset_=UTF-8&S=serial+port

Tcl basics on SMTP:
http://wiki.tcl.tk/_search?_charset_=UTF-8&S=smtp

Regards,
Rolf

Lyn wrote, On 02.04.2008 13:16:
> I am reading in some temperature sensor data, via RS232 (actually > converted to USB via a CP2102 ), approx every hour into a Windows XP > PC. It reads fine into Windows Hyperterminal. I want to be able to > send this data out via email as it arrives. Is there any application > that can do this, free or commerical, please? I have searched using > Google but not found anything. > Lyndsay Williams > www.girtonlabs.com
On 2008-04-02, Rolf Schroedter <me@privacy.net> wrote:

> You may consider to use a scripting language supporting serial port I/O > and SMTP. My favorite is Tcl/Tk, it's free (even for commercial > purposes) and has both: > http://www.tcl.tk/ > > The ActiveState distribution has "batteries included", the tcllib/smtp > package: > http://www.activestate.com/Products/activetcl/
My vote would be for Python http://www.python.org. Python operates at about the same conceptual level as Tcl, but IMO the syntax and sematics are a lot easier to understand. It's also available from active state at http://www.activestate.com/Products/activepython/ Support for sending mail is included above, but the serial port module hasn't made it into the standard library yet and has to be installed separately: http://pyserial.sourceforge.net/ -- Grant Edwards grante Yow! Inside, I'm already at SOBBING! visi.com
Grant Edwards wrote:

> My vote would be for Python http://www.python.org. Python > operates at about the same conceptual level as Tcl, but IMO the > syntax and sematics are a lot easier to understand. It's also > available from active state at http://www.activestate.com/Products/activepython/
If the OP has Borland C++ Builder or Delphi, he could try using the Turbo Power Asynch component (http://sourceforge.net/projects/tpapro/) which has some nice packet- handling for the serial port, plus Borland's standard SMTP component. It would be a nice little stand- alone app, bloated only by the massive VCL required to run it (oh, and Windows) :( But he could also use it to build in debug, onsite testing, configuration etc. JS
In article <162e1754-6241-401b-af68-80a48beee378
@c19g2000prf.googlegroups.com>, Lyn says...
> I am reading in some temperature sensor data, via RS232 (actually > converted to USB via a CP2102 ), approx every hour into a Windows XP > PC. It reads fine into Windows Hyperterminal. I want to be able to > send this data out via email as it arrives. Is there any application > that can do this, free or commerical, please? I have searched using > Google but not found anything.
There are utilities to do that. I'm using one on another project but I've forgotten the name. I'll try to remember to post a reference Thurs Afternoon Robert -- Posted via a free Usenet account from http://www.teranews.com
On Apr 3, 6:49=A0am, Robert Adsett <s...@aeolusdevelopment.com> wrote:
> In article <162e1754-6241-401b-af68-80a48beee378 > @c19g2000prf.googlegroups.com>, Lyn says... > > > I am reading in some temperature sensor data, via RS232 (actually > > converted to =A0USB via a CP2102 =A0), approx every hour into a Windows =
XP
> > PC. It reads fine into Windows Hyperterminal. =A0I want to be able to > > send this data out via email as it arrives. Is there any application > > that can do this, free or commerical, please? I have searched using > > Google but not found anything. > > There are utilities to do that. =A0I'm using one on another project but > I've forgotten the name. =A0I'll try to remember to post a reference Thurs=
> Afternoon > > Robert > > -- > Posted via a free Usenet account fromhttp://www.teranews.com
I would suggest you to VB, you can use MS COM to read serial port and do as you wish. Cheers!! -dK
On 3 Apr, 02:49, Robert Adsett <s...@aeolusdevelopment.com> wrote:
> In article <162e1754-6241-401b-af68-80a48beee378 > @c19g2000prf.googlegroups.com>, Lyn says... > > > I am reading in some temperature sensor data, via RS232 (actually > > converted to =A0USB via a CP2102 =A0), approx every hour into a Windows =
XP
> > PC. It reads fine into Windows Hyperterminal. =A0I want to be able to > > send this data out via email as it arrives. Is there any application > > that can do this, free or commerical, please? I have searched using > > Google but not found anything. > > There are utilities to do that. =A0I'm using one on another project but > I've forgotten the name. =A0I'll try to remember to post a reference Thurs=
> Afternoon > > Robert > > -- > Posted via a free Usenet account fromhttp://www.teranews.com
Thanks for all your replies, I will wait to see if a utility has been written for this. Lyn
If the PC could run on Linux, it would just need a few lines of bash script. 
Just write an email, if you need further information.

regards
  Guenther 


On Apr 3, 4:38 am, Lyn <sense...@gmail.com> wrote:
> On 3 Apr, 02:49, Robert Adsett <s...@aeolusdevelopment.com> wrote: > > > In article <162e1754-6241-401b-af68-80a48beee378 > > @c19g2000prf.googlegroups.com>, Lyn says... > > > > I am reading in some temperature sensor data, via RS232 (actually > > > converted to USB via a CP2102 ), approx every hour into a Windows XP > > > PC. It reads fine into Windows Hyperterminal. I want to be able to > > > send this data out via email as it arrives. Is there any application > > > that can do this, free or commerical, please? I have searched using > > > Google but not found anything. > > > There are utilities to do that. I'm using one on another project but > > I've forgotten the name. I'll try to remember to post a reference Thurs > > Afternoon > > Thanks for all your replies, I will wait to see if a utility has been > written for this.
Refreshed my memory. This is the utility I'm thinking of msmtp http://msmtp.sourceforge.net/ Nice command line interface. You do have to set up a configuration file so it knows what smtp server it should communicate with. It handles all the authentication details etc... It is possible to use Windows interfaces but if you use Outlook (at least with the method I'm using) pops up a box when you fill in the address field and then pops up another one when you do the actual send (and this one can't be answered until after a 4sec wait). Since neither can be turned off that makes that method unsuitable for automation. Robert
On 2008-04-03, Robert Adsett <sub2@aeolusdevelopment.com> wrote:
> On Apr 3, 4:38 am, Lyn <sense...@gmail.com> wrote: >> On 3 Apr, 02:49, Robert Adsett <s...@aeolusdevelopment.com> wrote: >> >> > In article <162e1754-6241-401b-af68-80a48beee378 >> > @c19g2000prf.googlegroups.com>, Lyn says... >> >> > > I am reading in some temperature sensor data, via RS232 (actually >> > > converted to USB via a CP2102 ), approx every hour into a Windows XP >> > > PC. It reads fine into Windows Hyperterminal. I want to be able to >> > > send this data out via email as it arrives. Is there any application >> > > that can do this, free or commerical, please? I have searched using >> > > Google but not found anything. >> >> > There are utilities to do that. I'm using one on another project but >> > I've forgotten the name. I'll try to remember to post a reference Thurs >> > Afternoon >> >> Thanks for all your replies, I will wait to see if a utility has been >> written for this. > > Refreshed my memory. This is the utility I'm thinking of > > msmtp > > http://msmtp.sourceforge.net/ > > Nice command line interface. You do have to set up a configuration > file so it knows what smtp server it should communicate with. It > handles all the authentication details etc...
I use msmtp, and I don't see how it does what the OP wants. msmtp is just a command-line SMTP client. It's not going to read data periodically from a serial port. -- Grant Edwards grante Yow! The SAME WAVE keeps at coming in and COLLAPSING visi.com like a rayon MUU-MUU ...

The 2024 Embedded Online Conference