How to control SIEMENS C35 using microcontroller 8051

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi, i'm doing a final year project with tittle remote process control
control using a mobile phone. but i cant communicate the
microcontroller 8051 with SIEMENC C35 using a data cable.
How to using the AT Command? It's only for C language or can use in
microcontroller assemble language?

Re: How to control SIEMENS C35 using microcontroller 8051
snipped-for-privacy@yahoo.com (Lawrence) wrote in

Quoted text here. Click to load it

AT commands are from the old Hayes Modem company. The command set is
simple ASCII. Once you get the baud rate and physical layer drivers
correct for the C35 phone you will be able to send it AT commands in C,
Forth, Pascal, BASIC, or assembler.

--
- Mark ->
--

Re: How to control SIEMENS C35 using microcontroller 8051
This is my 8051 microcontroller program to initialize and C35, but it
cannot work,( I am using C16 compiler)and AT89S8252 microcontroller

start:
MOV A,PCON
SETB ACC.7
MOV PCON,A
MOV TMOD,#20H
MOV TH1,#0FDH
MOV SCON,#50H
SETB TTR1

MOV DPTR,#1930H
ACALL SENDCOM
MOV DPTR,#1940H
ACALL SENDCOM
MOV DPTR,#1950H
ACALL SENDCOM
MOV DPTR,#1960H
ACALL SENDCOM

SENDCOM:
A1:    CLR A
    MOVC A,@A+DPTR
    CJNE A,#0FFH,CON
`    RET
CON:    ACALL SENDW
    INC DPTR
    SJMP A1
SENDW:    CLR T1
    MOV SBUF,A
H1:    JNB TI,H1
    RET

ORG 1930H
DFB "AT",0FFH
ORG 1940H
DFB "ATZ",0FFH
ORG 1950H
DFB "ATE0",0FFH
ORG 1960H
DFB "ATA",0FFH

END

any comment??
i also connect the C35 and MAX207 with a data cable.the MAX207 was to
connect to the pin 10 and 11 ( transmit and receive) of the
microcontroller.

Re: How to control SIEMENS C35 using microcontroller 8051
Dear Lawrence,

Quoted text here. Click to load it

You have to append a CR (0D hex) to the AT commands!

HTH
Wolfgang

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at


Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

how do i to initial the modem in the data cable? does it require any
delay when sending data?

Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

You MUST read the data book. If it is the bare module you are using, you
must assert the IGN line for a few milliseconds after power up,
otherwise you won't get anything. Send it a CR character (0x0d by
default) and it should respond "OK". No other setup is required (except
to configure using the AT command set for your own needs). make sure you
are supplying enough current


Paul Burke


Re: How to control SIEMENS C35 using microcontroller 8051

Quoted text here. Click to load it

Apologies. Why do Siemens seem to call ALL their mobile phone
something35? I assumed the OP was talking about the MC35 GSM engine,
getting home I find my daughter's mobile is a C35.

Paul Burke



Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

An "AT" controlled modem is basically in one of two states: active
or quiescent.  In the quiescent state it receives commands that
start with at and end with <cr>.  The AT portion serves to set the
communication speed, and the modem adapts accordingly.

It usually gets out of the quiescent state to the active state via
the ATA or ATD commands.  In the active state it first
synchronizes with the remote modem, and then becomes transparent
to data.  ATA causes it to answer an incoming call, and
ATD<number> causes it to dial and originate a call.

In the process of switching states (or processing commands) it
normally sends back responses, such as OK, or possibly just a
number.

So you don't really have to time most things.  Their is more than
this, of course, such as response to DTR line, and use of CD line,
etc.  IIRC the modem will usually give help when sent AT?<cr>.
Simple, portable, and effective.  That is why Hayes was king of
the modem market for a long time and the protocol became virtually
universal.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

Bet on it!  You should do what's known as "char pacing", ie insert
a delay of 5-10ms between each character you send, and always wait
for the remote response (inclusive terminating 0d 0a) plus another
5-10ms before sending the next command.

The C35 also has the bad habbit of falling asleep after a while of
inactivity or when receiving excessive amounts of "garbage".  That
is, when it suddenly stops to work, you may have to press a key on
the keyboard or even power-cycle it to recover.

Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

Bet on it!  You should do what's known as "char pacing", ie insert
a delay of 5-10ms between each character you send, and always wait
for the remote response (inclusive terminating 0d 0a) plus another
5-10ms before sending the next command.

The C35 also has the bad habbit of falling asleep after a while of
inactivity or when receiving excessive amounts of "garbage".  That
is, when it suddenly stops to work, you may have to press a key on
the keyboard or even power-cycle it to recover.

Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

I don't know if you mean the TC35 or the MC35, or the packaged modem
versions with RS232, or something else, but the ones I have used
implement an extended AT command set. The standard AT commands are
readily availkable on the web, but you'll have to get the Siemens manual
for their proprietary extensions.

The bare modules are logic compatible, the packaged version RS232. In
either case, get your serial port routines working and tested (using a
terminal program or something similar) before even hooking up to the
modem. IIRC they autobaud, so start at something easy like 9600 8N1. It
doesn't use handshake until you set it up.

You can use the AT command set with anything that can send and receive
ASCII text,in any language, but be warned, it's a right pain in the genome.

Paul Burke


Re: How to control SIEMENS C35 using microcontroller 8051
Quoted text here. Click to load it

Check out this document:

http://www.like.e-technik.uni-erlangen.de/download/pemsy/s35i_c35i_m35i_atc_commandset_v01.pdf

Baudrate is 19200 8N2 or 8E1 if I recall correctly.

Re: How to control SIEMENS C35 using microcontroller 8051
Hi, I write my program base on yours advice but it still can't work,
i set the 19200 baudrate with 8E1.

after that I send the command to the modem connect to C35.
I send < 41 54 5a 0d >( = ATZ) first with set 5mS delay when sending
each chararacters , but I din receive any response from modem.


this is part of my program,
;-------------------------------------------------
;SET BAUD RATE AT 19200,8BIT, 1 STOP BIT AND REN=1
;-------------------------------------------------
C35:
MOV A,PCON
SETB ACC.7
MOV PCON,A
MOV TMOD,#20H
MOV TH1,#0FDH
MOV SCON,#50H
SETB TR1
;-------------------------------------------------
;SEND COMMAND TO MODEM
;-------------------------------------------------
MOV A,#41H        ;A
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#54H        ;T
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#5AH        ;Z
 ACALL SENDW
 ACALL DELAY_5mS
MOV A,#0DH        ;<CR>
 ACALL SENDW
 ACALL DELAY_5mS
;-------------------------------------------------
;RECEIVE DATA FROM MODEM
;-------------------------------------------------
          MOV DPTR,#1500H
          ACALL RECEI
;--------------------------------------------------
RECEI:    ACALL RECV
    MOVX @DPTR,A

BUSY:    MOV A,96H    ;UTILIZING RDY/BSY TO DETERMINE THE END OF WRITE CYCLE
    ANL A,#WDTRST
    JZ BUSY
    MOVX A,@DPTR
        ACALL TEST           ;TEST PROGRAM FOR RECEIVE 'OK'ODH OR
'ERROR'ODH
        JZ FINISH

    INC DPTR
    SJMP RECEI

RECV:    JNB RI,RECV     ;<-------MY PROGRAM WERE STOP HERE WHICH IT
CAN'T
    MOV A,SBUF      ;        RECEIVE ANY DATA FROM MODEM
    CLR RI
    RET
SENDW:    CLR TI            ;SEND SINGLE BYTE TO C35
    MOV SBUF,A
H1:    JNB TI,H1
    RET
FINISH:
END

Site Timeline