Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析长短信失败 #19

Open
cassc opened this issue Feb 21, 2020 · 2 comments
Open

解析长短信失败 #19

cassc opened this issue Feb 21, 2020 · 2 comments

Comments

@cassc
Copy link

cassc commented Feb 21, 2020

测试接收含3个以上包组成的长短信时,发现sms.lualongsmsmergecnf方法里的common.ucs2beToGb2312似乎无响应。也就是下面的beforemsg日志能打印,但aftermsg未打印。

local function longsmsmergecnf(res,num,data,datetime)
    --log.info("longsmsmergecnf",num,data,datetime)
    if data then
        --短信内容转换为GB2312字符串格式
        log.info("beforemsg:",data)
       data = common.ucs2beToGb2312(data:fromHex())
       log.info("aftermsg:",data)
        --用户应用程序处理短信
        if newsmscb then newsmscb(num,data,datetime) end
    end
end

两个包长短信似乎有的可以有的也会失败。

我的LOD版本是Luat_V0035_8955_SSL。用LuaTools 1.6.4写入lua脚本。

下面是部分日志:

[2020-02-21 12:12:55.857]: [I]-[ril.proatc]	+CMGR: 0,,159
[2020-02-21 12:12:55.857]: [I]-[ril.proatc]	0891683108707515F0640BA18175552228F60008022012214135238C0500038802018D85957F76848BBA662F54EA4E2A884C4E1AFF0C85
[2020-02-21 12:12:55.857]: AA916C6C388FDC90FD662F6BCF4E2A4EBA774091CD51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4
[2020-02-21 12:12:55.857]: EBA6240597D59477684FF0C4F4653744E0076F46CA167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C
[2020-02-21 12:12:55.897]: [I]-[ril.proatc]	
[2020-02-21 12:12:55.903]: [I]-[ril.proatc]	OK
[2020-02-21 12:12:55.903]: [I]-[lib_sms rsp]	+CMGR	AT+CMGR=1	true	OK	+CMGR: 0,,159
[2020-02-21 12:12:55.903]: 0891683108707515F0640BA18175552228F60008022012214135238C0500038802018D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90F
[2020-02-21 12:12:55.903]: D662F6BCF4E2A4EBA774091CD51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D594776
[2020-02-21 12:12:55.903]: 84FF0C4F4653744E0076F46CA167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C
[2020-02-21 12:12:55.945]: [I]-[TP-PID : ]	0	dcs: 	8	tz: 	02201221413523	data: 	8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4E
[2020-02-21 12:12:55.949]: BA774091CD51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744
[2020-02-21 12:12:55.950]: E0076F46CA167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C	txtlen	140
[2020-02-21 12:12:55.982]: [I]-[ril.sendat]	AT+CMGD=1
[2020-02-21 12:12:55.982]: [I]-[longsmsind]	isn	136	total:	2	idx:	1	data	8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4EBA77409
[2020-02-21 12:12:55.982]: 1CD51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744E0076F4
[2020-02-21 12:12:55.982]: 6CA167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C
[2020-02-21 12:12:56.046]: [I]-[ril.proatc]	
[2020-02-21 12:12:56.046]: [I]-[ril.proatc]	OK
[2020-02-21 12:12:56.046]: [I]-[lib_sms rsp]	+CMGD	AT+CMGD=1	true	OK	nil
[2020-02-21 12:13:00.575]: [I]-[ril.proatc]	
[2020-02-21 12:13:00.607]: [I]-[ril.proatc]	+CMTI: "ME",1
[2020-02-21 12:13:00.607]: [I]-[ril.sendat]	AT+CMGR=1
[2020-02-21 12:13:00.607]: [I]-[ril.proatc]	
[2020-02-21 12:13:00.607]: [I]-[ril.proatc]	+CMGR: 0,,103
[2020-02-21 12:13:00.655]: [I]-[ril.proatc]	0891683108707515F0640BA18175552228F60008022012214145235405000388020253F84F1A7ED979D84E6653D1591A5C115DE58D44FF
[2020-02-21 12:13:00.669]: 1F6C47603B516856FD00374E074E2A79D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002
[2020-02-21 12:13:00.669]: [I]-[ril.proatc]	
[2020-02-21 12:13:00.669]: [I]-[ril.proatc]	OK
[2020-02-21 12:13:00.669]: [I]-[lib_sms rsp]	+CMGR	AT+CMGR=1	true	OK	+CMGR: 0,,103
[2020-02-21 12:13:00.685]: 0891683108707515F0640BA18175552228F60008022012214145235405000388020253F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856F
[2020-02-21 12:13:00.685]: D00374E074E2A79D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002
[2020-02-21 12:13:00.701]: [I]-[TP-PID : ]	0	dcs: 	8	tz: 	02201221414523	data: 	53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E2A79
[2020-02-21 12:13:00.701]: D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002	txtlen	84
[2020-02-21 12:13:00.701]: [I]-[ril.sendat]	AT+CMGD=1
[2020-02-21 12:13:00.701]: [I]-[longsmsind]	isn	136	total:	2	idx:	2	data	53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E2A79D84E666
[2020-02-21 12:13:00.717]: 2DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002
[2020-02-21 12:13:00.717]: [I]-[mergelongsms]	num:	18812321243	data	8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4EBA774091CD51
[2020-02-21 12:13:00.717]: 736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744E0076F46CA16
[2020-02-21 12:13:00.717]: 7095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E2A
[2020-02-21 12:13:00.730]: 79D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002
[2020-02-21 12:13:00.731]: [I]-[longsmsmergecnf]	true	:	18812321243	:	8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4EBA774091CD
[2020-02-21 12:13:00.731]: 51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744E0076F46CA
[2020-02-21 12:13:00.731]: 167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E
[2020-02-21 12:13:00.731]: 2A79D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002	:	20/02/21,12:14:53+32
[2020-02-21 12:13:00.935]: [I]-[longsmsmergecnf beforemsg:]	8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4EBA774091CD51736CE876
[2020-02-21 12:13:00.935]: 84898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744E0076F46CA167095F975
[2020-02-21 12:13:00.935]: 23051C6786E7B54684830024E00822C67658BF4FF0C516C53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E2A79D84E66
[2020-02-21 12:13:00.950]: 62DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002

测试短信内容是:

超长的论是哪个行业,薪酬永远都是每个人着重关注的要点,而秘书的薪酬是多少也一直是许多人所好奇的,但却一直没有得到准确答案。一般来说,公司会给秘书发多少工资?汇总全国7万个秘书招聘后,得出的平均值为6570元/月。
@chenxuuu
Copy link
Collaborator

把卡插手机上会收到什么样的短信呢?

@cassc
Copy link
Author

cassc commented Feb 21, 2020

换卡到手机上是正常的。收到的就是上面发送的。

ucs2beToGb2312的输入内容是下面的,我在电脑端用java能正常解码。

8D85957F76848BBA662F54EA4E2A884C4E1AFF0C85AA916C6C388FDC90FD662F6BCF4E2A4EBA774091CD51736CE87684898170B9FF0C800C79D84E66768485AA916C662F591A5C114E5F4E0076F4662F8BB8591A4EBA6240597D59477684FF0C4F4653744E0076F46CA167095F97523051C6786E7B54684830024E00822C67658BF4FF0C516C53F84F1A7ED979D84E6653D1591A5C115DE58D44FF1F6C47603B516856FD00374E074E2A79D84E6662DB8058540EFF0C5F9751FA76845E735747503C4E3A00360035003700305143002F67083002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants