1. 解决PWM 更新导致周期混乱继而亮度抖动的问题

2. 增加无论何种状态都能强制复位的机制
3. 添加设备注册检查机制,如果设备已经处于配网但是还是注册的状态,强制进行一次复位
4. 添加串口控制协议
This commit is contained in:
2025-10-26 17:18:59 +08:00
parent a16c05db7b
commit 21c6d05bad
18 changed files with 2378 additions and 81 deletions

View File

@@ -54,11 +54,15 @@ errcode_t SsapsAddDescriptorSync(uint8_t serverId, uint16_t serviceHandle, uint1
return ssaps_add_descriptor_sync(serverId, serviceHandle, propertyHandle, (ssaps_desc_info_t *)descriptor);
}
#define DEFAULT_SLE_SPEED_MTU_SIZE 1500
errcode_t SsapsStartService(uint8_t serverId, uint16_t serviceHandle)
{
SsapcExchangeInfo info = {0};
info.mtuSize = DEFAULT_SLE_SPEED_MTU_SIZE;
info.version = 1;
SsapsSetInfo(serverId, &info);
return ssaps_start_service(serverId, serviceHandle);
}
errcode_t SsapsDeleteAllServices(uint8_t serverId)
{
return ssaps_delete_all_services(serverId);

View File

@@ -294,7 +294,7 @@ static void HILINK_BT_StateChangeHandler(HILINK_BT_SdkStatus event, const void *
HILINK_SAL_ERROR("set addr err\n");
}
/* 设置蓝牙广播格式,包括靠近发现、碰一碰等,下一次发送广播生效 */
BLE_SetAdvType(BLE_ADV_NEARBY_V0);
BLE_SetAdvType(BLE_ADV_LOCAL_NAME);
/* BLE配网广播控制参数代表广播时间0:停止0xFFFFFFFF:一直广播,其他:广播指定时间后停止,单位秒 */
if(ble_adv_time) {
@@ -617,7 +617,7 @@ int hilink_ble_main(void)
}
/* 设置广播方式为靠近发现 */
BLE_SetAdvType(BLE_ADV_NEARBY_V0);
BLE_SetAdvType(BLE_ADV_LOCAL_NAME);
/* 初始化ble sdk */
ret = BLE_CfgNetInit(&g_bleInitParam, &g_bleCfgNetCb);

View File

@@ -18,7 +18,7 @@
#define APP_BIN_ADDR (APP_PROGRAM_ORIGIN - FLASH_START - 0x300)
#define CODE_AREA_HASH_OFFSET 0x128
bool hexify(const unsigned char *inBuf, unsigned int inBufLen, char *outBuf, unsigned int outBufLen)
bool hexify(const unsigned char *inBuf, unsigned int inBufLen, char *outBuf, unsigned int outBufLen)
{
if (outBufLen < HEXIFY_LEN(inBufLen)) {
return false;
@@ -91,4 +91,4 @@ int hilink_indie_upgrade_main(void)
return 0;
}
#endif
#endif

View File

@@ -30,7 +30,7 @@ extern "C" {
#define DEVICE_HIVERSION "1.0.0"
/* 设备固件版本号 */
#define FIRMWARE_VER "1.0.13"
#define FIRMWARE_VER "1.0.6"
/* 设备硬件版本号 */
#define HARDWARE_VER "1.0.0"
/* 设备软件版本号 */

View File

@@ -112,7 +112,7 @@ int HILINK_GetDevInfo(HILINK_DevInfo *devinfo)
return -1;
}
HILINK_SAL_DEBUG("HILINK_GetDevInfo manuName: [%s]\r\n", devinfo->manuName);
#ifdef CONFIG_SUPPORT_HILINK_INDIE_UPGRADE
#if 0 //def CONFIG_SUPPORT_HILINK_INDIE_UPGRADE
err = sprintf_s(devinfo->fwv, sizeof(devinfo->fwv), "%s_%s_%s", "103","1.312", FIRMWARE_VER);
if (err <= 0) {
HILINK_SAL_ERROR("sprintf_s err:%d\r\n", err);
@@ -632,6 +632,7 @@ void HILINK_NotifyDevStatus(int status)
case HILINK_LINK_CONNECTED_WIFI:
/* 设备已经连上路由器,请在此处添加实现 */
hf_set_wifi_state(1);
handle_device_online();
break;
case HILINK_M2M_CONNECTTING_CLOUD:
/* 设备正在连接云端,请在此处添加实现 */