Solved

Cannot unlock device /dev/ttyS0

Posted on 2013-01-29
7
1,336 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AD LDAP LDS 3 68
Which is more secure: EAP or machine certificate for IKEv2 VPN? 1 92
How to update  and reset admin password for Linux 5 55
awk sed 8 46
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 …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

832 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