ts-7000
[Top] [All Lists]

[ts-7000] ttyAM0 not working for pppd and chat on GRPS modem

To:
Subject: [ts-7000] ttyAM0 not working for pppd and chat on GRPS modem
From: David Yan <>
Date: Tue, 28 Jun 2005 10:54:18 -0700 (PDT)
Hi Jesse:
   I bought a TS-7250 board. I am trying to make pppd and chat work with com1. I did not see any data came out from COM1 after run pppd.   Do you know what's wrong? any suggestion will be great help. Thanks.
Here is what I set up.
1) disable J2
2) initab    comment out console output setting
 
run command  like this:
pppd /dev/ttyAM0 9600 mtu 576 mru 576 modem   kdebug 1 debug   lock       
nocrtscts                                         
defaultroute                                      
lcp-echo-failure 0                                
lcp-echo-interval 0                               
novj                                              
persist                                           
usepeerdns                                      &nb! sp; 
connect "/usr/sbin/chat -v -f /etc/ppp/chat.scprit"

chat-script:
ECHO ON
SAY "GPRS\n"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "ERROR"
REPORT "CONNECT"
TIMEOUT 10
" " ATZ
OK "AT"
OK 'AT+CGDCONT=1,"ip","cmnet"'
OK "ATDT*99***1#"
TIMEOUT 10
CONNECT \c
SAY "C ...\n"
David


Jesse Off <> wrote:
This is with a struct declared with __attribute__(packed) or no?

Keep in mind ARM needs 32 bit numbers aligned on 32bit boundaries and
16 bit numbers on 16 bit boundaries.  If you use __attribute__(packed)
on a structure gcc will emit 4 byte loads OR'ed and shifted into a
32bit register for 32 bit variables, which can give a performance/code
size penalty.  FYI.

GCC will always pad sizeof(struct XX) to a 4 byte boundary
partly so you don't end up placing the struct on a non-4 byte aligned
address when laying out an array.  Aligning the struct on a 4-byte
boundary allows gcc to emit 32-bit load/stores for accessing members. 
Linux may catch the alignment trap and emulate the correct behavior if
you violate this, but at another large performance hit.

//Jesse Off

--- In "manx10004" <> wrote:
> Folks,
>
>   I have run into a small problem with the suggested gcc compiler.
> The sizeof operator does not yield the correct size of a structure
> when the structure is packed on byte bounderies. Instead the compiler
> seems to give the size up to the next four byte boundery.
>
>   Offsets of variables within the stucture are correct, and I have
used
> this property to derive the proper size for the structure which I
> needed for communications. Still, it is an annoyance, and took some
> test code and packet sniffing to diagnose the problem.
>
>   I hope this helps someone else out of a simular situation.
> Regards



Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football

YAHOO! GROUPS LINKS

  •  Visit your group "ts-7000" on the web.
     
  •  To unsubscribe from this group, send an email to:
     =Unsubscribe
     
  •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU