本文共 5613 字,大约阅读时间需要 18 分钟。
【说明】
header: unsigned char 4byte (所有的铃声都是一样的header)
values: 4c 33 35 26 -->"l35&"tempo value: unsigned char 2byte 拍子,由1或2或3或4加空格构成,缺省为2,values: 32 20 -->"2 " musical data:nbyte 二进制数据delimiter: unsigned char 2 byte 分隔符 values: 26 26 -->"&&"checksum: 2byte 对musical data进行的校验和,两个字节。方法为对musical data中的数据从前往后对每个字符进行异或运算,运算的结果假设其十六进制的表示为xy,那checksum的第一个字节的十六进制形式为3y,第二个字节的十六进制形式为3x。计算方式:step1: calculate one byte xor sum of the all the bytes of the musical data starting afterthe space in the tempo value(not including space) till the && (not inclusive of &&). letus say this is xy.step 2: separate x and y into two bytes x0 and 0y.step 3: take 0y and add hex 30. this becomes 3y. call this byte 1.step 4: take x0 and shift right by 4 bits. this becomes 0x.step 5: add hex 30 to 0x. this becomes 3x. call this byte 2.step 6: two byte checksum is nokia普通铃声格式普通图片(operator logo)
【格式】 【说明】 = < mcc> < mnc>udhi iei ieil ied mcc mnc06h 05h 04h 1582h 0000h 64f0 00 以上适用于china moblieudhi: byte length of user-data header define: 06h (用户数据头)
iei: byte information element identifier define; 05h (ie info )ieil: byte length of iei data define: 04h (ie长度)ied: unsinge int 2 bytes , octets 4 & 5 define: 5506--> 1582h - destination portied: unsinge int 2 bytes , octets 6 & 7 define: 0000 - originator portmcc: (mobile country code), octets 14 and 15, little-endian bcd, filled with f16', 460 -> 64 f0, for chinanotice: to see the logo on the phone's screen, octets 8 and 9 must be defined with the settings of the current operator. (国家代码)mnc: mobile network code) coding, little-endian bcd, filled with f16', 00->00, for chinamobile is 00, china cugsm is 01 (网络代码)otb-bmp:otb格式, ::= [ ] ::= [extfield]infofield 8bit 图片信息区具体表示如下:bit info field , description 7 分割标志 1:分割图片(后面还有)0:否6 压缩标志 1:压缩 0:没有压缩5 扩展调色板 1:使用 0:没有使用4 max size of icon 1:16bit ,0:8bit3 number of animated icons, msb2 number of animated icons1 number of animated icons0 number of animated icons,lstextended infofield 8bit 图片信息区具体表示如下:
bit extfield , description 7 分割标志 1:分割图片(后面还有)0:否6 bmp版本5 bmp版本4 bmp3 保留2 保留1 保留0 保留width: 图片的宽度。对于operator log width =72 48h
height: 图片的高度。 对于operator log heigth=14 04h depth: 图片的深度,灰度值或者颜色数。image-data:图片点阵,当图片的大小为72x14时候,每一个byte就表示8个点,一行有72个点,因此每行需要9bytes,由于是14行,因此需要的大小是9x14=126bytes。每一个bit,1表示黑色,0表示白色。alcatel普通铃声格式【格式】< concatenation -iei >< concatenation-length >< concatenation-reference number >]< concatenation-maximum number >< concatenation-sequence number >【说明】
tp-udl byte //短信长度 user data length max:-140
tp-udhl byte //短信头长度 user data head length -----------------------------------------------------------------------------------------------------------------tdd-iei byte //阿尔卡特 sms标示 =80 type ”download”tdd-length byte // ie length of the tdd_header ----end of ietdd-name-length byte //title/name length 标头名字长度 tdd-name unsigned char [tdd-name-length] //标头名称 {字符 }tdd-data-type byte //tdd_data_type注释: bit 7:
0: cannot be forwarded1: can be forwared using ems如果兼容ems就设置为1 bit 4-6 unusedbit 0-2000:imelody melody001:ialcatel melody010:mseq melody011:vox melody100: alcatel picture 101:alcatel animation110:sms template111.unusedtdd-data-length = unsigned int 2 byte //tdd_data数据 长度 byte 1: msbbyte 2: lsb// end of tdd header ie// start of concatenation header ie //以下只是用于坼分短信concatenation-iei byte //iei=00concatenation-length byte //iedl=03concatenation-reference number byte // 序列号??(same as all segrments)125concatenation-maximum number byte //总条数 (same as all segrments)concatenation-sequence number byte //当前序列号// end of concatenation header ie// end of user data headertdd-data = //tdd_data 数据 二进制流
普通图片(同铃声格式) siemens普通铃声格式【格式】---------------------------------------------------------------------------------------------------------------------------------【说明】identifier: ascii 5 byte 标识。设为”//seo”(注意大小写)(seq stands for siemens exchange object)version: unsigned char 版本号。设为1datasize: unsigned int 2 byte 数据大小。每个包里可mid数据的大小,对于同一mid的不同包的该值相同,最后一个包里实际剩余数据大小不足时,添0补足 最大值为:140-22-length(objname)-leng(objtype) in bytereferenceid:unsigned long 4字节 序列号。可自行设定,对同一首mid的不同包的该值相同actpacketnumber:unsigned int 2字节当前包是第几包。从1开始计数numberofpackets:unsigned int 2字节 总包数。objectsize:unsigned long 4字节mid的大小。the total of the dataobject in byteobjecttype:string 1byte+x (x>0) 类型为mid。。第一字节为长度,因为类型为”mid”所以第一字节为3,第二至第四字节为”mid” objectnam string 1byte+y mid的名称,包括扩展名。长度不定。第一个字节为长度。如歌曲为”甜蜜蜜.mid”,则objectname的长度为10,第一个字节为10。第二至十个字节为” 甜蜜蜜.mid”resulting size: 22 byte +x+ydata:mid数据。从mid文件中拆分出来的数据。普通图片【格式】-------------------------------------------------------------------------------------------------------------------------------------【说明】identifier: ascii 5 byte 标识。设为”//seo”(注意大小写)(seq stands for siemens exchange object)version: unsigned char 1 byte 版本号。设为1datasize: unsigned int 2 byte 数据大小。每个包里可bmp数据的大小,对于的不同包的该值相同,最后一个包里实际剩余数据大小不足时,添0补足 最大值为:140-22-length(objname)-leng(objtype) in bytereferenceid:unsigned long 4字节 序列号。可自行设定,对同一副图片的不同包的该值相同actpacketnumber:unsigned int 2字节当前包是第几包。从1开始计数numberofpackets:unsigned int 2字节 总包数。objectsize:unsigned long 4字节mid的大小。the total of the dataobject in byteobjecttype:string 1byte+x (x>0) 类型为bmp。。第一字节为长度,因为类型为”bmp”所以第一字节为3,第二至第四字节为”bmp” objectname string 1byte+y mid的名称,包括扩展名。长度不定。第一个字节为长度。如歌曲为”1234.bmp”,则objectname的长度为8,第一个字节为8。第二至十个字节为”1234.bmp”resulting size: 22 byte +x+ydata:mid数据。从bmp文件中拆分出来的数据。来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10294527/viewspace-125491/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10294527/viewspace-125491/