View previous topic :: View next topic |
Author |
Message |
Tim
Joined: 30 Sep 2011 Posts: 12
|
Posted: Wed Jan 18, 2012 9:49 am Post subject: Bug in get_tag() |
|
|
I believe that I have found a bug in the get_tag() library function. I am attempting to find the tag T_TEXT_STRING in a terminal response to a GET INKEY (yes/no) command. This work OK on phones which respond with the following string
81 03 01 22 04 82 02 82 81 83 01 00 8d 02 04 00
where the tag 8d is found (this is actually the Text String tag 0d with the CR bit 8 set)
However, on some phones I get the string
81 03 01 22 04 02 02 82 81 03 01 00 0d 02 04 01
which is the same reply except for the lack of CR flags on some tags. This returns 0 from the get_tag() call.
Since the tags seem to be defined correctly (top bit clear) it seems that the function is adding the CR flag then doing an 8 bit compare on the tags? I think that the get_tag() function should ignore the state of the CR flag.
Is this a known problem? Is there a workaround (I can't think of one)? |
|
Back to top |
|
|
pz
Joined: 12 Mar 2004 Posts: 1161
|
Posted: Wed Jan 18, 2012 11:06 am Post subject: |
|
|
Checked and we do &0x7f on tags in get_tag(), so this seems ok, it's CR independent. Can you send whole log to info@? Thanks. |
|
Back to top |
|
|
|