ts-7000
[Top] [All Lists]

[ts-7000] Re: ts-gsm1 reset modem only 0x11e00143

To:
Subject: [ts-7000] Re: ts-gsm1 reset modem only 0x11e00143
From: "wawan_wiratno" <>
Date: Thu, 24 Nov 2011 02:41:32 -0000
Hi Don,
this function is resetting the whole board not the modem only

int gsmpwron() {
        printf("powering on...\n");
        if (pc104base==NULL) { 
                printf("device not found"); 
                return(-1); 
        }
        *gsmstat=(0x01); /* set power on */
        usleep(4000000); /* wait for power change to happen */
        printf("modem on\n");   
        return 0;
}

same as my command line using poke8
poke8 0x11e00143 0x01

what I need is resetting the modem only not entire board.

many thanks

Wawan


--- In  Don Tucker <> wrote:
>
> This is some sample C++ code from my TS-7260 + TS-GSM1. Some of the 
> memory addresses may be different because of differing devices and/or 
> jumper settings. I hope it is helpful.
> 
> Don
> 
> 
> devmem=-1;
> devmem = open("/dev/mem", O_RDWR|O_SYNC);
> if(devmem == -1)
> return 0;
> 
> int InitializeCellModem(int devmem)
> {
> volatile unsigned char *pc104base=NULL;
> volatile unsigned char *gsmid;
> int offset = 0x140;//for JP4=OFF on TS-GSM1
> 
> pc104base = (unsigned 
> char*)mmap(0,getpagesize(),PROT_READ|PROT_WRITE,MAP_SHARED,
> devmem,PC104_8BIT_IO);
> //check memory map was successful
> if (pc104base == MAP_FAILED)
> return 0;
> //check that the cell modem is present
> gsmid = pc104base + offset;
> if (*gsmid != 9)
> return 0;
> 
> //assign global pointer to ON/OFF bit in memory registers for cell phone
> OP.gsm_stat = pc104base + offset + 3;
> 
> return 1;
> }
> 
> void TurnCellModemOff(int TimeDelay)
> {
> *(OP.gsm_stat)=(0x00);
> sleep(TimeDelay);
> }
> 
> void TurnCellModemOn(int TimeDelay)
> {
> *(OP.gsm_stat)=(0x01);
> sleep(TimeDelay);
> }
> 
> 
> 
> 
> *(OP.gsm_stat)=(0x00);
> 
> On 11/22/2011 1:50 AM, wawan_wiratno wrote:
> >
> > Hi All,
> >
> > I need to reset power of ts-gsm1 only when communication is hang.
> > its mean when I cannot initiate AT command will reboot modem only not 
> > the whole board.
> >
> > according to docs, that register base+3 bit number 0 is the controller
> > so I use poke8 command to turn on/off
> >
> > poke8 0x11e00143 0x0 --> modem turn off successfully
> > but poke8 0x11e00143 0x1 --> will reboot the whole board
> >
> > note: JP5 ON, IRQ7, JP4 OFF
> >
> > please help
> >
> > thanks
> > Wawan
> >
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<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