Giter VIP home page Giter VIP logo

Comments (7)

mattijsf avatar mattijsf commented on August 23, 2024

Maybe worth mentioning: I'm looking into the possibility to build a (bulk) one-way FTP sync app. I know there is a stub framework available but it would be great to run it on the actual camera when testing / debugging (on my mac).

from sony-pmca-re.

ma1co avatar ma1co commented on August 23, 2024

I made some changes to the device scan code. Can you try the latest release (v0.4)? If it still doesn't work, try switching between MTP / mass storage mode on your camera.

from sony-pmca-re.

mattijsf avatar mattijsf commented on August 23, 2024

I'm currently running from source against master that includes your last 0.4 changes.

It works better now, but still not as expected.

$ python pmca.py install -o outfile.txt

Using libusb
Looking for Sony devices

Querying MTP device
Sony Corporation ILCE-6000 is a camera in MTP mode
Switching to app install mode. Please run this command again when the camera has switched modes.
$

Camera switches correctly into 'Application Download' mode

$ python pmca.py install -o outfile.txt

Using libusb
Looking for Sony devices
No devices found. Ensure your camera is connected.
$

I get the same results using the 0.4 binary release.

from sony-pmca-re.

mattijsf avatar mattijsf commented on August 23, 2024

That was in MTP mode btw. This is was I get when I put the camera in Mass Storage mode:

$ python pmca.py install -o outfile.txt

Using libusb
Looking for Sony devices

Querying mass storage device
Traceback (most recent call last):
  File "pmca.py", line 172, in <module>
    main()
  File "pmca.py", line 166, in main
    installCommand(args.server, args.driver, args.apkFile, args.outFile)
  File "pmca.py", line 88, in installCommand
    info = MscDevice(drv).getDeviceInfo()
  File "/Users/mattijs/Development/sandbox/git/Sony-PMCA-RE/pmca/usb/__init__.py", line 17, in __init__
    self.reset()
  File "/Users/mattijs/Development/sandbox/git/Sony-PMCA-RE/pmca/usb/__init__.py", line 25, in reset
    self.driver.sendCommand(6 * '\x00')
  File "/Users/mattijs/Development/sandbox/git/Sony-PMCA-RE/pmca/usb/driver/libusb.py", line 98, in sendCommand
    self._writeCommand(self.DIRECTION_WRITE, command, 0)
  File "/Users/mattijs/Development/sandbox/git/Sony-PMCA-RE/pmca/usb/driver/libusb.py", line 88, in _writeCommand
    command = command.ljust(16, '\x00'),
  File "/Users/mattijs/Development/sandbox/git/Sony-PMCA-RE/pmca/usb/driver/libusb.py", line 72, in write
    return self.dev.write(self.epOut, data)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 940, in write
    intf, ep = self._ctx.setup_request(self, endpoint)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 216, in setup_request
    self.managed_claim_interface(device, intf)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/usb/core.py", line 167, in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 811, in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
  File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
$

In this case it is not even able to switch the camera into 'Application Download' mode. Which did work in MTP mode.

from sony-pmca-re.

mattijsf avatar mattijsf commented on August 23, 2024

There some info about the [Errno 13] Access denied (insufficient permissions) error here: https://bitbucket.org/benallard/galileo/issues/60/no-backend-available-when-running-on-mac

Seems like an OSX kernel driver is claiming the device in Mass Storage mode and therefore pmca can't use it. I tried unmounting everything but that doesn't help. Elevating permissions with sudo also does not help.

My best bet would be to get it working in MTP mode... don't know how though.

Should I create a new issue and close this one?

from sony-pmca-re.

mattijsf avatar mattijsf commented on August 23, 2024

Closing. Restarting my Mac fixed the last mentioned MTP mode issue. There are some quirks with the connection though. But at least I'm now getting a populated outfile. I'll create new issue(s) for the other problems I see if you don't mind.

Thank you for your support!

from sony-pmca-re.

ma1co avatar ma1co commented on August 23, 2024

That's a bit weird that your camera did't show up after switching... Probably an OS X issue, not much I can do there... Good that it works now.

Concerning mass storage mode: I guess it's a kernel driver or something. Can you try to run kextstat before and after plugging in the camera? Is there a new driver being loaded? Try to unload it with kextunload -b com.apple.driver.thedrivername

from sony-pmca-re.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.