mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
Owner: meige
打印 prevThread nextThread

适配BVCSP.h接口出现问题

[copyURL]

1

主题

306

帖子

1087

积分

vipMem

Rank: 6Rank: 6

积分
1087
41#
poston 2019-6-4 18:16 | authorOnly
meige post on2019-6-4 17:44
void  PU_OnAuthEvent(struct BVRAuthParam* param, enum BVRAuthResult result, enum BVRPermission* per ...

// 这个是我这边调用流程。
CallAuth(2);
static void CallAuth(int request){

        BVRAuthParam param;
        memset(&param, 0, sizeof(param));

        param.iSize = sizeof(param);
        // 参数对应改下
        strcpy(param.termInfo.CPU, "ARM");
        strcpy(param.termInfo.Desc, "Besovideo copyright");
        strcpy(param.termInfo.HardwareProvider, lo_billRequest.stEntity.szBrand);
        strcpy(param.termInfo.HardwareSN, lo_billRequest.stEntity.szFingerPrint);
        strcpy(param.termInfo.HardwareVersion, "1.0");
        strcpy(param.termInfo.ID, lo_billRequest.szAppDeviceID);
        strcpy(param.termInfo.IMEI, lo_billRequest.stEntity.szDeviceID);
        strcpy(param.termInfo.MAC, lo_billRequest.stEntity.szMacAddress);
        strcpy(param.termInfo.ModelNumber, lo_billRequest.stEntity.szModel);
        strcpy(param.termInfo.DeviceModelNumber, lo_billRequest.stEntity.szModel);
        strcpy(param.termInfo.OSID, lo_billRequest.stEntity.szAndroidID);
        strcpy(param.termInfo.OSType, "Android");
        sprintf(param.termInfo.OSVersion,"%d", lo_billRequest.stEntity.iAPILevel);
        strcpy(param.termInfo.SoftwareProvider, "Besovideo");
        strcpy(param.termInfo.SoftwareVersion, "v1.0");
        strcpy(param.termInfo.Type, lo_billRequest.szAppType);
        strcpy(param.termInfo.UserLabel,lo_billRequest.szUserLabel);
        LOGI("CallAuth lo_billRequest.szProductKey = %s", lo_billRequest.szProductKey);
        strcpy(param.termInfo.ProductKey,lo_billRequest.szProductKey);

        AU_RSA* rsa = NULL;

        char* n = "xxxxxxxxxxxxxx";
        char* e = "xxxxxxxxxxxxxxx";
        char data[256];
        int data_len = 0;
        int len = 0;
        char base64[512];
        int base64_len;

        char encrypt[512];
        int encrypt_len = 0;

        data_len = sizeof(data);
        memset(data, 0, sizeof(data));

        encrypt_len = sizeof(encrypt);
        memset(encrypt, 0, sizeof(encrypt));

        base64_len = sizeof(base64);
        memset(base64, 0, sizeof(base64));

        au_rsa_init();
        au_rsa_key_get_hex(&rsa, n, e, NULL);

        // 获取需要字符串
        BVCSP_GetEncryptedData(data, &data_len);
        len = au_rsa_encrypt(rsa, data, data_len, encrypt, encrypt_len);
        if (len > 0) {
                base64_len = base64_encode((const unsigned char*) encrypt, len, base64);
                strcpy(param.appInfo.appId, "app_xxxxxxxxx");
                param.appInfo.ciph_data = base64;
                param.appInfo.ciph_len = strlen(base64);
        }

        if(strlen(lo_billRequest.szInnerInfo) > 0){
                param.innerInfo.ciphertext = lo_billRequest.szInnerInfo;
                param.innerInfo.length = strlen(lo_billRequest.szInnerInfo)+1;
        }

        memcpy(param.SerialNumber, lo_billRequest.szSerialNumber, 128);

        param.user_data = (void*)request;

        param.OnAuthEvent = BVOnAuthEvent;
        param.OnMessage =BVOnMessage;

#if 1
        BVCU_Result br = BVCSP_Auth(&param);
        if(BVCU_Result_FAILED(br)){
                LOGI("auth call error!");
        }else{
                LOGI("auth call success!");
        }
#endif
        LOGI("***************>> request: %d\n", request);
}

reply agree Against

使用道具 report

11

主题

157

帖子

533

积分

advMem

Rank: 4

积分
533
42#
 Owner| poston 2019-6-4 20:21 | authorOnly
tony258 post on2019-6-4 18:02
1. 打印的log信息帖下,尽量全  2. 在android上测试下47.107.87.21:18866是否通

1.[2019/06/04 20:13:38:8466] NOTICE: libwebsockets version: 3.1.0 unknown-build-hash
BVCSP so init success
Login success
-65522
AuthPu start
GetEncryptedData success
0
open EncryptData bvReulst =
BVCSP_Auth start
[D] [06-04 20:13:38] [push:1037] auth randcode: 324808
BVCSP_Auth success
0
Authentication Interface Call Successful
[D] [06-04 20:13:38] [connect:0217] connect 47.107.87.21 : 18866 ...
slb789:/system/bin # ping 47.107.87.21:18866
ping: unknown host 47.107.87.21:18866
我参数修改成android的参数,还是没有回调
2.问下如何在android设备测试47.107.87.21:18866是否通
reply agree Against

使用道具 report

2

主题

414

帖子

1188

积分

vipMem

Rank: 6Rank: 6

积分
1188
43#
poston 2019-6-4 20:37 | authorOnly
meige post on2019-6-4 20:21
1.[2019/06/04 20:13:38:8466] NOTICE: libwebsockets version: 3.1.0 unknown-build-hash
BVCSP so ini ...

ping通这个ip就行了
reply agree Against

使用道具 report

6

主题

175

帖子

1258

积分

vipMem

Rank: 6Rank: 6

积分
1258
44#
poston 2019-6-4 20:46 | authorOnly
此外,别忘记了用我们标准的MPU/MCP软件做对比测试。
用成品的APP跟你们用SDK编译出来的做对比排查。
标准APP的公开下载URL:

http://up.besovideo.com:7780/mpu_na.apk

http://up.besovideo.com:7780/MCP.apk

MCP=MPU(执法仪947规范录传-编码+推流)+MCU(取流+解码,即手机客户端功能)+公网对讲PoC(双向视频对讲)+警用微信(警用多媒体通信,警讯发布)
reply agree Against

使用道具 report

11

主题

157

帖子

533

积分

advMem

Rank: 4

积分
533
45#
 Owner| poston 2019-6-5 09:15 | authorOnly
xuwei post on2019-6-4 20:37
ping通这个ip就行了

这个ip 47.107.87.21,ping不通。
reply agree Against

使用道具 report

0

主题

22

帖子

90

积分

member

Rank: 2

积分
90
46#
poston 2019-6-5 09:38 | authorOnly
meige post on2019-6-5 09:15
这个ip 47.107.87.21,ping不通。

你好,服务器关闭了ping服务. 可以在android上建立tcp连接,测试是否能连接成功
reply agree Against

使用道具 report

11

主题

157

帖子

533

积分

advMem

Rank: 4

积分
533
47#
 Owner| poston 2019-6-5 09:39 | authorOnly
lihui2006 post on2019-6-4 20:46
此外,别忘记了用我们标准的MPU/MCP软件做对比测试。
用成品的APP跟你们用SDK编译出来的做对比排查。
标 ...

MPU app是能认证,登入的。
reply agree Against

使用道具 report

1

主题

306

帖子

1087

积分

vipMem

Rank: 6Rank: 6

积分
1087
48#
poston 2019-6-5 09:40 | authorOnly
meige post on2019-6-5 09:15
这个ip 47.107.87.21,ping不通。

服务器那边说不允许ping。 用这个ip和端口建立一个socket连接试下。另外调用auth之后,如果一直连不上服务器,回调里会回复一个超时,时间挺长,多等一会以测试回调流程是否正常。
reply agree Against

使用道具 report

11

主题

157

帖子

533

积分

advMem

Rank: 4

积分
533
49#
 Owner| poston 2019-6-5 11:10 | authorOnly
Arthur post on2019-6-5 09:40
服务器那边说不允许ping。 用这个ip和端口建立一个socket连接试下。另外调用auth之后,如果一直连不上服 ...

认证,已经成功,非常感谢支持!
Authentication Interface Call Successful
[D] [06-05 11:07:58] [connect:0217] connect 47.107.87.21 : 18866 ...
[D] [06-05 11:07:58] [callback_auth:0123] create  LWS_CALLBACK_WSI_CREATE
[D] [06-05 11:07:58] [wsOnConnected:0342]
[D] [06-05 11:07:58] [wsOnReceive:0476] debug cmd, type: 2, result: 1024, msg: success
[D] [06-05 11:07:58] [onRVDecryption:0544] is auth server
[D] [06-05 11:07:59] [wsOnReceive:0476] debug cmd, type: 5, result: 1024, msg: success
[D] [06-05 11:07:59] [onRVAES:0563] get aes key iv
[I] [06-05 11:07:59] [wsOnWriteable:0525] send success
[D] [06-05 11:07:59] [wsOnReceive:0476] debug cmd, type: 50, result: 52, msg: auth wait
[D] [06-05 11:07:59] [onRVLogin:0662] auth fail: 52, 52, , error: auth wait
open OnAuthEvent start

---------------
         result: 52
         rand code: 263662
         auth code: 3607
         SerialNumber:
         issuer:
         type: Android
         id: PU_100100AE
         user_data: 0
         result: auth wait
         ---------------
successful application for trial
[I] [06-05 11:07:59] [wsOnWriteable:0525] send success
[D] [06-05 11:07:59] [wsOnReceive:0476] debug cmd, type: 54, result: 6, msg: company of meigchina un support trail
open OnAuthEvent start

---------------
         result: 6
         rand code: 263662
         auth code: 3607
         SerialNumber:
         issuer:
         type: Android
         id: PU_100100AE
         user_data: 0
         result: company of meigchina un support trail
         ---------------
Login szServerAddr=192.168.0.175
Login iServerPuPort=9701
Login success11
-65522

现在登入失败,帮忙看看,谢谢!
reply agree Against

使用道具 report

13

主题

373

帖子

2023

积分

vipMem

Rank: 6Rank: 6

积分
2023
50#
poston 2019-6-5 11:24 | authorOnly
兄弟,你 也多费心,多研究下,多调试下就都解决了。
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-4-20 14:07 , Processed in 0.072269 second(s), 18 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList