Solved

Cannot unlock device /dev/ttyS0

Posted on 2013-01-29
7
1,357 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

828 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