Tuesday, September 23, 2008

Brief of SMS Protocol(2)


  1. Ts23040:Technical realization of the Short Message Service (SMS)

Basic network structure







Message type definations:

  • bit1 bit0 Message type
  • 0 0 SMS DELIVER (in the direction SC to MS)
  • 0 0 SMS DELIVER REPORT (in the direction MS to SC)
  • 1 0 SMS STATUS REPORT (in the direction SC to MS)
  • 1 0 SMS COMMAND (in the direction MS to SC)
  • 0 1 SMS SUBMIT (in the direction MS to SC)
  • 0 1 SMS SUBMIT REPORT (in the direction SC to MS)
  • 1 1 Reserved

Thursday, September 11, 2008

Brief of SMS protocol(1)

  1. Ts24.011: Point-to-Point (PP) Short Message Service (SMS) support on mobile radio interface
  • Protocols and protocol architecture:


SM‑AL










SM‑TL






<--- SM‑TP protocol --->




SM‑RL




SMR


<--- SM‑RP protocol --->


SMR


CM‑sublayer




SMC


<--- SM‑CP protocol --->


SMC


MM/LLC/GMM






CS/PS/Iu-PS protocal





  • An SMC entity communicates with a corresponding peer entity using an MM connection for CS in A/Gb and Iu mode or the LLC layer for GPRS in A/Gb mode or the GMM-connection in for PS in Iu mode

  1. CM procedures
  • connection establishment procedures
  • RP Data Unit (RPDU) transfer procedures
  • connection release procedures
  • procedures for abnormal cases


Table 8.1/3GPP TS 24.011: Message types for short message and notification transfer on CM

8 7 6 5 4 3 2 1

0 0 0 0 0 0 0 1 CP‑DATA

0 0 0 0 0 1 0 0 CP‑ACK

0 0 0 1 0 0 0 0 CP‑ERROR


  1. RL procedures
  • TP Data Unit (TPDU) relay procedures
  • notification relay procedures
  • procedures for abnormal cases

Table 8.3/3GPP TS 24.011: Coding of Message Type Indicator

Bit value

Direction

RP‑Message

3 2 1



0 0 0

ms ‑> n

RP‑DATA

0 0 0

n ‑> ms

Reserved

0 0 1

ms ‑> n

Reserved

0 0 1

n ‑> ms

RP‑DATA

0 1 0

ms ‑> n

RP‑ACK

0 1 0

n ‑> ms

Reserved

0 1 1

ms ‑> n

Reserved

0 1 1

n ‑> ms

RP‑ACK

1 0 0

ms ‑> n

RP‑ERROR

1 0 0

n ‑> ms

Reserved

1 0 1

ms ‑> n

Reserved

1 0 1

n ‑> ms

RP‑ERROR

1 1 0

ms ‑> n

RP‑SMMA

1 1 0

n ‑> ms

Reserved

1 1 1

ms ‑> n

Reserved

1 1 1

n ‑> ms

Reserved



  1. Sample diagrams






Tuesday, September 2, 2008

Porting linux 2.6.26.3 to S3C2440

1. 修改NAND FLASH分区信息. 保持和bootloader的配置一致。arch/arm/plat_s3c24xx/common-smdk.c:

smdk_default_nand_part[] = {
...
}

2. 修改NAND FLASH的物理特性。

2.1 In arch/arm/plat_s3c24xx/common-smdk.c , change the the code as following:

smdk_nand_info = {
.tacls = 0, // default 20,
.twrph0 = 30, // default 60
.twrph1 = 0, // defualt 20
}

2.2 Disable NAND FLASH ECC check. Enable的话,kernel启动会出现错误,原因未知。drivers/mtd/nand/s3c2410.c, line:673,

chip->ecc.mode = NAND_ECC_NONE; // default NAND_ECC_SOFT;


3. Modify the clock parameter. In file arch/arm/mach-s3c2440/mach-smdk2440.c, modifiy it as below:

s3c24xx_init_clocks(12000000); //default is 16934400, changed by xiao

4. Build the 2.6.26.3 kernel.

4.1 在Makefile中,修改 "ARCH=arm",然后根据自己的环境配置"CROSS_COMPILE";

4.2 Build zImage.

make menuconfig
make zImage

5. Create rootfs.
5.1 build the busybox, make sure mdev support is enabled.
#make menuconfig
#make install
#arm-linux-readelf -a ./busybox grep "Shared library"
copy the share lib to the $install/lib

5.2 配置udev.
#mkdir $install/dev
cd dev
mknod -m 600 console c 5 1
mknod -m 666 null c 1 3

编辑文件/etc/init.d/rcS
mkdir /dev/pts
mount -t devpts devpts /dev/pts

mkdir /dev/shm
mount -t tmpfs tmpfs /dev/shm

echo /bin/mdev > /proc/sys/kernel/hotplug
mdev -s

使用udev的缺省配置就可以了,所以没有必要修改/etc/udev.conf文件

配置完成