EG915U - How to send "Hello World" to USB Serial ports?

EG915U, version EG915UEUABR03A05M08_OCPU:
Hello guys.
1 - I’m struggling with the example “uart_demo.c” trying to capture and send some data (like “Hello World”) to any USB serial port like QL_USB_PORT_AT, QL_USB_PORT_MODEM or QL_USB_PORT_NMEA, without success. These ports seems already open and being used by “quec_at_engine” or other process to parse AT commands. I’m wondering if it is feasible to use the “uart_demo.c” example with these USB serial ports?
2 - I noted that the example “app_img_at_demo.c” is able to intercep AT commands on “Quectel Modem” USB port. Can I use the function “quec_atCmdRespInfoNText” to send custom data to this USB port? Or there is another function to do that? Is there some documentation about the functions like “quec_app_at_add”, “quec_atCmdResp”, “quec_atCmdRespInfoNText”?

Okay, I have a possible answer by myself.
QL_USB_PORT_AT and QL_USB_PORT_MODEM appear to be opened automatically when the module starts up. Probably these ports are used by some internal “quec_at_engine” to parse AT commands. So, I believe that it is not possible to create a callback function with “ql_uart_register_cb” to receive raw data from these ports. I found a possible solution to receive and send data:

  • To receive data, use the function “quec_app_at_add” to create a custom AT command. The data is placed as parameters of the AT command.
  • To send unsolicited data to the serial port, use the function “ql_uart_write()”, indicating QL_USB_PORT_AT or QL_USB_PORT_MODEM. It is not necessary to configure or open the port with “ql_uart_set_dcbconfig” or “ql_uart_open” because the port is already opened and configured.

Hi @odilonf,
Actually you don’t need to create a custom AT command.
To send stuff over USB serial ports, you can just open it by ql_uart_open(QL_USB_PORT_AT); it will automatically take over the AT engine. And yes, you don’t need to set dcbconfig.
Be aware that doing this would disable the AT functionality of this port. If you still want AT functional you can stick to your workaround.