Serial Port communication issue

Hi Team,

We are using Quectel LTE module with NVIDIA jestson NX. This module is connected to the USB interface with Nvidia. And we send AT commands to the ttyUSB2 interface.
When we are sending commands through minicom then it is working fine and giving proper response.
But when we are opening the file using (cat /dev/ttyUSB2 &) and then sending commands to it for example (echo -e “at+cgsn\r” > /dev/ttyUSB2) then it is misbehaving and showing error (some random garbage values). Similar issue is coming when we are using C code for the same and we are unable to resolve it after trying many things.

Kindly help us resolving this issue. I am attaching the code file for your reference.at.c (4.7 KB)

Hi,
Since we don’t have the device, so would like to have more information.

  1. The LTE modules is connect to USB Type-A port on Xavier NX developer kit?
  2. Xavier NX works in USB host mode and the LTE module in device mode?
  3. Please share release version( $ head -1 /etc/nv_tegra_release ) and the device information( $ lsusb -v )