This second loopback program is to test RXTX’s serial event (data available event). Note that you need serial loopback to use this source code.
(more…)
August 29, 2008
RXTX Loopback Test Program(2)
August 28, 2008
RXTX Loopback Test Program(1)
One comment that I had in this site said that the RXTX library is not very reliable in the receiving part (using data available event).
I’m unsure whether it happens because of the RXTX implementation (in the application side) or RXTX library has internal bug. So, here’s some simple loopback test program to test the RXTX.
(more…)
August 19, 2008
Handling URC (Unsolicited Result Code) in Hayes AT Command
URC is the message that is sent from the ME (Mobile Equipment, eg. GSM/GPRS/CDMA modem) that\’s not the result of the AT command.
Here\’s some examples: RING is sent when the modem is called, CONNECTED is sent when the modem answer the call, or +CNMI is sent when modem received new SMS. You can think of URC as modem\’s soft interrupt.
So, what\’s the problem with the URC ? Unless you haven\’t programmed any of application that deals with the modem directly, you will notice that URC sometimes destroy your parser state machine when it fires in middle of executing AT command.
Here\’s the illustration of the URC problem:
application>AT+CMGL=4 # List all of SMS inside the ME
ME> RING # Incoming call
ME> OK # There\'s no SMS inside the ME
ME> RING # Incoming call
The RING between AT+CMGL and OK is happenned because the AT command hasn\’t reach the serial port, while the incoming call is received. This may break the AT command parser. But there\’s a way to help it.