导航

    Freqchip开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 最新
    1. 主页
    2. Mars
    M
    • 继续与 Mars 聊天
    • 开始与 Mars 的新会话
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 主题
    • 帖子
    • 最佳
    • 群组

    Mars

    @Mars

    2
    声望
    270
    帖子
    4577
    资料浏览
    4
    粉丝
    0
    关注
    注册时间 最后登录

    Mars 关注

    Mars 发布的帖子

    • RE: 客户端扫描对端服务的问题

      可以在这个事件里面找到你要的服务,然后拿到对应的handle进行传输
      case GATTC_MSG_SVC_REPORT:
      {
      uint8_t spss_svc_uuid[UUID_SIZE_16]={0xbb, 0x5c, 0x49, 0xd2, 0x04, 0xa3, 0x40, 0x71, 0xa0, 0xb5, 0x35, 0x85, 0x3e, 0xb0, 0x83, 0x07};

      		gatt_uuid_t client_att_tb[2]={0};
      		gatt_svc_report_t *svc_rpt = (gatt_svc_report_t *)(p_msg->param.msg.p_msg_data);
      		
      		 
      		#if 1
      		for(uint8_t j=0; j<svc_rpt->end_hdl-svc_rpt->start_hdl; j++)
              if(memcmp(svc_rpt->info[j].att_value.uuid, spss_svc_uuid,16) == 0)
              {
                  for(uint16_t i = 0; i<(svc_rpt->end_hdl - svc_rpt->start_hdl); i++)
                  {
                   co_printf("info[%d].att_type:%d\r\n",i,svc_rpt->info[i].att_type);
                      if(svc_rpt->info[i].att_type == ATT_TYPE_CHAR_DECL)
                      {
                          if((svc_rpt->info[i].char_decl.prop & GATT_PROP_NOTI) && handles_scan[0] == 0)
      					{
                              handles_scan[0] = svc_rpt->info[i].char_decl.handle;
      						co_printf("decl, prop:%x,handle:%d\r\n",svc_rpt->info[i].char_decl.prop, handles_scan[0]);
      					
      					}
                          if((svc_rpt->info[i].char_decl.prop & GATT_PROP_WRITE_CMD) && handles_scan[1] == 0)
      					{
                              handles_scan[1] = svc_rpt->info[i].char_decl.handle;
      						client_att_tb[0].size = svc_rpt->info[i].att_value.uuid_len;
                              memcpy(client_att_tb[0].p_uuid, svc_rpt->info[i].att_value.uuid, client_att_tb[0].size);
      						co_printf("decl, prop:%x,handle:%d\r\n",svc_rpt->info[i].char_decl.prop, handles_scan[1]);
      

      // gatt_add_client_uuid((gatt_uuid_t*)client_att_tb[0].p_uuid,3,0,handles_scan);
      }
      }
      if(svc_rpt->info[i].att_type == ATT_TYPE_VAL)
      {
      //co_printf("att_val, uuid_len:%d,uuid:",svc_rpt->info[i].att_value.uuid_len);
      //show_reg(svc_rpt->info[i].att_value.uuid,svc_rpt->info[i].att_value.uuid_len,1);
      if( i == (handles_scan[0] - svc_rpt->start_hdl - 1))
      {
      client_att_tb[0].size = svc_rpt->info[i].att_value.uuid_len;
      memcpy(client_att_tb[0].p_uuid, svc_rpt->info[i].att_value.uuid, client_att_tb[0].size);
      }
      else if( i == (handles_scan[1] - svc_rpt->start_hdl - 1))
      {
      client_att_tb[1].size = svc_rpt->info[i].att_value.uuid_len;
      memcpy(client_att_tb[1].p_uuid,svc_rpt->info[i].att_value.uuid,client_att_tb[1].size);
      }
      }
      if(svc_rpt->info[i].att_type == ATT_TYPE_DESC)
      {
      //co_printf("desc, uuid_len:%d,uuid:",svc_rpt->info[i].att_value.uuid_len);
      //show_reg(svc_rpt->info[i].att_value.uuid,svc_rpt->info[i].att_value.uuid_len,1);
      }
      }
      }
      #endif

      	//	 gatt_add_client_uuid();
      		co_printf("UUID Start:");
      		for (uint8_t i = 0; i < svc_rpt->uuid_len; i++)
      			co_printf("%02x ", svc_rpt->uuid[i]);
      		co_printf("\r\n");
      		
      		co_printf("Handle_Len:%d, Start_Handle:%d - End_Handle:%d\r\n", svc_rpt->uuid_len, svc_rpt->start_hdl, svc_rpt->end_hdl);
      		 
      		 for(uint8_t j=0; j<svc_rpt->end_hdl-svc_rpt->start_hdl; j++)
      		{
      			co_printf("att_value uuid->:");
      			for (uint8_t i = 0; i < svc_rpt->info[j].att_value.uuid_len; i++)
      				co_printf("%02x ", svc_rpt->info[j].att_value.uuid[i]);
      			co_printf(" ;\r\n");
      			co_printf("handle: %02x \r\n", svc_rpt->info[j].char_decl.handle);
      
      		 }
      		co_printf("UUID END\r\n");
      		os_timer_start(&time_send_id, 3000,1);
          }
          break;
      发布在 FR801xH
      M
      Mars
    • RE: Keil v5.38 how to setup it to compile the ble_simple_peripheral ?

      @sekibetu keil V5 53x will compile errors, need to install 525 after the installation, and then overwrite the installation is also possible
      pack:https://keilpack.azureedge.net/pack/ARM.CMSIS.5.9.0.pack
      keli V5 528 https://armkeil.blob.core.windows.net/eval/MDK528.EXE

      发布在 FR801xH
      M
      Mars
    • RE: 连接不上esp32

      怎么个连接不上 有扫描到设备了吗,发起链接了吗 连接失败报什么错误

      发布在 FR800x
      M
      Mars
    • RE: Keil v5.38 how to setup it to compile the ble_simple_peripheral ?

      https://gitee.com/YgqMars/freqchip0_1755176757347_ca01c05d-d22f-4ac4-9ac2-ff24c026ed80-image.png
      1、It is recommended that you use it keil V528 https://armkeil.blob.core.windows.net/eval/MDK528.EXE
      2、Solve pop-up window M3 to install this .pack

      发布在 FR801xH
      M
      Mars
    • RE: warning: L6314W: No section matches pattern *(STACK).

      没有影响,你用lvgl的话你用这个例程https://gitee.com/http1520/lvgl_knob_open_demo

      发布在 FR800x
      M
      Mars
    • RE: 关于FR800X使用FR800x program Tool进行烧录的问题,第一次烧录成功后,后面的写入变成灰色无法进行第二次烧录。

      0_1754470658531_3f826fb3-e573-4fc3-9042-657ed87c1f55-image.png
      看一下这个文档怎么使用这个烧录器

      发布在 FR800x
      M
      Mars
    • RE: fr8016ha的16位adc有用在测量应用吗

      只有10位没有16位
      0_1754359531213_6f32bb09-ea28-4708-bbb5-84d6048225ba-image.png

      发布在 FR801xH
      M
      Mars
    • RE: 8016ha 的栈大小怎么设置?

      void initial_static_memory( uint8_t act_num, //
      uint8_t adv_act_num, //广播链路
      uint8_t con_num, //连接链路
      uint8_t rx_buf_num,// 链路层接收缓冲
      uint16_t rx_buf_size,// 链路层最大接收长度
      uint8_t tx_buf_num, //发送缓冲
      uint16_t tx_buf_size,//发送长度
      uint16_t max_adv_size,//最大广播长度
      uint16_t stack_size);//堆栈深度

      /*********************************************************************

      • @fn user_init_static_memory
      • @brief set memory.
      • @param None.
      • @return None.
      • initial_static_memory(22, 2, 20, 20, 27, 20, 27, 254, 0x800);
        /
        void user_init_static_memory(void)
        {
        /
        • activity: init, adv+con, scan, pb-adv, pb-gatt (adv + con)
        • adv: adv * 2 * 2, pb-adv + 1, pb-gatt *2 * 2
        • con: init, pb-gatt*2
          */
          //initial_static_memory(7, 5, 3, 8, 40, 8, 27, 37, 0x1000);
          // initial_static_memory(7, 2, 5, 20, 27, 20, 27, 64, 0x1000);
          initial_static_memory(4, 2, 2, 8, 251, 8, 251, 64, 0x1000);
          }
      发布在 FR801xH
      M
      Mars
    • RE: FR801xH能不能控制手机音量

      能控制音量,在拍照页面按音量键就可以拍照,但是不能接通和挂断,可以使用下面的例程,发送对应的值,具体也可以百度
      0_1753753827116_9d1f96b5-f11b-44bc-bcd0-2bdb733e4acd-image.png 0_1753753926278_d1dc8dc6-0a9f-4d46-b708-a67ee9894ad2-image.png !0_1753754244977_6058bfe9-e770-4cb3-9ae7-f46faa862a73-image.png

      发布在 FR801xH
      M
      Mars
    • RE: FR3032D低功耗唤醒休眠

      sleep参考这个文档的讲解https://gitee.com/YgqMars/freqchip/tree/master
      0_1753430425652_3e33b952-50ef-4680-a8c2-f90e449b004c-image.png

      发布在 FR303x
      M
      Mars