HL8548 KTCPRCV command error

Hello,

we are using HL8548 module (fw: RHL85xx.5.5.18.0.201506301553.x6250_1) connected to microcontroller via UART interface. At 115200bps baud rate it works without problems, but using with higher baudrates(500000,921600,1843200) module frequently(not always) responds to AT+KTCPRCV command with ERROR. It starts to respond normaly only when +KTCPSTAT: 5,4,0,218 indicates that socket is closed. What can be wrong with this command ?

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<ERROR

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<ERROR

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<ERROR

AT+KTCPSTAT=1
<<+KTCPSTAT: 5,4,0,218
<<OK

AT+KTCPRCV=1,218
<<CONNECT
<<218BYTES_OF_DATA
<<–EOF–Pattern–
<<OK

Hi,
Provide AT+CMEE=2 at the beginning of the data connection sot hat it will tell you the error details.
Also not sure you can go for higher baud rate using UART interface :confused:

-Alex

HL8548 module reports this error:
+CME ERROR: 923 Error due to invalid state of terminal port data mode

Using AT&K3 command does not change anything. Does this mean than it’s impossible to use HL8548 in higher baudrates due to such strange behaviour of only this command ? Or this is a firmware bug ? It’s very strange, that error is reported only when TCP socket is opened.

AT&K3
<<OK

AT+CMEE=2
<<OK

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 5,4,0,218
<<OK

AT+KTCPRCV=1,218
<<CONNECT
<<218BYTES_OF_DATA
<<–EOF–Pattern–
<<OK

Hi,
I don’t think using UART you can go or higher baud rates… May be that’s causing issue… you can try with usb or ‘uart to usb’ converter :slight_smile:

-Alex

Today i have connected HL8548 module through USB connection to computer. Module behaves exactly the same as seen using UART’s high baudrates. Baudrate settings using USB does no effect. Any ideas ?

AT&K3
<<OK

AT+CMEE=2
<<OK

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 3,-1,0,218
<<OK

AT+KTCPRCV=1,218
<<+CME ERROR: 923

AT+KTCPSTAT=1
<<+KTCPSTAT: 5,4,0,218
<<OK

AT+KTCPRCV=1,218
<<CONNECT
<<218BYTES_OF_DATA
<<–EOF–Pattern–
<<OK

Can anybody explain, what exactly +CME ERROR: 923 (Error due to invalid state of terminal port data mode) means ? Is it a BUG of HL8548 firmware (this error shows up with 5.5.18.0 and 5.5.22.0 FW versions) ?

Ok, i have figured out, that this error shows up only when i send more than 16000bytes with AT+KTCPSND command. Enabling hardware flow control does nothing, seems that it is not working as stated in interface guide “In AT data mode, the terminal receive buffer size is limited to 32000 bytes; the terminal driver will stop the receive flow at 16000 bytes if hardware
handshaking is used”.