Serial issue on SC20-E

I hope you are in good health,

related to serial on SC20 module, I have a problem when writing raw data to ttyHLS. the function return -1 and the errorno is 11 EAGAIN. error does’t appear always, because somthing I ran the application for 1 hour and it’s working fine.
I am writing to serial port every 1 second about 49 bytes.


  • android version is 7.1.2.
  • permission is ok.
  • my application uses a forground service and every thing is good.

serial port setting are:

fd=open(deviceName,O_RDWR|O_NONBLOCK|O_NOCTTY );

/***********************************uartWrite **************************************/
int uartWrite(char *send_buf,int data_len,int fd)
int len = 0;
LOGW(“send_buf: %s”,send_buf);
len = write(fd,send_buf,data_len);
if (len!=data_len )
LOGW("<<<>>>>has send data %d, but not equal %d",len,data_len);
perror("W err ") ;
LOGI(“uartWrite: %d”,errno);
LOGW(“send data to uart: %d, fd is %d”,len,fd);
return len;

thanks for you in advanced.
Best wishes

Hi,which /dev/ttyHSL you use?

hi, ttyHSL1,

another note: sometimes when I check the TX pin , I see no data on oscillscpoe, however, the write function returns 49 bytes!!

hi,try to instead of O_NBLOCK flag with O_NDELAY in open fuction.
Can you see RX data on oscillscpoe when write uart?

Hi, Rooney
I test it but I have the same problem,
Nothing on RX data.
Is there any flags to get instead of erron ?!!

EAGANIN error meading uart write buffer is full.How you define data_len’s size? strlen(send_buf)?

it’s the buffer size 49 bytes.!!

pls dear check this pics, because this issue occurs first then the write function return -1.


Good morning @Rooney
any update pls
thanks in advance.

There might be no wait in the driver, so if interupt occurs or buffer is full or empty there might return abormal. Change program code as:

goto again;

write() or send()

Hi sofian,
I’m new to SC20-E and i designed my custom board according to hardware design guide document and followed all the design tips.
The problem is when i power on the module,nothing is displayed on the LCD( LCD type: wf50dtya3mnno ).after about 40 second, the LCD display several horizontal lines.and it turns off after a short time.

I tried to communicate with the module through USB interface but my PC didn’t recognize the module.

  1. Is the LCD type compatible with the module?
    2.Where can i download necessary drivers for communicate with the module?