开始调试PDU码,怎么也不对,总是返回error,
华为的文档现在真够差劲的,错误百出,真不知道现在华为的狼性哪去了,估计是老员工升官的升官,套现的套现,招点研究生本科生凑乎干。
/// 函数说明:
/// 11000D91和000800 0008B0(这个码可能要试试才行)
/// 10086发送数据为11000DA1 这里也很重要
/// </summary>
public string smsDecodedsms(string strCenterNumber, string strNumber, string strSMScontent)
{
string cmc = smsPDUEncoded(strSMScontent);
string s = "";
if (strNumber == "10086")
{
s = String.Format("{0}110005A1{1}0008B0{2}", smsDecodedCenterNumber(strCenterNumber), smsDecodedNumber(strNumber), cmc);
}
else
{
s = String.Format("{0}11000D91{1}0008B0{2}", smsDecodedCenterNumber(strCenterNumber), smsDecodedNumber(strNumber), cmc);
}
//string s = String.Format("{0}11000D91{1}{2}", smsDecodedCenterNumber(strCenterNumber), smsDecodedNumber(strNumber), cmc);
nLength = String.Format("{0:D2}", (s.Length - smsDecodedCenterNumber(strCenterNumber).Length) / 2); //获取短信内容加上手机号码长度
// nLength =String.Format("{0:D2}",(cmc.Length));
return s;
}