修改了初次写入falsh 模组信息的bug
This commit is contained in:
parent
9455f1ee50
commit
e8968153d2
|
@ -186,7 +186,7 @@ static void urc_tcp_connect_state(struct at_client *client, const char *data, rt
|
|||
|
||||
if (sscanf(data, "+MIPOPEN:%d,%d", &id, &err_code) == 2)
|
||||
{
|
||||
socket_id = id;
|
||||
socket_id = id;
|
||||
{
|
||||
switch (err_code)
|
||||
{
|
||||
|
@ -954,7 +954,8 @@ static void ml307_init_thread_entry(void *parameter)
|
|||
result = -RT_ERROR;
|
||||
goto __exit;
|
||||
}
|
||||
if(*(uint32_t *)FLASH_IOT_IMEI_ADDR == 0xE339E339)
|
||||
LOG_D("*(rt_uint16_t *)FLASH_IOT_IMEI_ADDR = %#X", *(rt_uint16_t *)FLASH_IOT_IMEI_ADDR);
|
||||
if ((*(rt_uint16_t *)FLASH_IOT_IMEI_ADDR == 0xE339) || (*(uint16_t *)FLASH_IOT_IMEI_ADDR == 0x39E3))
|
||||
{
|
||||
#define ML307_NETDEV_HWADDR_LEN 8
|
||||
#define ML307_IMEI_LEN 15
|
||||
|
@ -1020,8 +1021,9 @@ static void ml307_init_thread_entry(void *parameter)
|
|||
rt_thread_mdelay(1000);
|
||||
}
|
||||
/* set network interface device hardware iccid */
|
||||
if(*(uint32_t *)FLASH_IOT_ICCID_ADDR == 0xE339E339)
|
||||
{
|
||||
LOG_D("*(rt_uint16_t *)FLASH_IOT_ICCID_ADDR = %#X", *(rt_uint16_t *)FLASH_IOT_ICCID_ADDR);
|
||||
if ((*(rt_uint16_t *)FLASH_IOT_ICCID_ADDR == 0xE339) || (*(uint16_t *)FLASH_IOT_ICCID_ADDR == 0x39E3))
|
||||
{
|
||||
|
||||
#define ML307_ICCID_LEN 20
|
||||
|
||||
|
@ -1045,9 +1047,10 @@ static void ml307_init_thread_entry(void *parameter)
|
|||
rt_memcpy(ml307.iccid, iccid, ML307_ICCID_LEN);
|
||||
Flash_Sys_Cfg(kIotIccidId, ml307.iccid, ML307_ICCID_LEN);
|
||||
}
|
||||
|
||||
LOG_D("*(rt_uint16_t *)FLASH_IOT_IMSI_ADDR = %#X", *(rt_uint16_t *)FLASH_IOT_IMSI_ADDR);
|
||||
/* set network interface device hardware imsi */
|
||||
if(*(uint32_t *)FLASH_IOT_IMSI_ADDR == 0xE339E339){
|
||||
if ((*(rt_uint16_t *)FLASH_IOT_IMSI_ADDR == 0xE339) || (*(uint16_t *)FLASH_IOT_IMSI_ADDR == 0x39E3))
|
||||
{
|
||||
|
||||
#define ML307_IMSI_LEN 15
|
||||
|
||||
|
|
Loading…
Reference in New Issue