- 积分
- 431
- 实力分
- 点
- 金钱数
- 两
- 技术分
- 分
- 贡献分
- 分
|

楼主 |
发表于 2008-8-6 23:44:02
|
显示全部楼层
是不是和6688用的AT软件有关?
New patch by fcotrina for S/ME45iv4 (I only publish it here).
Attention! Alpha version!
; XAT 0.2 - eXecute AT commands
; Model: S45i_v04
; Author: fcotrina@email.com
; Date: 2005.02.24
;
; This patch is in alpha state. It has been released so
; that other patchers can start thinking about it.
; Basically, it allows to execute AT commands.
; Those commands are usually executed from a PC with
; a terminal program.
; Some examples are provided at the end of the listing.
;
; Limitations and peculiarities:
; -After switching-on the phone, connect to a computer
; using the serial cable.
; No need to start any application; just connect it. This
; will trigger some initialization routines.
; I am working on a permanent solution. Be patient
; -It is not possible to read the output ... yet.
; -If you have the phone connected to a computer, you
; can still see the output OK/ERROR. This is good.
; -Before making a patch that executes a command, make sure
; that the command works !
; -It is possible to run several commands in the same
; string, separated by ';' . But see previous note.
; For example, ^SPST=0,1;+ckpd=e9876543 works,
; but +ckpd=e9876543;^SPST=0,1 doesn't.
; -Some commands only work 1 out of 2 times when the
; phone is connected to a computer. No idea why.
;
;base 0100000h ; for my test purposes
base 0A00000h
#include C166.inc
#define S45i_strcpy 0FF40A0h
#define processATcommand 0E0B07Ah
; this will stop "cleanFlagsWhenCableIsDisconnected"
org 0E1EE48h
rets ; was 2D02 jmpr cc_Z, loc_E1EE4E
;org 0100530h ; for my test purposes
org 0FEF530h
mov r13, #0055h ; verify with at+cgsn:0055,0000 or look at 154000
; first, needs to set bytes 00 02 at 0055:0000
; this is more or less to write "AT"
mov r1,#0002h
mov r12, #0000h
extp r13, #1h
mov [r12], r1
add r12, #2h
; and then, copy the rest of the AT command
mov r15, #p(command)
mov r14, #q(command)
mov [-r0], r12
mov [-r0], r13
calls S45i_strcpy
mov r13, [r0+]
mov r12, [r0+]
; and now, the funny part
calls processATcommand
end:
rets
command:
db '^SPST=4,1', 00h ; this command will make a short beep
; other command examples
; db '^SPST=4,1', 00h ; this command will make a short beep
; db 'DP123456', 00h ; this command will dial phone 123456
; db 'e0' ; this command deactivates command echo
; db '^CRSL=2' ; set the volume
; db '+ckpd=e9876543', 00h ; emulates keypresses. Only works 1 out of 2 times.
;0x41EE48: 2D02 DB00
;0x5EF530: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF E6FD5500E6F10200E6FC0000DC4DB81C
;0x5EF540: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 08C2E6FFFB03E6FE5C3588C088D0DAFF
;0x5EF550: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF A04098D098C0DAE07AB0DB005E535053
;0x5EF560: FFFFFFFFFFFF 543D342C3100 |
|