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
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.
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!