Re: Portech MV-37x patch

Ariel Wainer <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
On 12/11/14 12:23, Stipe Tolj wrote:
>
> Hi Ariel,
>
> thanks a lot for your contribution, it is highly welcome.
>
> Before considering to commit this into SVN trunk, can you please
> provide any more details why the extra-login is required, i.e. via a
> AT command set trace happening in the bearerbox.log running in DEBUG
> log-level.
>
> We're not in favor to constantly add more config directives for
> "special cases", that's why I'd like to see if there is a semantical
> way to avoid this.
>
I Understand. These gateways, are actually voip-gsm gateways, that allow
the user to access the modem directly via telnet.
The extra commands required are for authenticatiing and selecting the
modem. MV-37X has X modems, where X can be 2,4,6,8,16 or 32. I attached
the output of bearerbox opening both modems on my MV-372. You can see
that Kannel sends an AT command before completing the login (lines 80
and 82 of the log) and the gateway returns an error because the login
process is not yet complete and therefor the terminal is not yet
attached to a modem (that happens in 89/90).

The configuration used to produce this log:
########
group = smsc
  smsc = at
  smsc-id = pt0
  modemtype = portechm
  device = rawtcp
  speed = 115200
  host = "192.168.200.47"
  port = 23
  smsc-username = voip
  smsc-password = 1234
  login-prompt = username:
  password-prompt = password:
  extra-login = module1
  extra-login-prompt = "command: logout, module, module1, module2,
state1, state2."
  extra-login-ok = "got!! press 'ctrl-x' to release module 1."
  keepalive = 20

group = smsc
  smsc = at
  smsc-id = pt1
  modemtype = portechm
  device = rawtcp
  speed = 115200
  host = "192.168.200.47"
  port = 23
  smsc-username = voip
  smsc-password = 1234
  login-prompt = username:
  password-prompt = password:
  extra-login = module2
  extra-login-prompt = "command: logout, module, module1, module2,
state1, state2."
  extra-login-ok = "got!! press 'ctrl-x' to release module 1."
  keepalive = 20

group = modems
id = portechm
name = "Portech"
no-pin = true
########

> BTW, I couldn't find any reference about Raivis original patchset. Can
> you please point me to this?
>
> Stipe
>

Here it is: http://www.kannel.org/pipermail/users/2010-March/010310.html

-- 
Ariel Wainer
Contenta Mobile
beaderbox-debug.log (text/x-log, 10 KB)
2014-11-12 12:55:08 [3490] [0] INFO: Debug_lvl = -1, log_file = <none>, log_lvl = 0
2014-11-12 12:55:08 [3490] [0] WARNING: DLR: using default 'internal' for storage type.
2014-11-12 12:55:08 [3490] [0] INFO: DLR using storage type: internal
2014-11-12 12:55:08 [3490] [0] DEBUG: Kannel bearerbox version `1.4.4'.
Build `Nov 11 2014 11:31:31', compiler `4.7.2'.
System Linux, release 3.2.0-4-686-pae, version #1 SMP Debian 3.2.57-3, machine i686.
Hostname cringer.3kh.net, IP 186.153.145.242.
Libxml version 2.8.0.
Using OpenSSL 1.0.1e 11 Feb 2013.
Using native malloc.

