SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sat May 25, 2024 10:47
SMSTools3 Community » Help and support Bottom

[solved] USB modem problem

  This topic is locked

Page:  1

Author Post
Member
Registered:
Nov 2010
Location: Warsaw, Poland
Operating system name and version: OpenBSD 4.8
Version of smsd: 3.1.11
Smsd installed from: ports
Name and model of a modem / phone: Nokia Datacard
Interface: USB

Hello,

I have a problem with connection to a modem.
First time when I've run the SMSTools, It was working OK. But after one day, I've decided to change the path to the log file. And then errors occured.
After reinstalling SMSTools with defaults settings (log file etc.) problem is still the same.

Error from smsd.log:


smsd.conf:

# $OpenBSD: smsd.conf.openbsd,v 1.3 2010/06/30 16:45:27 sthen Exp $
# See /usr/local/share/doc/smstools/configure.html for more details

devices = GSM1
#devices = GSM1, GSM2
loglevel = 7

# After initial setup this might be a good option; notices by default,
# but debug logging is buffered and stored to another file after an error.
#loglevel = 5
#smart_logging = yes

# setuid() to this user:
user = _smsd
# it's possible to setgid too, but default is the set of
# groups from /etc/groups

pidfile = /var/run/smsd/smsd.pid
infofile = /var/run/smsd/smsd.info

#logfile = syslog
logfile = /var/log/smsd/smsd.log

[GSM1]
# A sample USB device with typical broken rtscts, so use
# a send delay to reduce the risk of overruns. Some PC cards
# also break rts/cts. On some 3G cards you might be able to
# use the control device for SMS simultaneously with using
# the data device for a PPP connection.
# For this one I have set incoming=no so it doesn't pull
# the existing messages off the phone.
device = /dev/usb0
incoming = no
rtscts = no
send_delay = 20
# smsc = +447958879879  # some devices need the smsc to be explicitly set
# memory_start = 0      # defaults to 1; some devices start their index at 0
# init = ATE0           # /usr/local/share/doc/smstools/hardwarecomp.html
# pin = 1111            # pin normally used only with data cards, not phones

[GSM2]
#device = /dev/cua00
#incoming = yes
 
 
'smsdconf' Syntax Highlight powered by GeSHi


And I don't know where is the problem because before it was workig fine.
The Nokia Datacard USB modem works at Windows.

Thanks for help.

Arenio

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Who owns the serial port and what are the privileges? ls -l /dev/usb0 ? As you get "permission denied" from the OS, you may have something wrong in the group settings.

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
I don't think so in order it's with privileges problem. I've changed _smsd user to root in smsd.conf .

ls -l /dev/usb0:


smsd.log:


I have old log file when SMSTools worked fine.


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think that the "permission denied" issue was clear, but now when you run the daemon as root:wheel, there is another problem. Perhaps something is broken, or you have updated some parts of the OS. I cannot check OpenBSD right now, and my server anyways is 4.5, not 4.8.

You could try if the modem setting send_handshake_select = no makes any difference. But I do not expect that it does. Probably this is a *BSD specific issue.

I will try to check this issue more within about after the next 12+ hours...

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
I didn't make any OS updates. I've tried with no handshake and the result is below.


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Now you had the setting rtscts = no removed, or changed to rtscts = yes. As your hardware fails with handshaking, continue without it (= use rtscts = no).

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
I always have rtscts = no even during the last my conf with handshake set to no.

Problem is still the same:
Cannot open serial port /dev/usb0, error: Permission denied
or
GSM1: Checking if modem is ready
GSM1: -> AT
GSM1: write_to_modem: error 19: Operation not supported by device
or
GSM1: Checking if modem is ready
GSM1: -> AT
GSM1: Modem is not clear to send

Why it doesn't work?
Answer is difficult because it worked before errors occurs and I don't know why it doesn't work now :?
I run smsd deamon as _smd user with no errors before, strange.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Arenio wrote
Why it doesn't work?
Answer is difficult because it worked before errors occurs and I don't know why it doesn't work now :?

