Solved

Cannot unlock device /dev/ttyS0

Posted on 2013-01-29
7
1,314 Views
Last Modified: 2013-03-07
I am using Gnokii to send alert that is done through a Mobile phone connected to the Linux server through USB cable, and I used “port = /dev/ttyS0” under gnokii setting.

It work for some time and stops with showing below error message

[root@monitor#] gnokii --identify
GNOKII Version 0.6.19
Telephone interface init failed: Command timed out.
Quitting.
Cannot unlock device.
Command timed out.


to make this work again, server has to restart or disconnect and connect Nokia phone again

Do you know what does this error means, and how to solve?

this is really an argent matter.

thanks
0
Comment
Question by:uknet80
  • 4
  • 2
7 Comments
 
LVL 11

Assisted Solution

by:un1x86
un1x86 earned 166 total points
ID: 38833909
Hi

What does your messages log file tell you when you connect your device? /var/log/messages. Also it would be good to know what Linux you are using.
0
 

Author Comment

by:uknet80
ID: 38833964
Log file doesn't show any thing, after it crush, I will even double check that for you.
But dmesg shows this:

cdc_acm 4-2:1.1: ttyACM0: USB ACM device

After I restarted the server it works and i get following message from "gnokii --identify"
[root@monitor ~]# gnokii --identify
GNOKII Version 0.6.19
IMEI         : 352042021632084
Manufacturer : Nokia
Model        : Nokia 6300
Product name : Nokia 6300
Revision     : V 05.50


After an hour it will crash and the message mentioned earlier appear.

Gnokii Setting:
[global]
#port = /dev/ttyS0
port = /dev/ttyACM0
model = AT
initlength = default
connection = serial
use_locking = no
serial_baudrate = 19200
smsc_timeout = 10
allow_breakage = 0
[gnokiid]
bindir = /usr/local/sbin/
[connect_script]
TELEPHONE = 12345678
[disconnect_script]
[logging]
debug = off
rlpdebug = off
xdebug = off



The version I am using is:
Linux is: RHEL5.7
Gnokii Version: GNOKII Version 0.6.19
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 334 total points
ID: 38846087
Note you are using /dev/ttyACM0 rather than /dev/ttyS0. This USB serial port may disappear if the USB connection is broken at which point it can be difficult for an application to unlock it.
You really need to increase logging so you can see what the USB device does. You could start by turning it on in your config above.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:uknet80
ID: 38878985
can you please explain to me what I need to do, I didn't understand:

You really need to increase logging so you can see what the USB device does. You could start by turning it on in your config above.
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 334 total points
ID: 38879302
In your Gnokii Setting you have debug = off and I was suggesting you change that to debug = on.
Do you have the file /etc/syslog.conf? If you do, I strongly recommend you add the following lines to it
# Everything is logged here.
*.debug                                         -/var/log/debug

Open in new window

Remove any existing lines referring to /var/log/debug. After you do that, and issue the command pkill -HUP syslogd to get the file re-read, you will see in all USB connect and disconnect activity in /var/log/debug.
If you don't have /etc/syslog.conf then your system uses some other logging program which I can't help you with. Hopefully you can work out what to do.
0
 

Author Comment

by:uknet80
ID: 38960936
I've requested that this question be closed as follows:

Accepted answer: 0 points for uknet80's comment #a38878985
Assisted answer: 167 points for un1x86's comment #a38833909
Assisted answer: 167 points for duncan_roe's comment #a38846087
Assisted answer: 166 points for duncan_roe's comment #a38879302

for the following reason:

thanks for your continues supports
0
 

Author Closing Comment

by:uknet80
ID: 38960937
thanks for your support.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now