数码鹭岛论坛

标题: 【资料分享】NOKIA、MOTOROLA、SIMENS及ERICCSON铃声和图片格式分析 [打印本页]

作者: 翔子    时间: 2003-10-12 23:33
标题: 【资料分享】NOKIA、MOTOROLA、SIMENS及ERICCSON铃声和图片格式分析
NOKIA、MOTOROLA、SIMENS及ERICCSON铃声和图片格式分析
  
NOKIA铃声:
铃声和图片的格式有资料详细介绍,有兴趣的最好还是去看看他的smartmessage。
在CMPP的CMPP_SUBMIT包里,其Msg_Content由两部分组成,头和内容
  
铃声:0x6 0x5 0x4 0x15 0x81 0 0(头) + 铃声二进制内容
图片:0x6 0x5 0x4 0x15 0x82 0 00x64 0xf0 0(头) + 图片二进制
  
Motorola铃声:
在CMPP的CMPP_SUBMIT包里,其Msg_Content由|<-Header ->|<-Tempo value->|<-Musical Data -> |<-Delimiter->|Checksum->|组成
  
field binary data ascii data
-------------------------------------------------------------------------------------
Header: 4c 33 35 26 -->"L35&"  
Tempo value: 32 20 -->"2 "  
Musical Data: 43 2d 32 20 43 23 2d 32 20 44 2d 32 20 -->"C-2 C#-2 D-2 "  
Delimiter: 26 26 -->"&&"  
Checksum: 35 38 -->"58"
-------------------------------------------------------------------------------------
最终发送的二进制流为:4c3335263220432d322043232d3220442d322026263538
  
要注意的是校验位的计算,是所有Musical Data 异或后的值,然后拆分转换而来得,如果checksum计算不正确则手机接收后是些非法字符的普通消息。下面的文档中算法很详细。
  
Header: L35& This is a constant string for all musical tone SMS. [By using 'Send As SMS'
option user can send composed Ringer Tone to other compatible Motorola phone. To
differentiate Music SMS from Normal SMS, special header is attached.]
Tempo Value: This is either 1 or 2 or 3 or 4 followed by a space(e.g. “2 “). Default is 2.
Musical Data : It consists of 1 or more notes, subject to a maximum of 35 Notes , the format
of which is given below.
Delimiter : && This represents the end of musical notes in the tone.
Checksum : Two bytes. The algorithm for calculation of the checksum is given below.
  
Step1: Calculate one byte XOR sum of the all the bytes of the musical data starting after
the space in the tempo value(not including space) till the && (not inclusive of &&). Let
us 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 <byte 2><byte1>
  
SIMENS铃声:
在CMPP的CMPP_SUBMIT包里,其Msg_Content由
2f 2f 53 45 4f:头
1:版本
6b 0:数据段长度
7 11 9 17:类似序列号
6 0:第6个数据包
8 0:共8个数据包
f7 2 0 0:mid文件大小
3 6d 69 64:3mid
8:文件名长度  
65 31 33 39 2e 6d 69 64:文件名
。。。:数据  
  
ERICSSON铃声:
在CMPP的CMPP_SUBMIT包里,其Msg_Content由
其格式是:
binary data ascii data
---------------------------------------------------------
42 45 47 49 4e 3a 45 4d 45 4c 4f 44 59 0a -->BEGIN:EMELODY+换行符(0x0a)
45 52 53 49 4f 4e 3a 31 2e 30 0a -->VERSION:1.0+换行符(0x0a)
4d 45 4c 4f 44 59 3a数据内容0a -->MELODY:+内容++换行符(0x0a)
45 4e 44 3a 45 4d 45 4c 4f 44 59 -->END:EMELODY
-------------------------------------------------------------




欢迎光临 数码鹭岛论坛 (http://www.clore.net/forum/) Powered by Discuz! X3.2