|
现遇到如下情况:
1,使用wifi 进行认证后 再使用电信4g卡的情况下 需要重新认证,经发现仅wifi情况下获取的imei和电信卡获取的imei(其实获取的是meid)是不一样的,
就导致同一台设备在使用wifi 和电信卡的时候需要认证两次。
电信卡认证日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"99000843131692","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}
设备id 23131692 图传认证id 38101
wifi认证日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"ky62otrHVz8VCLe29kWqn7fU1URkTtQws/asOVr0BND9qmsBYXPjogKHm4YFClv6C894giiEraRC+8g4qo0skgGz+JUx8V86b0/Aql56HhJ3FFASydooE77e84Ohnx6E9S8kgVI2KwXexvc+f10n1Zd6fX7Nh4StMO3YjbMQS8jipPrhD2lhiKQlxpBaxI9dlXkFke80KCnCTj0dqDqmWA6BDDmCEVzCo4KGP45M14wvvV2IA/WylbUbTmJXxCba","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}
设备id 图传认证id 38101
从上诉日志可以看出 两次得到的szDeviceID 是不一样的 4g电信卡的szDeviceID 是 99000843131692 wifi 的szDeviceID 是 990008431316921
2,发现上述问题后,我们对认证的代码进行了优化,wifi和4g电信卡的情况下都上传的是imei号码
电信4g卡认证的日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 400, "szAuthType":"auth.type.trial"}
获取认证id的时候提示认证失败
wifi认证的日志:
{"stEntity":{"iAPILevel":27,"iDensityDpi":160,"iHeightPixels":320,"iWidthPixels":240,"szAndroidID":"382f3519bf0ec2f6","szBoard":"msm8953","szBrand":"DSJ","szBuildTime":"1556129687000","szDeviceID":"990008431316921","szFingerPrint":"DSJ/LB1807/LB1807:8.1.0/OPM1.171019.011/LB1807.4.01.03.00:userdebug/release-keys","szHardware":"qcom","szMacAddress":"02:00:00:00:00:00","szModel":"LB01","szRadio":".TA.2.3.c1-00652-8953_GEN_PACK-1"},"szAuthParam":"NULL","szLicense":"F88291D8-E4AD-45E7-8B79-B081E93BB586","szPath":"/storage/emulated/0"}
auth---->{"iAuthStatus": 200, "szAuthType":"auth.type.imei"}
可以获取到认证id
从上诉的两份log可以看出 电信4g 和wifi 认证时 上传的 szDeviceID 都是 990008431316921 (整个认证上传的参数都是一样的)
但是返回的结果不一样 ,电信4g卡的返回结果中szAuthType 是 auth.type.trial 而 wifi认证返回的结果szAuthType 是 auth.type.imei
总结上面论述的结论是,wifi 和电信4g卡的认证存在差异,当上传的认证参数不一样时,同一台设备需要认证两次;
当优化后上传相同的认证参数时返回的结果不同,导致4g卡情况下无法认证,无法使用图传。
|
|