Go Down

Topic: RS232 Monitor with Ardino (Read 2354 times) previous topic - next topic

potman100

Hi

I have a standalone device that requires a RS232 dongle to be attached in order to function, the dongle acts as a counter for use of the device only allowing the device to run when there is enough free usage time left on the dongle.

I want to be able to monitor the data transfer between the dongle and the device and was wondering if anybody had done this before or whether someone could offer any advice or resources that would allow me to do this.

I have had some success using a breadboard and arduino with an RS232 straight through cable, which terminated at the pc, and using Putty managed to get the startup data from the device, but I can't seem to catch any back and forth communication between the dongle and the device.

Of the 9 female RS232 pins on the device I have managed to work out only the 4 pin row is used, the 5 pin row has no connections to them, after taking a dongle apart and checking the connections, so I think the 4 pins represent, TX,RX,5+,G, but trying different combinations has not allowed me to see any data transfer, I did look at RS232 monitor cables, and noticed a resistor in the wiring, is this what Im missing ?

The wiring I used was 4 male to male connections from the device to the breadboard, then the RS232 4 row cable connected in series (as sort of a man in the middle) to the PC, then 4 male to female connectors from the breadboard to the required pins on the dongle chip.

Any help would be greatly welcomed.

Thanks

Potman

Paul_KD7HB

Hi. Welcome to the Arduino forum. Do you have a DVM to measure the voltages on the pins while the dongle is in operation? Just because connectors have 9 pins does not make the "RS232", which actually defines 25 pins.

If the data pins voltages, measured to ground, are anything greater than +5, or less than 0, you will need a RS232 to TTL converter to allow the Arduino to monitor the communications and not be killed in the process.

Do you have or have access to an oscilloscope? This would let you see and measure the voltage on data pins while they are active.

Paul

potman100

Hi Paul

Thanks for the reply, sorry don't have access to a oscilloscope, but do have a DVM, having taken a few measurement, the voltage reading don't go over 3.2v on 3 of the pins and 0 on the fourth which I take it is ground, so I think the arduino would be ok.

Paul_KD7HB

Hi Paul

Thanks for the reply, sorry don't have access to a oscilloscope, but do have a DVM, having taken a few measurement, the voltage reading don't go over 3.2v on 3 of the pins and 0 on the fourth which I take it is ground, so I think the arduino would be ok.
Then it is not RS-232. And an Arduino would be ok if the voltage never goes negative. Only a 'scope will tell you that while a data stream is being sent.

Can you determine what else, electronics, IC's, etc are in the dongle? 3.2 volts is not TTL, either. Could your reading of 3.2 volts be an average of the varying data signal.

Paul

potman100

#4
Feb 16, 2017, 07:47 pm Last Edit: Feb 16, 2017, 08:12 pm by potman100
Here a pic of the dongle chip




Not to sure about the average.

One other thing to mention.

The dongle has say 500 credits, each time the item is used 1 credit is taken, whilst the chip is > than 250 left I have to have to use all 4 wires, but when it goes under 250 I can use 3 wires removing the 1st of the 4 and all works ok, but if I try 3 wires when > 250 the device causes an error basically saying it can't see the dongle.

Just to clarify how I'm taking the reading, I am using pin 5 as ground and then checking the voltage on the top 4 pins as in the picture and from standing idle, to running it does not move from 3.2v on pin 2, 3, 4, pin 1 stays at 0.

Paul_KD7HB

The picture is not showing the printing on the chip so I can read it. You will have to write it.

Your meter will not be able to measure a rapidly changing voltage, but in it's attempt, it will show more or less, an average of what it sees.

Paul

potman100

Hi

Sorry for the delay in responding, I could not magnify it enough to read it last night, anyway this is what is on the top of the chip :

ATH552

02CM Y

AB20PA

I did a lot of searching on all parts but was unable to get any info about the chip.

Potman

Paul_KD7HB

Hi

Sorry for the delay in responding, I could not magnify it enough to read it last night, anyway this is what is on the top of the chip :

ATH552

02CM Y

AB20PA

I did a lot of searching on all parts but was unable to get any info about the chip.

Potman

Searching for "02cmy" eventually led me to this data sheet: www.atmel.com/images/atmel-8700-seeprom-at24c01c-02c-datasheet.pdf. It looks like it could be your chip.

The next step in your project will be to use a digital oscilloscope to read and store the I2C communications to/from the chip and see if you can decode the communications. Some version of Arduino will have the capability, if you program it to copy the communication stream.

Good luck with the project!

Paul

potman100

Hi

Thanks for finding the chip data sheet, I will have a look in to a digital oscilloscope, and how to copy the communication stream.

Might be a little above my understanding, but would love to be able to emulate the dongle.

Thanks Again.

Darren

If anyone can point me in the right direction of tutorials to implement paul's suggestion, please feel free to post them.

Paul_KD7HB

Just a thought, since rereading your original post. Is this device the dongle is connected to something you have to pay the owner for the use of?

The reason I ask is a customer of mine, several years ago, is now in prison in Massachusetts for fraud when he was making and selling devices to fool cable internet suppliers into supplying high speed data capability when the user was not paying for it.  He was also selling books and consulting to others to help them do the same.

Paul

potman100

#10
Feb 18, 2017, 05:07 pm Last Edit: Feb 18, 2017, 05:53 pm by potman100
Hi

No, I purchased the device, and it was not cheap, but the supplier ties me to them via the consumables kit that I have to purchase on order to use the machine, and recently they keep upping the price of the kits, and you find that when the chip runs out I have about a 3rd of the extra consumables left every time, but because I have no time left on the chip they are useless.

I would like to be able to use all the consumables I have paid for, but the company involved won't sell any part of the kit separately.

I'm not trying to anything illegal.

I do have a question though !

Looking at the Data Sheet its says that, that if pin 7 is not connected to vcc then it is grounded, anf the memory is read write, but if connected to vcc it is write protected, if I linked vcc and wp (pin 7), this would write protect the memory, so do you think this will stop any time being removed from the chip ?

Thanks

Darren

Paul_KD7HB

Looking at the Data Sheet its says that, that if pin 7 is not connected to vcc then it is grounded, anf the memory is read write, but if connected to vcc it is write protected, if I linked vcc and wp (pin 7), this would write protect the memory, so do you think this will stop any time being removed from the chip ?

Thanks

Darren
If you can be sure to get the pin off ground, then would be interesting to try. Can't hurt the little thing, if it was designed that way.

Paul

Allen1976

Did you ever get this sorted out? We have the same machine, with the same problem. Lots of consumables left over that we paid for, but can't actually use.

Go Up