Legato/Linux-init /dev/ttyAT availability issue

Hello there,

I am using Linux and Legato R12 for wp76xx.

I have seen an odd issue when writing to /dev/ttyAT via the Linux init scripts.
ttyAT always exists when my init script (at S20 or S99) redirects the usual commands to /dev/tty
e.g. echo "AT!CUSTOM?" > /dev/tty
But occasionally I would get odd errors:

  • cat: can't open '/dev/ttyAT': Resource temporarily unavailable or
  • can't create /dev/ttyAT: Resource temporarily unavailable or
  • can't create /dev/ttyAT: No such device etc.

There were never lock file errors reported. Interestingly in the Legato firmware src/CellularNetwork.cpp /dev/ttyAT is accessed by CellularNetwork::setAMSConfig()

Legato firmware is started by init script S32startlegato.sh.

So my questions are:

  • Can /dev/ttyAT be guaranteed to be accessible by the Linux init scripts - somehow ?
  • If not/regardless is accessing /dev/ttyAT by the legato firmware to only recommended way ?

Best Regards,

Hi Ian,

It may related to the boot sequence, can you try put it at the end of S99?

Or you may use Legato atService to send from your Legato app with error handling.


Hello Lotam,

Thanks for your reply. Yes I have already tried putting the script at S99 and the issue still happened.

It does look like using the Legato atService is the way to go.

Best Regards,