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

Not able to interract with BLE API via protobuf #505

Closed
h3lgi opened this issue Apr 1, 2024 · 1 comment
Closed

Not able to interract with BLE API via protobuf #505

h3lgi opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@h3lgi
Copy link

h3lgi commented Apr 1, 2024

Component
BLE API + Protobuf

Describe the bug
I am implementing a master device that has to configure and start the RTMP streaming on the GoPro Hero9. The device is based on esp32s3 and I cannot use the GoPro access point.

By following the protocol description I implemented the protocol itself and some basic commands.
All TLV commands are working as expected which is not the case with the protobuf once. When the command or response is bigger than 20 bytes I am not receiving anything or receiving the RESULT_ILL_FORMED

I rechecked the packetization a few times and it follows the rules in the protocol description:
[ header with <5/13/16 bitmask> and <message length> ] [ <feature ID> ] [ <Action ID> ] [ <data> ]
if it is longer than 20 bytes.
[ <continuation header counting from 0 > and <continuation mask>] [ <data> ]

To Reproduce
Steps to reproduce the behavior with scan for access points command

  1. Connect and pair with the camera
  2. Subscribe to all readable characteristics
  3. Send command to start scanning: 0x2 0x2 0x2
  4. Await start scan response and receiving: 0x6 0x2 0x82 0x8 0x1 0x10 0x2 which is decoded to:
{
  "result":  1,
  "scanning_state": 2
}
  1. Waiting for start scanning notification and receiving: 0xa 0x2 0xb 0x8 0x5 0x10 0x2 0x18 0xf 0x20 0x0 which is decoded to:
{
  "scanning_state": 5,
  "scan_id": 2,
  "total_entries": 15,
  "total_configured_ssid": 0
}
  1. Sending request to request entries: 0x8 0x2 0x4 0x8 0x0 0x10 0xf 0x18 0x2 encoded from:
{
  "start_index": 0,
  "max_entries": 15,
  "scan_id": 2
}
  1. Waiting response and receiving: 0x8 0x2 0x84 0x8 0x2 0x10 0x0 0x18 0x0 which cannot be decoded to ResponseGetApEntries protobuf message.

Similar behavior with the other protobuf formated commands:

  • RequestConnectNew : no response or notification
  • RequestSetLiveStreamMode: no response or notification

Expected behavior
Receiving decodable response or reaction to protobuf commands over BLE

Hardware

  • esp32 S3: as remote control device
  • nanoPb: as protobuf serializer
  • BLE: as protocol
  • GoPro Hero9 Black
  • Camera firmware version: v1.72
@h3lgi h3lgi added the bug Something isn't working label Apr 1, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Apr 1, 2024
@h3lgi
Copy link
Author

h3lgi commented Apr 3, 2024

Well, it was partially related to issue #494 and the wrong endian in the bit masks on my package formation algorithm.

@h3lgi h3lgi closed this as completed Apr 3, 2024
@tcamise-gpsw tcamise-gpsw added documentation Improvements or additions to documentation and removed triage Needs to be reviewed and assigned labels Apr 9, 2024
@tcamise-gpsw tcamise-gpsw self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants