EmbeddedRelated.com
Forums

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

Started by Lyn April 2, 2008
On Apr 3, 3:02 pm, Grant Edwards <gra...@visi.com> wrote:
> On 2008-04-03, Robert Adsett <s...@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.
You're right. I was assuming something else would have to read the serial port. It never occurred to me that that wouldn't be the case, if nothing else something has to know when to read the data and format it into something nice for whoever is receiving the mail. Of course if the data server at the other end of the serial port is nice enough it's concievable that a simple copy might work. Not likely though. Still it does reduce the size of the problem. Robert
On 2008-04-03, Robert Adsett <sub2@aeolusdevelopment.com> wrote:

>> >> > > 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
[...]
>> > 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. > > You're right. I was assuming something else would have to read the > serial port. It never occurred to me that that wouldn't be the case, > if nothing else something has to know when to read the data and format > it into something nice for whoever is receiving the mail.
Assuming the data is text (or there's a command-line utility that reads the data and converts them to text), you don't really need much more than a shell-script a few lines long to do what the OP wants given a command-line mail program and something like msmtp or ssmtp (or any other MTA).
> Of course if the data server at the other end of the serial > port is nice enough it's concievable that a simple copy might > work. Not likely though. Still it does reduce the size of the > problem.
-- Grant Edwards grante Yow! ! Now I understand at advanced MICROBIOLOGY and visi.com th' new TAX REFORM laws!!
On Apr 3, 9:16=A0pm, Grant Edwards <gra...@visi.com> wrote:
> On 2008-04-03, Robert Adsett <s...@aeolusdevelopment.com> wrote: > > >> >> > > I am reading in some temperature sensor data, via RS232 (actuall=
y
> >> >> > > 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 ab=
le to
> >> >> > > send this data out via email as it arrives. Is there any applica=
tion
> >> >> > > that can do this, free or commerical, please? I have searched us=
ing
> >> >> > > Google but not found anything. > > >> >> > There are utilities to do that. =A0I'm using one on another projec=
t but
> >> >> > I've forgotten the name. =A0I'll try to remember to post a referen=
ce Thurs
> >> >> > Afternoon > > [...] > > > > > > >> > Refreshed my memory. =A0This is the utility I'm thinking of > > >> > msmtp > > >> >http://msmtp.sourceforge.net/ > > >> > Nice command line interface. =A0You do have to set up a configuration=
> >> > file so it knows what smtp server it should communicate with. =A0It > >> > 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. =A0It's not going to > >> read data periodically from a serial port. > > > You're right. =A0I was assuming something else would have to read the > > serial port. =A0It never occurred to me that that wouldn't be the case, > > if nothing else something has to know when to read the data and format > > it into something nice for whoever is receiving the mail. > > Assuming the data is text (or there's a command-line utility > that reads the data and converts them to text), you don't > really need much more than a shell-script a few lines long to > do what the OP wants given a command-line mail program and > something like msmtp or ssmtp (or any other MTA). > > > Of course if the data server at the other end of the serial > > port is nice enough it's concievable that a simple copy might > > work. =A0Not likely though. Still it does reduce the size of the > > problem. > > -- > Grant Edwards =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 grante =A0 =A0 =A0 =A0 =
=A0 =A0 Yow! ! =A0Now I understand
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 at =A0=
=A0 =A0 =A0 =A0 =A0 =A0 advanced MICROBIOLOGY and
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0visi.com =
=A0 =A0 =A0 =A0 =A0 =A0th' new TAX REFORM laws!!- Hide quoted text -
> > - Show quoted text -
Thank you for all your contributions. I am an embedded hardware/ software engineer and not written software for pc for a while. That's why I was looking to buy/ use an off the shelf system. I am thinking of redesigning the system to just add a gsm modem (from old nokia phone) and sent temperature text alerts to a mobile phone. Not all my users will have pcs (e.g. elderly people), and there are more cell phone users than pc users (I think?) in uk. Mrs Lyndsay Williams www.girtonlabs.com