I agree that ;). Answer is difficult because I cannot know what changes was made to the system...

In your old log smsd was running successfully as _smsd:_smsd. It is not known what were the permissions of the serial port, but it worked.

Later it did not work. The port had crw-rw---- root:wheel, which means that at that time _smsd did not belong to the wheel group. It is also possible that previously the port had different permissions, like crw-rw-rw, but I cannot know what it actually had.

Is the _smsd currently in the wheel group?

Arenio wrote
I always have rtscts = no even during the last my conf with handshake set to no.

Have you ensured that your are editing the correct smsd.conf file? After you changed the path to the log file, you got first errors. Did you change something else at the same time? Anywhere?

The message "Modem is not clear to send" is possible only when rtscts is used. If you surely have rtscts = no in your configuration (for the correct modem), you do not get that message. Also with send_handshake_select you got error 19, which likely means the same, hardware handshaking has been in use and does not work properly.

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
I didn't change any permissions for /dev/usb0 and only at smd.conf file the device and the log file I changed.
_smd is not in the wheel group.

I'm sure that I didn't change anything except device and log file entries.

I've restarted the server, reinstalled the SMSTools and the problem still exists :?
I suppose that for some reason the device is busy or something like that and SMSTools cannot get the access to the device.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Arenio wrote
I didn't change any permissions for /dev/usb0 and only at smd.conf file the device and the log file I changed.
_smd is not in the wheel group.

I'm sure that I didn't change anything except device and log file entries.

Can you remember what were the permissions of the previous port? As you do not have _smsd in the wheel group, the issue is clear: _smsd cannot access the port when it has current permissions and is owned by root:wheel. Just fix the permissions and try again.

Arenio wrote
I've restarted the server, reinstalled the SMSTools and the problem still exists :?

Probably in the past you have changed the permissions of the port manually, but after restarting the server those permissions do not stay. You need some init-script to set permissions in the start, or use the correct group settings.

Arenio wrote
I suppose that for some reason the device is busy or something like that and SMSTools cannot get the access to the device.

"Device is busy" and "cannot access" are different issues. With correct group settings _smsd can access the port and it can be opened.

What I was trying to say in the previous post was that smsd will say "Modem is not clear to send" only if the bit tio.c_cflag & CRTSCTS is set. And this bit is not set if the setting rtscts = no is used in the configuration. If you still get this error, you have incorrect configuration, or if it surely is correct, some other reason in your server changes the handshake bit. However it is hard to believe that something outside the smsd changes the bit. You should double-check your configuration at this point.

You could also try to move back to the previous port which was working. What anyway was the reason for change, while the port was working and you were planning only to change the location of log file? Generally taken single change at a time is a good idea. Also the working configuration could be stored, at least by nightly backup, or manually if backups are not done.

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
I decided to completely uninstall SMSTools and install from the beginning. I deleted all SMSTools files etc.
Then I installed again. See the following terminal commands and outputs.
In smsd.conf I only changed device as /dev/usb0 .



Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
In OpenBSD /dev/cuaU0 is the first USB port. Try with it and put _smsd to 'dialer' group as the instruction says.

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
Great :D
It works. I changed device as /dev/cuaU0 :mrgreen:
So there was the problem.

Thanks for help.

Arenio

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Just for curiosity, why did you anyways change the device setting while you had a working setup before the change... ? :roll:

You could now try with some changes in the smsd.conf:
remove rtscts = no and send_delay = 20.

If your modem works properly with handshaking, it's better to use it. If it does not work, just use those settings.

Member
Registered:
Nov 2010
Location: Warsaw, Poland
Topic owner
Really, I don't remember that I was changing device entry and why :?
I was sure that /dev/usb0 is ok.

I've removed rtscts and send_delay and it works.
Thanks.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.