Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ble_remote_control示例中直接修改val_batt_level无法在手机中看到电量变化 (AEGHB-744) #385

Open
3 tasks done
jinsc123654 opened this issue Jul 20, 2024 · 0 comments

Comments

@jinsc123654
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

V5.1.2

Espressif SoC revision.

ESP32S3mini

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

Custom board

Power Supply used.

USB

What is the expected behavior?

image
在这段代码中增加电量显示,在ble调试助手中应当看到对应的hex值

What is the actual behavior?

image

实际ble调试助手永远是0

Steps to reproduce.

仅仅按照注释修改为下方代码
while (true) {
DELAY(HID_LATENCY);

    if (!is_connected) {
        ESP_LOGI(HID_DEMO_TAG, "Not connected, do not send user input yet");
        extern uint8_t val_batt_level;
        val_batt_level+=1;
        DELAY(3000);
        continue;
    }

Debug Logs.

I (342) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (349) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (355) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (362) spi_flash: detected chip: gd
I (366) spi_flash: flash io: dio
W (370) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (383) sleep: Configure to isolate all GPIO pins in sleep state
I (390) sleep: Enable automatic switching of GPIO sleep configuration
I (397) coexist: coex firmware version: b6d5e8c
I (402) coexist: coexist rom version e7ae62f
I (407) app_start: Starting scheduler on CPU0
I (412) app_start: Starting scheduler on CPU1
I (412) main_task: Started on CPU0
I (422) main_task: Calling app_main()
I (422) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1 
W (432) system_time: Register shutdown handler failed, err = 0x103
I (452) BLE_INIT: BT controller compile version [59725b5]
I (452) BLE_INIT: Bluetooth MAC: dc:54:75:c4:37:02

I (452) phy_init: phy_version 620,ec7ec30,Sep  5 2023,13:49:13
I (522) HID_REMOTE_CONTROL: BLE configured
I (522) HID_REMOTE_CONTROL: GAP and GATTS Callbacks registered
I (522) HID_REMOTE_CONTROL: Security set
I (532) HID_RC_GAP_GATTS: Register GATTS profile
I (532) HID_RC: Profile Registered, app_id 1812, status 0
W (542) BT_BTM: BTM_BleWriteAdvData, Partial data write into ADV
I (552) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 22
I (552) HID_RC: Create attribute table successfully, table size = 4
I (562) HID_RC: Service Instance ID: 1, UUID: 0x180f
I (562) HID_RC: Attribute Table Length: 4
I (572) HID_RC: Create attribute table successfully, length = 4

I (572) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 22
I (582) HID_RC: Create attribute table successfully, table size = 5
I (592) HID_RC: Service Instance ID: 2, UUID: 0x180a
I (592) HID_RC: Attribute Table Length: 5
I (602) HID_RC: Create attribute table successfully, length = 5

I (612) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 22
I (612) HID_RC: Create attribute table successfully, table size = 12
I (622) HID_RC: Service Instance ID: 0, UUID: 0x1812
I (622) HID_RC: Attribute Table Length: 12
I (632) HID_RC: Create attribute table successfully, length = 12

I (642) HID_RC_GAP_GATTS: ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT
I (652) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 12
I (652) HID_RC: Start Service Successful, service_handle 40
I (662) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 12
I (662) HID_RC: Start Service Successful, service_handle 44
I (672) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 12
I (682) HID_RC: Start Service Successful, service_handle 49
I (682) HID_RC_GAP_GATTS: GAP Start Advertising Success

I (692) CONTROLLER: Console input usage:
I (692) CONTROLLER:      Top Left(q)             Top Center(w)                   Top Right(e)
I (702) CONTROLLER:      Middle Left(a)          Middle Center(s)        Middle Right(d)
I (712) CONTROLLER:      Bottom Left(z)          Bottom Center(x)        Bottom Right(c)
I (712) CONTROLLER: Press Enter to send input, make sure caps lock is off

I (722) HID_REMOTE_CONTROL: Not connected, do not send user input yet
I (3732) HID_REMOTE_CONTROL: Not connected, do not send user input yet
I (6732) HID_REMOTE_CONTROL: Not connected, do not send user input yet
I (8192) HID_RC: Profile Receiving a new connection, conn_id 0
I (8582) HID_RC_GAP_GATTS: Update connection params status = 0, min_int = 0, max_int = 0,conn_int = 6,latency = 0, timeout = 500
I (9002) HID_RC_GAP_GATTS: Update connection params status = 0, min_int = 0, max_int = 0,conn_int = 24,latency = 0, timeout = 500
I (9732) HID_REMOTE_CONTROL: Not connected, do not send user input yet
I (9872) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 1
I (9872) HID_RC: Read by Client, conn_id : 0, handle: 42, need response: no
I (9882) HID_RC: Remote BD Addr 57f3ea9cd09a
I (10202) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 1
I (10202) HID_RC: Read by Client, conn_id : 0, handle: 42, need response: no
I (10212) HID_RC: Remote BD Addr 57f3ea9cd09a
I (10472) HID_RC_GAP_GATTS: GATTS to be handled by profile, event 1
I (10472) HID_RC: Read by Client, conn_id : 0, handle: 42, need response: no
I (10482) HID_RC: Remote BD Addr 57f3ea9cd09a
I (10652) HID_RC_GAP_GATTS: Unhandled GAP_EVT, event 55

I (12732) HID_REMOTE_CONTROL: Not connected, do not send user input yet
I (15732) HID_REMOTE_CONTROL: Not connected, do not send us

More Information.

No response

@github-actions github-actions bot changed the title ble_remote_control示例中直接修改val_batt_level无法在手机中看到电量变化 ble_remote_control示例中直接修改val_batt_level无法在手机中看到电量变化 (AEGHB-744) Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants