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

Issue with Provisioning COHN on GoPro 12 #457

Closed
Aashyk-Mohaiteen opened this issue Dec 20, 2023 · 9 comments · Fixed by #531 or #543
Closed

Issue with Provisioning COHN on GoPro 12 #457

Aashyk-Mohaiteen opened this issue Dec 20, 2023 · 9 comments · Fixed by #531 or #543
Assignees
Labels
bug Something isn't working demos Relating to demos tutorials Relating to tutorials

Comments

@Aashyk-Mohaiteen
Copy link

This issue was found while running the demo file: demos/python/sdk_wireless_camera_control/open_gopro/demos/cohn.py

I ran the demo file for provisioning and test the GoPro for COHN and ran into this issue:

image

Seems like the password string is not being written to the BLE characteristic and only first character is being written

To Reproduce
Steps to reproduce the behavior:
Run this in command prompt: python cohn.py --ssid wifi-ap --password password

Expected behavior
Expected the GoPro 12 to be provisioned successfully

Hardware

  • Camera: Hero12
  • Python version 3.11.4 on Windows 10
@Aashyk-Mohaiteen Aashyk-Mohaiteen added the bug Something isn't working label Dec 20, 2023
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label Dec 20, 2023
@Aashyk-Mohaiteen Aashyk-Mohaiteen changed the title issue with Provisioning COHN on GoPro 12 Issue with Provisioning COHN on GoPro 12 Dec 20, 2023
@tcamise-gpsw tcamise-gpsw removed the triage Needs to be reviewed and assigned label Jan 8, 2024
@tcamise-gpsw tcamise-gpsw added the tutorials Relating to tutorials label Jan 8, 2024
@tcamise-gpsw tcamise-gpsw self-assigned this Jan 8, 2024
@tcamise-gpsw tcamise-gpsw added demos Relating to demos and removed tutorials Relating to tutorials labels Jan 8, 2024
@tcamise-gpsw
Copy link
Collaborator

That is quite an odd error. I've only ever seen this is an anomaly in bleak.
Is this actually repeatable? If so, can you post the entire log file (i.e. gopro_demo.log)?

@joelA11
Copy link

joelA11 commented Jan 29, 2024

when i reduce the size of SSID, it passes, and check if youve given enough ip address range in ur router gateway.
It works.

@Fougl
Copy link

Fougl commented Apr 4, 2024

I get exactly the same error, any solutions yet? @joelA11 dont quite understand what you did there. @tcamise-gpsw should I send you the log file?

@tcamise-gpsw
Copy link
Collaborator

tcamise-gpsw commented Apr 10, 2024

I'm still not able to reproduce this. Also fwiw I did push a pretty major update of the SDK this week. Can @Fougl or someone try again and post the complete log here of the failure? To clarify I want the gopro_demo.log file; not just the console log.

@tcamise-gpsw tcamise-gpsw added the feedback requested Further information is requested label Apr 16, 2024
@joelA11
Copy link

joelA11 commented Apr 22, 2024

I get exactly the same error, any solutions yet? @joelA11 dont quite understand what you did there. @tcamise-gpsw should I send you the log file?

Reduce the size of SSID and restrict the password to minimum characters. Also check if you've give enough ip address range in router.

The bleak module that works has some constraints with passing the ssid and password as a sequence, which has the length restriction, so it's advised to have the ssid length minimal to pass with password along.

@tcamise-gpsw
Copy link
Collaborator

tcamise-gpsw commented Apr 23, 2024

@joelA11 Can you provide some more info on this bleak limitation? Where do you see this?

I'm not convinced this is the problem since the Python SDK is fragmenting each packet into a maximum size of 20 bytes

Thanks

@tcamise-gpsw tcamise-gpsw removed the feedback requested Further information is requested label Apr 23, 2024
@tcamise-gpsw
Copy link
Collaborator

tcamise-gpsw commented Apr 23, 2024

I think I figured out what is going on here and it is a bug on the GoPro side. It has nothing to do with Bleak.

It is triggered by the size of the command, which is itself triggered by the sizes of ssid and password.
I can replicate the issue by sending any command that takes more than one packet (20 bytes) and uses the general header. So any command that is between 20 and 31 bytes will trigger this.
If however, I always use the extended header regardless of the packet size, the bug does not occur.

I'll update the Python SDK and documentation to always use extended headers.

@tcamise-gpsw tcamise-gpsw linked a pull request Apr 23, 2024 that will close this issue
@tcamise-gpsw
Copy link
Collaborator

The fix has been merged and released in v0.16.1

@tcamise-gpsw
Copy link
Collaborator

Reopening becuase this also needs to be fixed in the tutorials.

@tcamise-gpsw tcamise-gpsw reopened this May 8, 2024
@tcamise-gpsw tcamise-gpsw added the tutorials Relating to tutorials label May 8, 2024
@github-actions github-actions bot added the triage Needs to be reviewed and assigned label May 8, 2024
@tcamise-gpsw tcamise-gpsw removed the triage Needs to be reviewed and assigned label May 8, 2024
@tcamise-gpsw tcamise-gpsw linked a pull request May 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working demos Relating to demos tutorials Relating to tutorials
Projects
Status: Done
4 participants