3

My GSM modem is attached to ttyUSB2 port but I am not able to access the port for AT commands. When I try to access it I get an error as below:

$ sudo minicom
Device /dev/ttyUSB2 is locked.
Zanna
  • 72,471
srg
  • 123

2 Answers2

4

Do ps -ef and see if there is any minicom -s process running.

If there is then kill that process with kill -9 pid where pid is the PID number given in the output of ps -ef. It will solve your problem.

Zanna
  • 72,471
1

Read man minicom. It says. in part:

     B - Lock file location
          On most systems This should be /usr/spool/uucp. GNU/Linux systems use /var/lock. If
          this directory does not exist, minicom will not attempt to use lockfiles.

So, look for lock files in /var/lock or /usr/spool/uucp

  • /var/lock directory exists already and it has following files- .asound.state.lock LCK..ttyUSB2 ntpdate subsys whoopsie – srg Jan 23 '20 at 06:49
  • Adding information in comments is discouraged. It prevents proper formatting, and hides the new info from people and computers that just read questions. Please Edit your question to add information, properly formatted with the {} tool. – waltinator Jan 24 '20 at 02:45