gopro / OpenGoPro

An open source interface specification to communicate with a GoPro camera with accompanying demos and tutorials.
https://gopro.github.io/OpenGoPro/
MIT License
711 stars 153 forks source link

INVALID_PARAM When connecting to go pro via BLE during #417

Closed UneJolieFleur closed 11 months ago

UneJolieFleur commented 1 year ago

Component What is the bug in?

Describe the bug The connection with BLE seems to start correctly and it then stops and fail trying to "set date and time" via BLE image

To Reproduce Steps to reproduce the behavior: Run this code to reproduce:

import asyncio
from open_gopro import WirelessGoPro

async def main() -> None:
    async with WirelessGoPro() as gopro:
        print("Yay! I'm connected via BLE, Wifi, opened, and ready to send / get data now!")
        # Send some messages now

if __name__ == "__main__":
    asyncio.run(main())

Screenshots If applicable, add screenshots to help explain your problem.

Hardware

If you guys have any ideas please let me know thx !

thomaswelter commented 1 year ago

I've got the same problem on our Hero 7 Silver

Scopi1 commented 1 year ago

Same error using GoPro 10

Open Gopro - 0.14.1

Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy Kernel: 5.15.0-1038-raspi Bluez: 5.64-0ubuntu1

Syslog: Oct 9 09:11:53 station1 bluetoothd[835]: Starting SDP server Oct 9 09:11:53 station1 kernel: [ 141.454594] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 Oct 9 09:11:53 station1 kernel: [ 141.454614] Bluetooth: BNEP filters: protocol multicast Oct 9 09:11:53 station1 kernel: [ 141.454629] Bluetooth: BNEP socket layer initialized Oct 9 09:11:53 station1 bluetoothd[835]: Bluetooth management interface 1.21 initialized Oct 9 09:11:54 station1 bluetoothd[835]: Failed to set privacy: Rejected (0x0b) Oct 9 09:11:58 station1 bluetoothd[835]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down Oct 9 09:54:48 station1 systemd[980]: Reached target Bluetooth. Oct 9 09:54:48 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for F7:F5:72:36:24:F3 Oct 9 09:54:50 station1 bluetoothd[835]: profiles/deviceinfo/deviceinfo.c:read_pnpid_cb() Error reading PNP_ID value: Request attribute has encountered an unlikely error Oct 9 09:54:50 station1 bluetoothd[835]: profiles/battery/battery.c:batt_io_ccc_written_cb() Battery Level: notifications not enabled Request attribute has encountered an unlikely error Oct 9 09:56:11 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for CD:39:5E:46:59:03 Oct 9 09:56:13 station1 bluetoothd[835]: profiles/deviceinfo/deviceinfo.c:read_pnpid_cb() Error reading PNP_ID value: Request attribute has encountered an unlikely error Oct 9 09:56:13 station1 bluetoothd[835]: profiles/battery/battery.c:batt_io_ccc_written_cb() Battery Level: notifications not enabled Request attribute has encountered an unlikely error Oct 9 09:56:44 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for F7:F5:72:36:24:F3 Oct 9 09:56:46 station1 bluetoothd[835]: profiles/deviceinfo/deviceinfo.c:read_pnpid_cb() Error reading PNP_ID value: Request attribute has encountered an unlikely error Oct 9 09:56:46 station1 bluetoothd[835]: profiles/battery/battery.c:batt_io_ccc_written_cb() Battery Level: notifications not enabled Request attribute has encountered an unlikely error Oct 9 09:57:16 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for CD:69:42:23:14:7D Oct 9 09:57:18 station1 bluetoothd[835]: profiles/deviceinfo/deviceinfo.c:read_pnpid_cb() Error reading PNP_ID value: Request attribute has encountered an unlikely error Oct 9 09:57:18 station1 bluetoothd[835]: profiles/battery/battery.c:batt_io_ccc_written_cb() Battery Level: notifications not enabled Request attribute has encountered an unlikely error Oct 9 09:58:32 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for CD:39:5E:46:59:03 Oct 9 09:58:37 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for CD:69:42:23:14:7D Oct 9 09:58:54 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for F7:F5:72:36:24:F3 Oct 9 10:03:26 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for C1:53:F7:F0:46:BE Oct 9 10:05:57 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for F2:1D:3F:3C:0F:1E Oct 9 10:08:28 station1 bluetoothd[835]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down Oct 10 07:52:26 station1 bluetoothd[835]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down Oct 10 07:56:31 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for E3:FE:BF:42:DD:D5 Oct 10 07:57:09 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for E3:FE:BF:42:DD:D5 Oct 10 08:14:11 station1 bluetoothd[835]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down Oct 10 08:14:42 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for E3:FE:BF:42:DD:D5 Oct 10 08:14:58 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for E3:FE:BF:42:DD:D5 Oct 10 08:17:42 station1 bluetoothd[835]: src/device.c:load_gatt_db() No cache for D2:20:2E:DE:C3:D8

Scopi1 commented 1 year ago

Error not thrown when using v 0.13.

I can reproduce the error in 0.13 using ble_command.set_date_time_tz_dst. Error code 2 Invalid param returned.

Error not thrown when using ble_command.set_date_time

savinasz commented 1 year ago

u can upgrade the open-gopro package, use pip install open-gopro --upgrade .

AnneKnappe4 commented 1 year ago

Hey I updated the open-gopro package but still have the same issue. was anybody able to solve the problem?

mackanjansson commented 11 months ago

I had the same issue, but then instead followed the git clone step followed by "cd....." and "pip install ."

dtill commented 11 months ago

same here with GP Hero 9 Black and latest Linux Raspbian.

Installed from sources like discribed here: https://gopro.github.io/OpenGoPro/python_sdk/installation.html#from-sources

now it works. :)

I had the same issue, but then instead followed the git clone step followed by "cd....." and "pip install ."

tcamise-gpsw commented 11 months ago

I believe this has been fixed but not yet published. In any case I will verify today and publish soon.

tcamise-gpsw commented 11 months ago

Yes this has been fixed by not asserting on the Set datetime command since it is not supported on older cameras.

Ahmad-197 commented 6 months ago

Hi, I am trying capture a photo by using the demo wireless python sdk. However, I am facing the same error as mentioned above. I have tried the solutions mentioned but I am receiving the same error every time.

Steps to reproduce: Run gopro-photo in the terminal.

image

What can I do to solve the issue? P.S. I am using Python 3.10.7 and open-gopro-0.16.1. Camera: Hero 11 mini Black. I have also tried using open-gopro 0.13.1 and 0.11.2. I get the following error while using open-gopro 0.11.2.

image

tcamise-gpsw commented 6 months ago

Hi, I am trying capture a photo by using the demo wireless python sdk. However, I am facing the same error as mentioned above. I have tried the solutions mentioned but I am receiving the same error every time.

Steps to reproduce: Run gopro-photo in the terminal.

image

What can I do to solve the issue? P.S. I am using Python 3.10.7 and open-gopro-0.16.1. Camera: Hero 11 mini Black. I have also tried using open-gopro 0.13.1 and 0.11.2. I get the following error while using open-gopro 0.11.2.

image

For future reference: this does not actually relate to the ticket here. See #545