Solved

Cannot unlock device /dev/ttyS0

Posted on 2013-01-29
7
1,363 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 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