Pages: [1]   Go Down
Author Topic: printer data snooper  (Read 1893 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi

At work I've got a few different bits of equipment that print out important information with thermal receipt printers. 



At the moment I take the printouts over to a computer, enter in the data from them and a little program I've written performs alsorts of magic with the data.  I've been thinking for a while that it'd be nice if I could connect the machines to the computer and have the computer do all the data entry automatically.  As a fail safe I'd still like the machines to be directly connected to the printers, so i guess I'm looking for a RS232 wire tap.  I'm thinking of something along the lines of:



Now I am aware that there are a few comercial RS232 data tapping solutions out there (http://www.datalinkcom.net/accessories/dl9pcdt.htm, http://www.stratusengineering.com/EZTap.html, etc).  However I fancy having a play with my arduino, and once the basics are up and running I might expand it to include the SD card shield so I can data log onto the arduino as well (so if for example if I leave the machines on over night, I don't have to leave the PC on overnight - the PC can just get the latest log files off the arduino in the morning).

I've had a little browse around the internet and found a website detailing how to do a basic wire tap: http://www.lammertbies.nl/comm/cable/RS-232-spy-monitor.html.  So I guess I can get the hardware part sorted, my next problem is programming the arduino.  I've had no experience in programming serial connections before - could somebody point me in the right direction?

Also if anybody has any thoughts or suggestions for the project then I'd really appreciate it...

Dave


* present.png (30.55 KB, 800x229 - viewed 20 times.)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so i guess I'm looking for a RS232 wire tap.

is it legal (privacy et al) to sniff? Is it your own data?

That said:  it is not too difficult with Arduino

INstall the NewSoftSerial Library and make a sketch with 2 softSerial ports and connect them to the MACHINE and the PRINTER.

if something comes in it is echoed to the other 2 ports. There can be fancy additions too

You probably need to add breakout boxes to change 232 level to TTL level e.g.- http://www.sparkfun.com/products/316 -




Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestions - It's interesting to see the angle you'd recommend of having a serial input and output into the Arduino and having the Arduino mirror the data. I'd not thought about that option, I was more thinking of tapping the wire so the Arduino wasn't sat in between the machine and the printer (incase the Arduino failed).  I'll have a think about it, you might be into something...

Thanks for pointing me towards the libraries (I'll go and look into them), and reminding me to change the voltage (I'd completely forgotten about the voltage difference smiley-roll-sweat oops)

On the legal side, the machines only print out pressure/temperature/cycle/time data, etc.  I own the machines, the printers, the data, the business, etc - so I'd say it's legal. 

I've got a cheap printer coming off ebay so I can have a play with none mission critical data and none mission critical kit first (kinda seemed the sensible option really)

Thanks for the advice

Dave
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The nice part of being in between is that you can reformat the data and for example do  statistics on them (avg temp). If you just listen on the wire this is not possible.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was also looking to build something similar, since most serial communication is standardized can we accept the bits and bytes then convert it over to data that is usable?

Another commercial product available: http://www.fte.com/products/SerialAnalyzers.aspx
Logged

Pages: [1]   Go Up
Jump to: