Modem connection help : Multi-Tech MTCBA-G-EN-F4

"Tony Kirkham" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi, guys,

I'm back with more questions.  I am still trying to get kannel to talk to a
Multi-Tech MTCBA-G-EN-F4 modem that connects via an ethernet port.

If you have good knowledge of the smsc_at driver code I could really use
your help.

I have been hacking away at the smsc_at.c code and have wrapped the code to
detect the modem speed in an
  if ( privdata->is_serial ) { ... }
statement so that this won't be attempted because, apparently, you cannot
detect this modems speed.

I thought this would solve my problem but, alas, it did not.  I have now
worked my way down into the at2_read_buffer() call and I think that this is
where the problem is occurring.  I have placed a few DEBUG log file writes
in locations to show what is happening.  I am completely new to
communicating to modems and via raw tcp so I do not know what should be
expected.  However, I don't think the at2_read_buffer() call is getting
anything.  Below, is a reduced log file for the at device containing what is
written from a startup - shutdown cycle of bearerbox.

The biggest indicators that I see are that privdata->lib = strange
characters and at2_read_line() never finds an end-of-line character.  The
at2_read_buffer() call only executes a read the first time for the first AT
command.  After that it seems like the state of something is stuck because
the select() call only returns 0 causing the at2_read_buffer() call to
return NULL before the read() is attempted.

If anyone has some insight into this I would greatly appreciate it.  I am
using the code in the source download.  I have not pulled anything from the
cvs repository.

Thank you very much,

-Tony

log file

      1 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: opening device
      2 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: device opened
      3 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: init device
      4 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: --> ATZ^M
      5 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: --> ATZ^M
-response: 4
      6 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_wait_modem_command:
before while cur_time <= end_time
      7 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 1
      8 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: before
read, ret: 1
      9 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after
read, s: 12
     10 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     11 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
     12 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 0
     13 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     14 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
... 1000's of repetitions of the above 3 lines ...
     15 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_wait_modem_command:
Out of loop: cur_time: 1212864670, end_time: 1212864669
     16 2008-06-07 12:51:10 [15527] [6] ERROR: AT2[vzn00]: Wrong or no
answer to ATZ, ignoring
     17 2008-06-07 12:51:10 [15527] [6] DEBUG: AT2[vzn00]: --> AT^M
     18 2008-06-07 12:51:10 [15527] [6] DEBUG: AT2[vzn00]: --> AT^M
-response: 3
     19 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_wait_modem_command:
before while cur_time <= end_time
     20 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 0
     21 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     22 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
... 1000's of repetitions ...
     23 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 0
     24 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     25 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
     26 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_wait_modem_command:
Out of loop: cur_time: 1212864674, end_time: 1212864673
     27 2008-06-07 12:51:14 [15527] [6] ERROR: AT2[vzn00]: Wrong or no
answer to AT. Trying again
     28 2008-06-07 12:51:14 [15527] [6] DEBUG: AT2[vzn00]: --> AT^M
     29 2008-06-07 12:51:14 [15527] [6] DEBUG: AT2[vzn00]: --> AT^M
-response: 3
     30 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_wait_modem_command:
before while cur_time <= end_time
     31 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 0
     32 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     33 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
... 1000's of repetitions ...
     34 2008-06-07 12:51:14 [15527] [6] DEBUG: in at2_read_buffer: after
select, ret: 0
     35 2008-06-07 12:51:18 [15527] [6] DEBUG: in at2_read_line with
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
     36 2008-06-07 12:51:18 [15527] [6] DEBUG: in at2_read_line if eol == -1
will return NULL eol: -1
     37 2008-06-07 12:51:18 [15527] [6] DEBUG: in at2_wait_modem_command:
Out of loop: cur_time: 1212864678, end_time: 1212864677
     38 2008-06-07 12:51:18 [15527] [6] ERROR: AT2[vzn00]: Second attempt to
send AT failed
     39 2008-06-07 12:51:18 [15527] [6] ERROR: AT2[vzn00]: Opening failed.
Terminating
     40 2008-06-07 12:51:18 [15527] [6] INFO: AT2[vzn00]: closing device
     41 2008-06-07 12:51:18 [15527] [6] INFO: AT2[vzn00]: closing device
     42 2008-06-07 12:51:18 [15527] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) terminates.
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.