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

GadgetFsPhy does not handle OUT control requests with data #11

Open
BinyaminSharet opened this issue Sep 6, 2016 · 1 comment
Open
Assignees
Labels

Comments

@BinyaminSharet
Copy link
Collaborator

The reason for this issue is not clear yet, however, but some of the OUT control messages that has data are often not received by the phy, and when they do, an attempt to read the data cause OSError 43 (Identifier removed):

[INFO  ] [GadgetFsPhy] length of events buffer: 0xc
[DEBUG ] [GadgetFsPhy] EP0 event type SETUP(0x3)
[INFO  ] [GadgetFsPhy] expecting additional data on control ep - 0x2 bytes
[INFO  ] [GadgetFsPhy] dir=0x0 (out), type=0x1 (class), rec=0x1 (interface), req=0x4, val=0x200, idx=0xd00, len=0x2
[ERROR ] Got exception while connecting/running device
[ERROR ] Traceback (most recent call last):
  File "/root/umap2/umap2/apps/emulate.py", line 39, in run
    self.dev.run()
  File "/root/umap2/umap2/core/usb_device.py", line 143, in run
    self.phy.run()
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 185, in run
    self._handle_ep0()
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 248, in _handle_ep0
    self._handle_ep0_setup(event)
  File "/root/umap2/umap2/phy/gadgetfs/gadgetfs_phy.py", line 275, in _handle_ep0_setup
    data = os.read(self.control_fd, req.length)
OSError: [Errno 43] Identifier removed

[INFO  ] [GadgetFsPhy] Disconnected device AudioDevice

@BinyaminSharet BinyaminSharet self-assigned this Sep 6, 2016
@huntergregal
Copy link

Bit of a necro thread here - but any update on this? So far Umap2 is the best gadgetfs python abstraction I have seen.

There is also raw_gadget - https://github.com/xairy/raw-gadget - which if implemented could fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants