-
Notifications
You must be signed in to change notification settings - Fork 192
Description
We are building an app using multiple GoPro 13 Black cameras to record synchronously, stop and download records based on external signal.
We concluded that using COHN mode would be the best to communicate multiple cameras at the same time. Unfortunately the network where we can communicate the app and cameras together with the trigger signal is a kind of closed industrial network with manual IP assignation and no DHCP server.
I've modified a piece of code in connect_sta.py (tutorial module 6 - python)
connect_request = bytearray( [ 0x02, # Feature ID 0x05, # Action ID *proto.RequestConnectNew(ssid=entry.ssid, password=password, ).SerializePartialToString(), ] )
TO:
connect_request = bytearray( [ 0x02, # Feature ID 0x05, # Action ID *proto.RequestConnectNew(ssid=entry.ssid, password=password, static_ip=socket.inet_aton(ip_address), gateway=socket.inet_aton(gateway), subnet=socket.inet_aton(subnet), dns_primary=socket.inet_aton(dns_primary), dns_secondary=socket.inet_aton(dns_secondary) ).SerializePartialToString(), ] )
That way I was able to pass the network settings and get provisioned but I only went into the "COHN_STATE_ConnectingToNetwork" status few times finally without success.
Many times I'm also getting a provisioning state: PROVISIONING_ERROR_FAILED_TO_ASSOCIATE
RuntimeError('Unexpected provisioning state: 7')
It would be great to know if my approach is right or if the hardware is able to connect such network at all.