2014-11-12 12:55:08 [3490] [0] INFO: Added logfile `/var/log/kannel/kannel.log' with level `3'.
2014-11-12 12:55:08 [3490] [0] INFO: HTTP: Opening server at port 13000.
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2014-11-12 12:55:08 [3490] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to pid 3490.
2014-11-12 12:55:08 [3490] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread) maps to pid 3490.
2014-11-12 12:55:08 [3490] [2] DEBUG: HTTP: Including port 13000, fd 9 for polling in server thread
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 2 (gwlib/http.c:server_thread)
2014-11-12 12:55:08 [3490] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) maps to pid 3490.
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 3 (gw/bb_http.c:httpadmin_run)
2014-11-12 12:55:08 [3490] [0] DEBUG: starting smsbox connection module
2014-11-12 12:55:08 [3490] [0] INFO: BOXC: 'smsbox-max-pending' not set, using default (100).
2014-11-12 12:55:08 [3490] [0] DEBUG: Adding smsbox routing to id <smsbox> for smsc id <at>
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 4 (gw/bb_boxc.c:sms_to_smsboxes)
2014-11-12 12:55:08 [3490] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) maps to pid 3490.
2014-11-12 12:55:08 [3490] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps to pid 3490.
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 5 (gw/bb_boxc.c:smsboxc_run)
2014-11-12 12:55:08 [3490] [0] INFO: Set SMS resend frequency to 60 seconds.
2014-11-12 12:55:08 [3490] [0] INFO: SMS resend retry set to unlimited.
2014-11-12 12:55:08 [3490] [0] DEBUG: MO concatenated message handling enabled
2014-11-12 12:55:08 [3490] [0] INFO: DLR rerouting for smsc id <pt0> disabled.
2014-11-12 12:55:08 [3490] [0] INFO: AT2[pt0]: configuration shows modemtype <portechm>
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt0]: Reading modem definitions from </etc/kannel/kannel.conf>
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt0]: Found <1> modems in config
2014-11-12 12:55:08 [3490] [0] INFO: AT2[pt0]: read modem definition for <Portech>
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 6 (gw/smsc/smsc_at.c:at2_device_thread)
2014-11-12 12:55:08 [3490] [6] DEBUG: Thread 6 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 3490.
2014-11-12 12:55:08 [3490] [6] INFO: AT2[pt0]: opening device
2014-11-12 12:55:08 [3490] [6] DEBUG: Connecting to <192.168.200.47>
2014-11-12 12:55:08 [3490] [0] INFO: DLR rerouting for smsc id <pt1> disabled.
2014-11-12 12:55:08 [3490] [0] INFO: AT2[pt1]: configuration shows modemtype <portechm>
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt1]: Reading modem definitions from </etc/kannel/kannel.conf>
2014-11-12 12:55:08 [3490] [6] DEBUG: AT2[pt0]: device opened. Telnet mode = 0
2014-11-12 12:55:08 [3490] [6] INFO: AT2[pt0]: Logging in
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt1]: Found <1> modems in config
2014-11-12 12:55:08 [3490] [0] INFO: AT2[pt1]: read modem definition for <Portech>
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 7 (gw/smsc/smsc_at.c:at2_device_thread)
2014-11-12 12:55:08 [3490] [7] DEBUG: Thread 7 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 3490.
2014-11-12 12:55:08 [3490] [7] INFO: AT2[pt1]: opening device
2014-11-12 12:55:08 [3490] [0] DEBUG: Started thread 8 (gw/bb_smscconn.c:sms_router)
2014-11-12 12:55:08 [3490] [8] DEBUG: Thread 8 (gw/bb_smscconn.c:sms_router) maps to pid 3490.
2014-11-12 12:55:08 [3490] [0] INFO: ----------------------------------------
2014-11-12 12:55:08 [3490] [0] INFO: Kannel bearerbox II version 1.4.4 starting
2014-11-12 12:55:08 [3490] [7] DEBUG: Connecting to <192.168.200.47>
2014-11-12 12:55:08 [3490] [7] DEBUG: AT2[pt1]: device opened. Telnet mode = 0
2014-11-12 12:55:08 [3490] [7] INFO: AT2[pt1]: Logging in
2014-11-12 12:55:08 [3490] [0] INFO: Loaded 0 messages from store.
2014-11-12 12:55:08 [3490] [0] INFO: MAIN: Start-up done, entering mainloop
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt0]: start called
2014-11-12 12:55:08 [3490] [0] DEBUG: AT2[pt1]: start called
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <--
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <-- >
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: --> voip^M
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <--
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <-- >
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: --> voip^M
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <-- sername: voip>
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: --> 1234^M
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <-- sername: voip>
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: --> 1234^M
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <-- password: ****
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <-- user level = admin.
2014-11-12 12:55:09 [3490] [6] DEBUG: AT2[pt0]: <-- command: logout, module1, module2, state1, state2, info.
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <-- password: ****
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <-- user level = admin.
2014-11-12 12:55:09 [3490] [7] DEBUG: AT2[pt1]: <-- command: logout, module1, module2, state1, state2, info.
2014-11-12 12:55:13 [3490] [6] DEBUG: AT2[pt0]: --> AT^M
2014-11-12 12:55:13 [3490] [7] DEBUG: AT2[pt1]: --> AT^M
2014-11-12 12:55:13 [3490] [6] DEBUG: AT2[pt0]: <-- ]AT
2014-11-12 12:55:13 [3490] [6] DEBUG: AT2[pt0]: <-- bad command!!!
2014-11-12 12:55:13 [3490] [7] DEBUG: AT2[pt1]: <-- ]AT
2014-11-12 12:55:13 [3490] [7] DEBUG: AT2[pt1]: <-- bad command!!!
2014-11-12 12:55:37 [3490] [6] DEBUG: AT2[pt0]: --> module1^M
2014-11-12 12:55:37 [3490] [7] DEBUG: AT2[pt1]: --> module2^M
2014-11-12 12:55:37 [3490] [6] DEBUG: AT2[pt0]: <-- ]module1
2014-11-12 12:55:37 [3490] [6] DEBUG: AT2[pt0]: <-- getting module 1 ...
2014-11-12 12:55:37 [3490] [7] DEBUG: AT2[pt1]: <-- ]module2
2014-11-12 12:55:37 [3490] [7] DEBUG: AT2[pt1]: <-- getting module 2 ...
2014-11-12 12:55:37 [3490] [7] DEBUG: AT2[pt1]: <-- got!! press 'ctrl-x' to release module 2.
2014-11-12 12:55:37 [3490] [6] DEBUG: AT2[pt0]: <-- got!! press 'ctrl-x' to release module 1.
2014-11-12 12:55:57 [3490] [7] DEBUG: AT2[pt1]: --> AT^M
2014-11-12 12:55:57 [3490] [6] DEBUG: AT2[pt0]: --> AT^M
2014-11-12 12:55:57 [3490] [7] DEBUG: AT2[pt1]: <-- 0
2014-11-12 12:55:57 [3490] [6] DEBUG: AT2[pt0]: <-- 0
2014-11-12 12:56:01 [3490] [7] INFO: AT2[pt1]: init device
2014-11-12 12:56:01 [3490] [6] INFO: AT2[pt0]: init device
2014-11-12 12:56:01 [3490] [7] DEBUG: AT2[pt1]: --> ATZ^M
2014-11-12 12:56:02 [3490] [6] DEBUG: AT2[pt0]: --> ATZ^M
2014-11-12 12:56:02 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:02 [3490] [7] DEBUG: AT2[pt1]: --> AT^M
2014-11-12 12:56:02 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:02 [3490] [6] DEBUG: AT2[pt0]: --> AT^M
2014-11-12 12:56:08 [3490] [7] ERROR: AT2[pt1]: Wrong or no answer to AT. Trying again
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: --> AT^M
2014-11-12 12:56:08 [3490] [6] ERROR: AT2[pt0]: Wrong or no answer to AT. Trying again
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: --> AT^M
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: <-- AT
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: --> AT&F^M
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: <-- AT
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: --> AT&F^M
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: <-- AT&F
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:08 [3490] [7] DEBUG: AT2[pt1]: --> ATE0^M
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: <-- AT&F
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:08 [3490] [6] DEBUG: AT2[pt0]: --> ATE0^M
2014-11-12 12:56:14 [3490] [7] ERROR: AT2[pt1]: Wrong or no answer to ATE0. Trying again
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: --> ATE0^M
2014-11-12 12:56:14 [3490] [6] ERROR: AT2[pt0]: Wrong or no answer to ATE0. Trying again
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: --> ATE0^M
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: <-- ATE0
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: --> AT+IFC=2,2^M
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: <-- ATE0
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: --> AT+IFC=2,2^M
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:14 [3490] [7] DEBUG: AT2[pt1]: --> AT+CMGF=0^M
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:14 [3490] [6] DEBUG: AT2[pt0]: --> AT+CMGF=0^M
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: --> AT+CSMS=?^M
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: --> AT+CSMS=?^M
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: <-- +CSMS: (0,128)
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: --> AT+CNMI=1,2,0,1,0^M
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: <-- +CSMS: (0,128)
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: --> AT+CNMI=1,2,0,1,0^M
2014-11-12 12:56:15 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:15 [3490] [7] INFO: AT2[pt1]: AT SMSC successfully opened.
2014-11-12 12:56:15 [3490] [6] DEBUG: AT2[pt0]: <-- OK
2014-11-12 12:56:15 [3490] [6] INFO: AT2[pt0]: AT SMSC successfully opened.
2014-11-12 12:56:17 [3490] [7] DEBUG: AT2[pt1]: --> AT^M
2014-11-12 12:56:17 [3490] [6] DEBUG: AT2[pt0]: --> AT^M
2014-11-12 12:56:17 [3490] [7] DEBUG: AT2[pt1]: <-- OK
2014-11-12 12:56:17 [3490] [6] DEBUG: AT2[pt0]: <-- OK
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.