ts-7000
[Top] [All Lists]

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

To:
Subject: Re: [ts-7000] ts-gsm1 reset modem only 0x11e00143
From: Don Tucker <>
Date: Tue, 22 Nov 2011 09:09:57 -0600
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



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<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