--------------------------------------------
On Thu, 12/22/16, William Hermans <[email protected]> wrote:

 Subject: Re: [beagleboard] HID on BBB with 4.9 kernel
 To: [email protected]
 Date: Thursday, December 22, 2016, 1:13 AM
 
 
 
 On Wed, Dec 21, 2016
 at 1:56 PM, roboknight <[email protected]>
 wrote:
 
 
 On Tuesday, December 20, 2016 at 3:27:44 PM UTC-5, William
 Hermans wrote:
 
 On Tue, Dec 20, 2016
 at 10:02 AM, roboknight <[email protected]> wrote:
 
 At the underlined point, I believe ep->desc is NULL
 because using the kernel and an arm objdump
 variant,I
 located the assembly that is causing the NULL dereference. 
 Inside of usb_endpoing_dir_out, it tries
 todereference ep->desc, but ep->desc must
 be NULL otherwise things would likely go swimmingly.  The
 problemis, I don't know what would cause
 ep->desc == NULL?  Whatever causes this (and it might be
 related toa function called
 "usb_gadget_ep_match_desc") I'd like to know
 because knowing might tell me how to fixwhatever
 it is I'm doing wrong or maybe patch the code so that
 things might work.
 I'm hoping someone knowledgeable about am335x
 USB can help here, or maybe let me know what I'm
 missingin my HID configuration.  The above
 configuration steps may not work, however, some python code
 I had previouslyalso fails to function.  It
 might even be possible that I just need to use the regular
 HID driver and not one based
 onlibcomposite.
 Thanks for reading this.  Hopefully there are
 some answers.
 So, I'm not a USB composite framework expert. I
 only started reading about it last night for another reason.
 A lot of what you're stating in your last couple
 paragraphs here do not make sense to me. What I'm
 reading from your post is that the end point descriptor must
 be NULL. but you're not sure why it's NULL . .
 .yadda yadda yadda . . .That should not be true.
 
 The yadda yadda yadda was kind of the
 point.  I actually have looked into it further and the only
 way that reference would actually be null is if the
 autoepconfig function couldn't choose any available
 endpoint because none of them matched the correct
 criteria.  I'm not sure where I'm supposed to SET
 UP the appropriate criteria, hence the question, and the
 details.  
 My first impression after looking through that
 code is user error. Simply because a function that's
 being used requires a valid end point descriptor reference
 as an argument, and that argument is NULL. Which tells me
 that whole "object" was never instantiated in the
 first place.
 those objects
 aren't "instantiated".  They are actually
 endpoints that are "built-in" (you can see one for
 full-speed, high-speed, and now super-speed).  One of the
 endpoints is supposed to get selected based on an
 appropriate description.  Mine probably doesn't match
 or I haven't set one, hence it doesn't work.  But I
 don't see anywhere where I can actually SPECIFY the
 necessary things in configfs... Maybe you just can't
 build a HID device with configfs right now?  Or maybe
 something changed.  Either way, I'm researching the
 answer to that question so I can figure out what I really
 need to do.  Maybe there is another way I can configure a
 HID driver, not using configfs.  
 The things I was able to do in the 3.13.xx kernel
 don't seem to work with this kernel either, or I
 don't have them set up correctly, hence I figured the
 "new" or current method was to use configfs.  But
 maybe this isn't the case. 
 I have tried to get the "latest" from
 the TI repo, and the results are the same.  So I'm
 guessing that my kernel configuration was probably okay, but
 somehow I'm not doing something right with configfs, or
 configfs doesn't work for HID devices yet (I don't
 know if I believe that, but its possible).  At any rate,
 I've not managed to get it working
 yet.
 Yeah that's all I was really saying. Sometimes
 *things* like to be done in a certain order, or maybe a
 configfs step that was required was missed ? Theres a LWN
 article I was reading the other day, that seems to be pretty
 full of information. However, the "walk-thru" only
 talks about re-implementing the mass storage gadget using
 USB composite. https://lwn.net/Articles/395712/
 
 I've also
 seen a few presentation type PDF's out there. I do not
 really know enough about the framework to know how useful
 these are though. Passed that, I have not yet seen one for
 HiD. Although . . . you know what, I think DR. Phil Polstra
 did a presentation on emulating a keyboard using HiD USB
 device, and I do think he used configfs . . . However he may
 have used an older kernel as well.
 
 I'll tell
 you what though, even though I'm not necessarily
 interested in creating an HiD device. I have interest in
 this whole composite framework. SO I'll do some
 searching on my own, and let you know what I find. I may
 even just start out with an HiD "thing" just to
 get my feet wet. 
 
 Maybe you've
 seen these already ? I'm not sure if any, or all of this
 is already know to you, but here goes . . .
 
 Matt Porter: 
http://events.linuxfoundation.org/sites/events/files/slides/USB%20Gadget%20Configfs%20API_0.pdf
  Andrzej Pietrasiewicz: 
https://events.linuxfoundation.org/sites/events/files/slides/LinuxConNA-Make-your-own-USB-gadget-Andrzej.Pietrasiewicz.pdf
 
 Additional
 documentation / example code: 
http://lxr.free-electrons.com/source/Documentation/usb/gadget_hid.txt
 
 
 
 
 -- 
 
 For more options, visit http://beagleboard.org/discuss
 
 --- 
 
 You received this message because you are subscribed to the
 Google Groups "BeagleBoard" group.
 
 To unsubscribe from this group and stop receiving emails
 from it, send an email to [email protected].
 
 To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrSC5RsWQ5rdcMg%3D4SuOmgvw2h4YFAMLhQTozGO6q1ajQ%40mail.gmail.com.
 
 For more options, visit https://groups.google.com/d/optout.
 gratiere- iertarea  absolvirea de executarea unei pedepse penale

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1297916015.82129.1482367468058%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to