我以前只手动发布这个命令,从来没有见过它不完整,所以不能确认。我不确定检查句柄是必要的,尽管——从一个干净的板岩开始,句柄总是被分配相同的顺序,所以我只需把句柄硬编码成字符。ErristAccess命令;第一个特性总是0072,并且我认为它们从那里增加了2。在启动过程中,通过执行句柄的读取来检查最后一个特性是否存在。如果这产生错误,我擦除设备(PZ)并重写所有服务/特性。这是初始设备需要的真正必要的,因为此后服务/特性持续存在。
以上来自于百度翻译
以下为原文
I have only ever issued this command manually and have never seen it not complete so can't confirm.
I am not sure that checking the handles is necessary, though - AFAIK the handles are always assigned the same sequence when starting from a clean slate, so I just hard-code the handle into the characteristic access commands; the first characteristic is always 0072 and I think they increment by 2 from there.
On boot up I check if the last characteristic exist by performing a read from its handle. If this produces an error, I wipe the device (PZ) and rewrite all services/characteristics. This is only really necessary for initial device bring-up as the services/characteristics persist thereafter.
我以前只手动发布这个命令,从来没有见过它不完整,所以不能确认。我不确定检查句柄是必要的,尽管——从一个干净的板岩开始,句柄总是被分配相同的顺序,所以我只需把句柄硬编码成字符。ErristAccess命令;第一个特性总是0072,并且我认为它们从那里增加了2。在启动过程中,通过执行句柄的读取来检查最后一个特性是否存在。如果这产生错误,我擦除设备(PZ)并重写所有服务/特性。这是初始设备需要的真正必要的,因为此后服务/特性持续存在。
以上来自于百度翻译
以下为原文
I have only ever issued this command manually and have never seen it not complete so can't confirm.
I am not sure that checking the handles is necessary, though - AFAIK the handles are always assigned the same sequence when starting from a clean slate, so I just hard-code the handle into the characteristic access commands; the first characteristic is always 0072 and I think they increment by 2 from there.
On boot up I check if the last characteristic exist by performing a read from its handle. If this produces an error, I wipe the device (PZ) and rewrite all services/characteristics. This is only really necessary for initial device bring-up as the services/characteristics persist thereafter.
举报