AGG Software Forums
November 23, 2024, 11:25:51 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: COM Port Emulator adding 0D 0A after message  (Read 25558 times)
opy01
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« on: November 06, 2014, 07:03:08 PM »

I am trying to send data to a program that can only accept 16 bytes at a time.  My file contains this:

"
-02004C6B30
>"

There is a carriage return at the beginning and carriage return before the > but not one after.

It should show up as this:

"0D 0A 2D 30 32 30 30 34 43 36 42 33 30 0D 0A 3E"

but instead is shows up as this when sent 10 times:

[0D 0A 2D 30 32 30 30 34 43 36 42 33 30 0D 0A 3E]  msg: "Reply from Olimex reader. Tag read 2004C6B30
"
[0D 0A 0D 0A 2D 30 32 30 30 34 43 36 42 33 30 0D]  msg: "Unknown reply of length 16: 0D 0A 0D 0A 2D 30 32 30 30 34 43 36 42 33 30 0D

"
[0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34 43 36 42 33]  msg: "Unknown reply of length 16: 0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34 43 36 42 33

"
[30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34 43 36]  msg: "Unknown reply of length 16: 30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34 43 36

"
[42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34]  msg: "Unknown reply of length 16: 42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30 30 34

"
[43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30]  msg: "Unknown reply of length 16: 43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30 32 30

"
[30 34 43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30]  msg: "Unknown reply of length 16: 30 34 43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A 2D 30

"
[32 30 30 34 43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A]  msg: "Unknown reply of length 16: 32 30 30 34 43 36 42 33 30 0D 0A 3E 0D 0A 0D 0A

"
[2D 30 32 30 30 34 43 36 42 33 30 0D 0A 3E 0D 0A]  msg: "Unknown reply of length 16: 2D 30 32 30 30 34 43 36 42 33 30 0D 0A 3E 0D 0A

"
[0D 0A 2D 30 32 30 30 34 43 36 42 33 30 0D 0A 3E]  msg: "Reply from Olimex reader. Tag read 2004C6B30
"

The data get shifted 2 bytes over per send till it loops back to what it was supposed to be.  As you can see there are only 2 carriage returns in my data I am sending but the emulator is adding a third one at the end.  How do I eliminate the 0D 0A it sends at the end of the command?

Thanks
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: November 07, 2014, 07:37:09 AM »

I would recommend the following:

1. switch to the "Text strings" mode.
2. enable the "Interpret characters like #XX...." .
3. clear the "Line ending characters" field.
4. specify your data in the input field as:

#0D#0A002004C6B30#0D#0A#3E

in this case the program will send exactly you want.
Logged
opy01
Newbie
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: November 07, 2014, 03:50:22 PM »

ok after restarting everything, your suggestion works perfect.  Before I restarted, the data was out of order.  The 0A 3E was at the beginning.  It's odd that it keeps what was not sent in a buffer till the next send.  I don't know if it is the emulator or the software I'm sending to doing that but thank you so much for your help!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines