1

I have an issue with my sim808 module and its encoding mechanisms when software flow control is enabled. The issue is simply bad encoding of the lowercase w character (baud rate 115200, Data Bits: 8, Stop Bits:1). The problem is as follows:

Without software flow control (using the AT command AT+IFC=0,0):

sudo cutecom
QWERTYUIOPASDFGHJKLZXCVBNM,./;'[]<>?:"{}`1234567890-=~!@#$%^&*()_+qwertyuiopasdfghjklzxcvbnm (input)
QWERTYUIOPASDFGHJKLZXCVBNM,./;'[]<>?:"{}`1234567890-=~!@#$%^&*()_+qwertyuiopasdfghjklzxcvbnm (output echo)

As you can see from above all the characters are encoded and echoed properly by the modem.

Now I enable software flow control (AT+IFC=1,1) and try the same thing:

sudo cutecom
QWERTYUIOPASDFGHJKLZXCVBNM,./;'[]<>?:"{}`1234567890-=~!@#$%^&*()_+qwertyuiopasdfghjklzxcvbnm (input)
QWERTYUIOPASDFGHJKLZXCVBNM,./;'[]<>?:"{}`1234567890-=~!@#$%^&*()_+q\0x9artyuiopasdfghjklzxcvbnm (output echo)

Note that the output echo encodes the w value incorrectly (returning a \0x9a here). Why I say only w is incorrectly encoded and not e as well (you may notice that e is also missing in the above echo output) is because of the following:

sudo cutecom
e (input)
e (output echo)

and...

sudo cutecom
w (input)
\0xf5 (output echo)

As evident above, e is properly encoded but w is mapped to a hex value of 0xf5 while it should be 0x77 (according to ascii tables)

What's more confusing is when w is followed by another valid ascii character, there seems to be some concatenating effect between the two hexes:

sudo cutecom
we (input)
\0x9a (output echo)
wx (input)
\0x87 (output echo)

Initially I assumed there was a problem with the character sets in the GSM module and I used the command AT+CSCS to change this to all the other options ("IRA","GSM","UCS2","HEX","PCCP","PCDN","8859-1"). But no matter what character set I chose, I get the same result.

Any help will be appreciated in this regard for debugging or fixing the issue (It seems kind of an absurd solution to disable flow control just to get one ascii character working!!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.