return ERRCODE_SUCC;
}
+#include "bleService.h"
+
+static uint32_t custom_bleservice_test(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
+{
+ UNUSED(strCommonCmd);
+
+ uint8_t argv[CUSTOM_UTILS_MAX_ARGC][CUSTOM_UTILS_MAX_ARGV_LEN] = { 0 };
+ uint32_t argc = 0;
+
+ int ret = ConvertCmdToParam(para, paraLen, argv, &argc);
+ if (ret != CUSTOM_UTILS_SUCCESS) {
+ PRINT("CUSTOM_UTILSTEST ATCMD Convert Command Failed\n");
+ return ERRCODE_FAIL;
+ }
+
+ if (argc != 1) {
+ PRINT("CUSTOM_UTILSTEST ATCMD Set Parameter Failed argc %d\n",argc);
+ return ERRCODE_FAIL;
+ }
+
+ int32_t _switch = atoi((char*)argv[0]);
+
+ if (_switch == 1)
+ {
+ openBle();
+ }else{
+ ble_unregist_server();
+ closeBle();
+ }
+
+ return ERRCODE_SUCC;
+}
+
static const at_cmd_table_t g_custom_utils_cmd[] = {
{ (char *)"AT^CUSTOM_SN", custom_utils_setsn, (char *)"123456789ABCDEF2345678" },
{ (char *)"AT^CUSTOM_SN_REQ", custom_utils_getsn, (char *)" " },
{ (char *)"AT^GSENSOR", custom_gsensor_getdata, (char *)" " },
{ (char *)"AT^GETTP", custom_get_tpinfo, (char *)" " },
+ { (char *)"AT^BLESERVICE", custom_bleservice_test, (char *)" " },
+
};
at_cmd_table_t *get_custom_utils_cmd_table(uint32_t *cmd_count)