gpt4 book ai didi

sms - 发送wap推送

转载 作者:行者123 更新时间:2023-12-04 06:03:52 25 4
gpt4 key购买 nike

我尝试发送 wap 推送消息。我设置数据编码 0xf5 并使用以下消息发送提交 sm:

GSM短消息服务用户数据

udh 长度:6
16位地址05 04
目的端口 08b4
源端口 23f0

无线 session 协议(protocol),方法:推送 (0x06),内容类型:application/vnd.wap.sic

交易 ID:0x25
PDU 类型:推送 (0x06)
标题长度:1
内容类型:application/vnd.wap.sic

WAP 二进制 XML,版本:1.2,公共(public) ID:“-//WAPFORUM//DTD SI 1.0//EN(服务指示 1 .0)”

版本:1.2 (0x02)
公共(public)标识符:(已知):-//WAPFORUM//DTD SI 1.0//EN(服务指示 1 .0)
字符集:utf-8 (0x000006a)
字符串表:0字节

数据表示:

45
c6 <指示
0c href='http://'
03 69 2e 69 6d 67 75 72 2e 63 6f 6d 2f 66 6a 49 44 4e 2e 6a 70 67 00 i.imgur.com/fjIDN.jpg'
07 action='信号介质'
01 >
03 69 6d 67 75 72 00 'imgur'
01
01


消息字节:

06 05 04 0b 84 23 f0 25 06 01 ae 02 05 6a 00 45
c6 0c 03 69 2e 69 6d 67 75 72 2e 63 6f 6d 2f 66
6a 49 44 4e 2e 6a 70 67 00 07 01 03 69 6d 67 75
72 00 01 01

SMSC 返回:Submit_sm - resp:“OK”。
但是手机什么也没显示。有任何想法吗?
对不起我丑陋的英语:)

最佳答案

我无法完全证明这些更改为何有效,但从几年前的广泛测试来看,以下似乎在英国网络和一系列不同的手机中可靠地工作。它在生产代码中使用,从那以后我们没有看到任何问题。

06 - UDHL
05 - EI (Send to Ports 16bit addr)
04 - EIDL
0B - src port
84 - src port
23 - dest port
F0 - dest port (End of UDH)

01 - trans id
06 - Push
04 - Header Length
03 - Length
AE - Content type (application/vnd.wap.sic)
81 - Character Set (01 once removed high bit)
EA - UTF 8 (6A once removed high bit)

02 - Binary XML Version 1.2
05 - SI Identifier
6A - UTF-8
00 - End Data

45 - SI Binary XML Tag
C6 - Indication Tag
0B - href
03 - Open Text
(URL bytes go here...)
00 - End Data
0A - Created (date)
C3 - Data Follows
07 - Data Length
20 - date yy (century)
08 - date yy (year)
03 - date mm
26 - date dd
16 - date HH
09 - date MM
12 - date ss
01 - Close Attribute
03 - Open Text (Text Goes in here...)
00 - End Data
01 - Close Indication Tag
01 - Close SI Tag

您的发送有一些不同之处:
  • 无线 session 协议(protocol) header 上指定的 UTF-8 字符集
  • http://以字节形式完整写入,我认为这没有什么不同,但我们的应用程序的其余部分需要它。
  • 对指示标签
  • 无操作
  • 添加了创建日期属性 - 这似乎对手机支持产生了很大影响(我不太确定为什么)。
  • 关于sms - 发送wap推送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8613507/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com