Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
244 stars 60 forks source link

Running on Mac #30

Closed korrio closed 7 years ago

korrio commented 7 years ago

After connecting to camera WIFI (QX10)

Korr:sony_camera_api Mac$ python src/example/pygameLiveView.py Traceback (most recent call last): File "src/example/pygameLiveView.py", line 90, in cameras = search.discover() File "build/bdist.macosx-10.9-intel/egg/pysony.py", line 46, in discover socket.error: [Errno 51] Network is unreachable

hblanken commented 7 years ago

I had a similar issue, running on python 2.7.10, MacOS 10.11.6, direct WiFi connection to QX10:

python scan_for_cameras.py Traceback (most recent call last): File "scan_for_cameras.py", line 6, in cameras = search.discover(5) File "/usr/local/lib/python2.7/site-packages/pysony.py", line 38, in discover self.__udp_socket.sendto(msg, (SSDP_ADDR, SSDP_PORT)) socket.error: [Errno 51] Network is unreachable

The examples for sony_live and timer_photo worked well, they do not seem to use SSDP.

I then read on forums that the SSDP discovery on Sony QX cams is not working well. You can manually set-up the connection to the QX camera:

camera = pysony.SonyAPI(QX_ADDR='http://10.0.0.1:10000')

Bloodevil commented 7 years ago

@hblanken is right. I tested several times but SSDP discovery is not working well. so after connect the camera WIFI and run the sony_live or timer_photo. and if you success to connect to camera. you can skip the discover part on pygameLiveView example.