diff --git a/demos/python/sdk_wireless_camera_control/docs/changelog.rst b/demos/python/sdk_wireless_camera_control/docs/changelog.rst
index 06f2b7f7..111caecf 100644
--- a/demos/python/sdk_wireless_camera_control/docs/changelog.rst
+++ b/demos/python/sdk_wireless_camera_control/docs/changelog.rst
@@ -9,9 +9,10 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog `_,
and this project adheres to `Semantic Versioning `_.
-Unreleased
-----------
+0.16.1 (April-23-2024)
+----------------------
+* Always use extended headers
* Add Delete Media HTTP API's
* Add port argument to Preview Stream HTTP API
* Only ask for sudo password when required
diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py b/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py
index fefd5158..cbfe3b3a 100644
--- a/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py
+++ b/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py
@@ -89,13 +89,13 @@ async def read(self, handle: bleak.BleakClient, uuid: BleUUID) -> bytearray:
logger.debug(f'Received response on BleUUID [{uuid}]: {response.hex( ":")}')
return response
- async def write(self, handle: bleak.BleakClient, uuid: BleUUID, data: bytearray) -> None:
+ async def write(self, handle: bleak.BleakClient, uuid: BleUUID, data: bytes) -> None:
"""Write data to a BleUUID.
Args:
handle (bleak.BleakClient): Device to write to
uuid (BleUUID): characteristic BleUUID to write to
- data (bytearray): data to write
+ data (bytes): data to write
"""
logger.debug(f"Writing to {uuid}: {uuid.hex}")
await handle.write_gatt_char(uuid2bleak_string(uuid), data, response=True)
diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/ble/client.py b/demos/python/sdk_wireless_camera_control/open_gopro/ble/client.py
index f1615560..32ea82b8 100644
--- a/demos/python/sdk_wireless_camera_control/open_gopro/ble/client.py
+++ b/demos/python/sdk_wireless_camera_control/open_gopro/ble/client.py
@@ -133,23 +133,23 @@ async def close(self) -> None:
else:
logger.debug("BLE already disconnected")
- async def read(self, uuid: BleUUID) -> bytearray:
+ async def read(self, uuid: BleUUID) -> bytes:
"""Read byte data from a characteristic (identified by BleUUID)
Args:
uuid (BleUUID): characteristic to read
Returns:
- bytearray: byte data that was read
+ bytes: byte data that was read
"""
return await self._controller.read(self._handle, uuid)
- async def write(self, uuid: BleUUID, data: bytearray) -> None:
+ async def write(self, uuid: BleUUID, data: bytes) -> None:
"""Write byte data to a characteristic (identified by BleUUID)
Args:
uuid (BleUUID): characteristic to write to
- data (bytearray): byte data to write
+ data (bytes): byte data to write
"""
await self._controller.write(self._handle, uuid, data)
diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/ble/controller.py b/demos/python/sdk_wireless_camera_control/open_gopro/ble/controller.py
index c356a798..328ae4b5 100644
--- a/demos/python/sdk_wireless_camera_control/open_gopro/ble/controller.py
+++ b/demos/python/sdk_wireless_camera_control/open_gopro/ble/controller.py
@@ -24,7 +24,7 @@ def __init__(self, exception_handler: Optional[Callable] = None) -> None:
self._exception_handler = exception_handler
@abstractmethod
- async def read(self, handle: BleHandle, uuid: BleUUID) -> bytearray:
+ async def read(self, handle: BleHandle, uuid: BleUUID) -> bytes:
"""Read a bytestream response from a BleUUID.
Args:
@@ -32,21 +32,21 @@ async def read(self, handle: BleHandle, uuid: BleUUID) -> bytearray:
uuid (BleUUID): BleUUID to read from
Returns:
- bytearray: response
+ bytes: response
"""
raise NotImplementedError
@abstractmethod
- async def write(self, handle: BleHandle, uuid: BleUUID, data: bytearray) -> None:
+ async def write(self, handle: BleHandle, uuid: BleUUID, data: bytes) -> None:
"""Write a bytestream to a BleUUID.
Args:
handle (BleHandle): handle to pair to
uuid (BleUUID): BleUUID to write to
- data (bytearray): bytestream to write
+ data (bytes): bytestream to write
Returns:
- bytearray: response
+ bytes: response
"""
raise NotImplementedError
diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/communicator_interface.py b/demos/python/sdk_wireless_camera_control/open_gopro/communicator_interface.py
index 2db0e356..1daff778 100644
--- a/demos/python/sdk_wireless_camera_control/open_gopro/communicator_interface.py
+++ b/demos/python/sdk_wireless_camera_control/open_gopro/communicator_interface.py
@@ -275,11 +275,6 @@ def _fragment(cls, data: bytes) -> Generator[bytes, None, None]:
Generator[bytes, None, None]: Generator of packets as bytes
"""
MAX_BLE_PKT_LEN = 20
- general_header = BitStruct(
- "continuation" / Const(0, Bit),
- "header" / Const(Header.GENERAL.value, BitsInteger(2)),
- "length" / BitsInteger(5),
- )
extended_13_header = BitStruct(
"continuation" / Const(0, Bit),