atefsaeed2010 / datacard

Automatically exported from code.google.com/p/datacard
Other
0 stars 1 forks source link

detection problem #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
in case datacard crashed and the ttyUSB is not free anymore we might have this 
case:
[ 2091.571064] option 1-5.4:1.0: GSM modem (1-port) converter detected
[ 2091.571303] usb 1-5.4: GSM modem (1-port) converter now attached to ttyUSB3
[ 2091.574326] option 1-5.4:1.1: GSM modem (1-port) converter detected
[ 2091.574540] usb 1-5.4: GSM modem (1-port) converter now attached to ttyUSB5
[ 2091.581986] option 1-5.4:1.2: GSM modem (1-port) converter detected
[ 2091.582195] usb 1-5.4: GSM modem (1-port) converter now attached to ttyUSB21
, then the datacard detection (config using imsi or imei of the datacard) fails

Original issue reported on code.google.com by florin.m...@gmail.com on 1 Feb 2011 at 5:44

GoogleCodeExporter commented 9 years ago
I use five modems with two hubs 4+4ports= 3+2 modems
My problem is with using hub-ctrl. Asterisk go to stupor after powers switch 
off and then on. I have settings modems by IMSI=xxxxxxxxxxxxxxx

Original comment by ipetrova...@gmail.com on 5 Feb 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Explain whats going in  details, please

Original comment by bg_...@mail.ru on 5 Feb 2011 at 7:13

GoogleCodeExporter commented 9 years ago
First 4-port HUB...

lsusb -v -s 002:072 | sed -n '/Hub Port Status/,+7p'

Hub Port Status: Port 1: 0000.0503 highspeed power enable connect Port 2: 0000.0503 highspeed power enable connect Port 3: 0000.0503 highspeed power enable connect Port 4: 0000.0503 highspeed power enable connect

Second 7-port HUB into first HUB plug-in...

# lsusb -v -s 002:078 | sed -n '/Hub Port Status/,+7p'
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
   Port 4: 0000.0503 highspeed power enable connect
   Port 5: 0000.0100 power
   Port 6: 0000.0503 highspeed power enable connect
   Port 7: 0000.0100 power

Switch power off then power on at First HUB...

./hub-ctrl -b 002 -d 072 -P 1 -p 0

./hub-ctrl -b 002 -d 072 -P 2 -p 0

./hub-ctrl -b 002 -d 072 -P 3 -p 0

./hub-ctrl -b 002 -d 072 -P 4 -p 0

./hub-ctrl -b 002 -d 072 -P 1 -p 1

./hub-ctrl -b 002 -d 072 -P 2 -p 1

./hub-ctrl -b 002 -d 072 -P 3 -p 1

./hub-ctrl -b 002 -d 072 -P 4 -p 1

Now Asterisk not attend on console commands. Killall -9 - got in help :)


Original comment by `ipetrova...@gmail.com` on 5 Feb 2011 at 11:36
GoogleCodeExporter commented 9 years ago
CLI> datacard stop now <device> 
before poweroff 

CLI> datacard start <device>
after poweron

Original comment by bg_...@mail.ru on 5 Feb 2011 at 6:48

GoogleCodeExporter commented 9 years ago
No method. In case not hand down-up who will process stop and start? :)

Original comment by ipetrova...@gmail.com on 6 Feb 2011 at 12:50

GoogleCodeExporter commented 9 years ago
who run hub-ctrl  ? 

asterisk -rx 'datacard stop now <device>'

also manager DatacardStop/DatacardStart commands

Original comment by bg_...@mail.ru on 6 Feb 2011 at 6:21

GoogleCodeExporter commented 9 years ago
No method. In case not hand AND NOT BY HUB-CTRL down-up who will process stop 
and start? :)

Original comment by ipetrova...@gmail.com on 6 Feb 2011 at 11:31

GoogleCodeExporter commented 9 years ago
who runs the  hub-ctrl: guy, girl, watchdog script or holy spirit ?

its easy to run asterisk -rx 'datacard stop now <device>'
BEFORE turn off power on device or not for you?

Original comment by bg_...@mail.ru on 6 Feb 2011 at 3:33

GoogleCodeExporter commented 9 years ago
holy spirit

Original comment by ipetrova...@gmail.com on 6 Feb 2011 at 9:49

GoogleCodeExporter commented 9 years ago
With r184 in this case asterisk make all PC freezing. :(
r183 was stop responding only Asterisk task.

Original comment by ipetrova...@gmail.com on 6 Feb 2011 at 10:33

GoogleCodeExporter commented 9 years ago
Пойми, программа, которая способна 
повесить процесс или систему целиком не 
имеет право запускаться на сервере. 
Поэтому прошу за честь решить этот трабл. 
Какие логи нужно предоставить, чтобы это 
помогло разобраться?

Original comment by ipetrova...@gmail.com on 6 Feb 2011 at 10:37

GoogleCodeExporter commented 9 years ago
workarounds:

a) not run asterisk with realtime highpriority = yes (-p)
b) not use discovery
c) stop/start device

Original comment by bg_...@mail.ru on 7 Feb 2011 at 3:25

GoogleCodeExporter commented 9 years ago
at last 
d) not use this chan_datacard at all 

if really hard for you stop device usage before power off.

Original comment by bg_...@mail.ru on 7 Feb 2011 at 3:43

GoogleCodeExporter commented 9 years ago
Тогда убирай discovery из кода

Original comment by ipetrova...@gmail.com on 7 Feb 2011 at 2:22

GoogleCodeExporter commented 9 years ago
I try apply to users with respect.
Because their opinions and complaints are part of the normal and proper 
software development process.
I respond to requests no later than one day, including Saturdays and Sundays.

In this case, I ask you again to read the contents of this file
http://code.google.com/p/datacard/source/browse/trunk/LICENSE.txt#260

This means you are free to use or not this free product, and if you decide to 
use it the responsibility lies on you.
If you are not satisfied with the product for whatever reason(s), you are free 
to use any other software.

Using third party software for the modem simultaneously with chan_datacard can 
lead to unpredictable results.

No one can guarantee correct behaviour of software, in case of misuse, neither 
Microsoft nor Google nor the Lord Almighty.
Or do you yank out the plug of your computer without shutdown?

The fact that the device must be free before power off sufficiently clear and 
obvious. And you are offered a workable solution. Necessary commands have been 
added by me in advance, before discovery. Have you tried this solution?

I reject your request to remove discovery part of the code, because its useful 
and works well when used correctly.

WBR,
  Vitaly

Original comment by bg_...@mail.ru on 7 Feb 2011 at 9:14

GoogleCodeExporter commented 9 years ago
О, тут по русски говорят!
У меня проблема которая вписывается в тему 
"detection problem"
20 шт Huawei E1550 вставлены в 4 хаба D-Link DUB-H7.
Сначала сделал определение поиском по IMSI. 
В принципе нормально работало но изредка 
модемы терялись. 
Решил перейти на определение по портам.
Прописал в udev постоянные алиасы и 
использовал их в datacard.conf
Заработало лучше но иногда происходит 
такой глюк.
Абонент отпадает, datacard show devices показывает 
состояние Not connected.
Чтобы вернуть модем на место приходится 
делать module reload chan_datacard.so
Но это сносит со связи остальных абонентов.
Попробовал получить повторяемость 
результата.
Вынимаю модем.
Получаю сообщение о том что datacard10 disconnected.
В /var/log/messages соответствующее сообщение.
Вставляю модм на место.
В /var/log/messages сообщение о том что все 
появилось.
В /dev алиас появляется.
А chan_datacard не ищет этот модем пока я его не 
перезапущу через module reload chan_datacard.so в 
консоли хотя в настройках стоит параметр 
искать каждые 15 сек (пробовал уменьшать до 5 
сек - результат тот же)
Из-за чего это может быть?

Original comment by solarwin...@yahoo.com on 7 Apr 2011 at 9:13

GoogleCodeExporter commented 9 years ago
discovery use direct device files and ignore udev symlinks.

Original comment by bg_...@mail.ru on 7 Apr 2011 at 9:19

GoogleCodeExporter commented 9 years ago
Плохо. 
Ведь как я понимаю фиксированные ttyUSB мне не 
через настройки udev не удастся сделать?
Как же тогда можно сделать периодический 
поиск устройств?
Опять на определение по IMSI (неустойчиво 
работающее в моем случае) возвращаться?

Original comment by solarwin...@yahoo.com on 7 Apr 2011 at 9:48

GoogleCodeExporter commented 9 years ago
IMSI available only after SIM readed, which can delayed
IMEI available after modem appears in host system

fixed names of device file (or links) unpossible die to 
nature of udev...

for example if replug modem old files may be still found because 
still opened some time

this chan_datacard searching for not connected modems after delay defined in 
[general] interval=15 setting.

i think 5 seconds is very small and can cause service not available problem

you can enable debug output for show messages from discovery process

Original comment by bg_...@mail.ru on 7 Apr 2011 at 1:16