Forum Rule: Always post complete source code & details to reproduce any issue!
Page 26 of 27 FirstFirst ... 16 24 25 26 27 LastLast
Results 626 to 650 of 675

Thread: T3.6 USB Host - Bluetooth

  1. #626
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    @knightshade - Sounds like some reasonable changes for handling the different PS3 type controller.

    I don't know much about these controllers:
    But I assume if PS3, then the binding with BT addapter is the same as with other PS3...

    On those, with the JoystickBT test app, we have code in place that if you hold down the Select button and press the PS3 button while both the BT and PS3 are plugged in or if you just before this you had a BT plugged in (without rebooting), The code will remember the address of the last BT adapter plugged in and then tell the PS3 (while it is connected directly to USB) to program itself to talk to that controller...


    With the PS3 type controllers. You probably also need/want to make sure your app is using the version of the
    BluetoothController object without the pairing stuff in the constructor:
    That is use: BluetoothController bluet(myusb);
    Not: BluetoothController bluet(myusb, true, "0000");

    At some point I may need to pick up one of these controllers, if we can not easily find a fix for you.

    Edit: Ordered a pack of 2 of them on Ebay for under $20 shipped supposedly here by Friday...
    Last edited by KurtE; 04-22-2019 at 05:20 PM.

  2. #627
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    From my experience, these are effectively "half" of a DualShock 3 or Sixaxis PS3 Controller.

    The "Move Motion" controller is the "right" half, and the "Move Navigation" is the left haft.
    For our usage (controlling R2), we have been using one or two of the "Move Navigation" controllers.
    (The joystick was key for our needs)

    It is interesting to note, that we do NOT have a "Select button" on a "Move Navigation" stick.
    Our controls include: X, O, Dpad, L1, L2, L3, PS and joystick

    Lack of the "Select" button might cause some challenges with that approach to pairing future controllers - at least using the teensy. ;-)
    In my case, I had previously paired them with my Arduino/Host Shield using UHS2.
    With their setup - I start with the Dongle plugged in. Unplug it and connect the PS3 controller. It automatically programs/pairs it to the last dongle MAC address that was connected.

    I did check that I was using the line 'BluetoothController bluet(myusb);' (without the "0000")

  3. #628
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    Start with a PS3 controller and dongle that are already paired (and tested working).

    If I power up the Teensy 3.6 with JoystickBT.ino

    USB Host Testing
    960
    *** Device Bluet a12:1 - connected ***
    product: CSR8510 A10
    BDADDR: f7:a4:ca:83:15:0
    I can turn on the PS3 controller (PS button), lights flicker (on both controler and dongle) -
    but nothing new in the serial monitor.



    If I unplug the BT controller, and connect the PS3 controller by wire:
    *** Device Bluet - disconnected ***
    *** Device HID1 54c:42f - connected ***
    manufacturer: Sony
    product: Navigation Controller
    *** HID Device Joystick1 54c:42f - connected ***
    manufacturer: Sony
    product: Navigation Controller
    *** First Joystick message 54c:42f ***
    manufacturer: Sony
    product: Navigation Controller
    LX: 0, LY: 0, RX: 106, RY: 115
    L-Trig: 0, R-Trig: 0
    Buttons: 0
    [snip]
    LX: 129, LY: 127, RX: 125, RY: 132
    L-Trig: 0, R-Trig: 0
    Buttons: 0
    *** Device HID1 - disconnected ***
    *** HID Device Joystick1 - disconnected ***
    If I move the joystick, or press buttons - I see values as I expect.

    I can reconnect the bluetooth Dongle:
    *** Device Bluet a12:1 - connected ***
    product: CSR8510 A10
    BDADDR: f7:a4:ca:83:15:0
    I can now power up the PS3 joystick (PS button), and it now connects over Bluetooth.
    I get the messages:
    LX: 126, LY: 126, RX: 125, RY: 132
    L-Trig: 0, R-Trig: 0
    Buttons: 0
    LX: 125, LY: 126, RX: 125, RY: 132
    L-Trig: 0, R-Trig: 0
    Buttons: 0
    Again: if I move the joystick, or press buttons - I see values as I expect.

    Mac addresses of the devices tried:
    Dongle f7:a4:ca:83:15:00
    Paired Controller 1: 00:07:04:B92:09
    Paired Controller 2: 04:76:6E:80:59:A7


    Where I am at a loss:
    Why will it connect via bluetooth *ONLY* if I have first connected it via wire?
    Is it expected? Is that a configuration issue on my side?
    My *hope* would have been that - so long as devices have been previously paired, I could have simply connected them.
    That said - perhaps my expectation is what is in error here :-)

  4. #629
    Junior Member
    Join Date
    Mar 2019
    Posts
    16
    @KurtE

    Are there any instructions on how to adapt the keyboard code to work with other keyboards? I am trying to figure out what changes I need to make. I am capturing the packets in linux using sniffer. I read the bluetooth_app_c10.pdf but it's confusing without an example. It would be great if you provide an example with a packet.

  5. #630
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    @knightshade - will look more at this when I have the units to try out. Ebay says it should be to my mailbox by Friday... So hopefully will pickup Friday or day or so after...

    @milan7 - I have never used the linux sniffer, so probably not much help there. When looking at new different type devices, I will try several things.

    I will often plug it into a linux board (maybe RPI or maybe PC) and try to grab as much information from Linux that I can. Things like what does things like: lsusb -v
    and things like a hid dump and ...

    I also often look around to see if others have supported this board. Look for Linux driver (most complex solutions). Also see if maybe the Arduino USB Host Shield 2 code has support for the device....

    I then often use my Saleae Logic Analyzer and try to capture the USB traffic associated with it...

    But again it also depends on the type of device.

    Example you mention Keyboard: We support several (hopefully most) USB keyboards. If it does not work, then would be good to know which one?
    Bluetooth - Still a WIP - I have gotten it to work with a couple (I only have a couple)...

    They can be a pain, mainly figuring out how to get the pairing and trust stuff completed. Hopefully once we get things merged, we will revisit some of the work flow for pairing and support for multiple Bluetooth devices.

    Kurt

  6. #631
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    @KurtE - Thanks.

    I think I was more just hoping to get an understanding of: what is the experience is currently with a dualshock controller connecting if it has been previously paired.
    Can that happen without any cables being in the mix?
    (I may need to pick one up for testing)

  7. #632
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,189
    @knightshade

    I tested extensively with the PS4 Dualshock and that works both wired and wirelessly with BT even when its paired. As for the PS3 Dualshock, I was using this https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1 to test with. Once it is paired with dongle it is paired. To pair it you use the method that @KurtE described in post in this thread:
    Code:
    /* For PS3 controller it must be USB paired in advance - 
     * - plug in cable to PS3 - then Bt Dongle to see non-zero 
     * BDADDR:
     * To initiate Bt pair - while on USB:: Hold select button and 
     * press PS button to set controller associate. After that you can
     * comment out the bluetooth paring construcor and use second 
     * constructor for already paired devices
     */
    BluetoothController bluet(myusb, true, "0000");   // Version does pairing to device
    //BluetoothController bluet(myusb);   // version assumes it already was paired
    These instructions are actually in the example joystick Bluetooth sketch.

  8. #633
    Junior Member
    Join Date
    Mar 2019
    Posts
    16
    Quote Originally Posted by KurtE View Post
    @knightshade - will look more at this when I have the units to try out. Ebay says it should be to my mailbox by Friday... So hopefully will pickup Friday or day or so after...

    @milan7 - I have never used the linux sniffer, so probably not much help there. When looking at new different type devices, I will try several things.

    I will often plug it into a linux board (maybe RPI or maybe PC) and try to grab as much information from Linux that I can. Things like what does things like: lsusb -v
    and things like a hid dump and ...

    I also often look around to see if others have supported this board. Look for Linux driver (most complex solutions). Also see if maybe the Arduino USB Host Shield 2 code has support for the device....

    I then often use my Saleae Logic Analyzer and try to capture the USB traffic associated with it...

    But again it also depends on the type of device.

    Example you mention Keyboard: We support several (hopefully most) USB keyboards. If it does not work, then would be good to know which one?
    Bluetooth - Still a WIP - I have gotten it to work with a couple (I only have a couple)...

    They can be a pain, mainly figuring out how to get the pairing and trust stuff completed. Hopefully once we get things merged, we will revisit some of the work flow for pairing and support for multiple Bluetooth devices.

    Kurt
    Thanks Kurt.

    So I am trying to make it work with a bluetooth assistive switch which is basically a one button or 2 button bluetooth keyboard used by those with high level of disability to navigate their computer or phone.

    https://www.ablenetinc.com/technolog...uetooth-switch

    So the idea is to use it with other devices other the windows computers and android phones through teensy.

    It works with linux and android out of the box but two main differences are that it doesn't ask for pin code (0000) to connect and it's in discover mode only for short amount of time.

    I am using bluetooth sniffer on raspberry pi and doing what you mentioned basically using bluetoothctl command and dump the recorded packets in a log file. I then use BA ADDR to filter for that device.

  9. #634
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    I'm definately not having an issue with pairing the controllers to the dongle.

    I can pair a set using my Mega/HostShield combo, and that connects so long as I've connected the PS3 Move navigation contoller once via wire during the same boot cycle of the Teensy.

    I can also pair a previously unpaired remote/dongle using the Teensy 3.6 (edited the code to change the key sequence to buttons that I have).
    After doing that, I can move the dongle to the Mega/HostShield and they work as expected for a paired controller/dongle.

    Thanks for the link for a controller.... that is inexpensive enough of a controller to buy for just playing on a test bed.


    The limitation that I have is the following sequence:
    1.) Connect Teensy 3.6 to a laptop
    2.) Open Serial monitor
    (output: USB Host Testing, 960)
    3.) Connect USB dongle to Teensy USB pins
    (output to serial monitors recognizes this)
    4.) Grab remote previously paired with the USB dongle (and verified to be a working combo)
    Press the PS button to wake up remote for it to connect

    The light on the dongle changse the rate at which it flickers.
    It was a flider at a steady 1sec interval, after the remote is woken up, there appears to be "chatter" and the dongle's is actively flickering.
    The sketch never enters loop: " if (joystick1.available()) { "


    I'm slowly going back and tracing the code, learning as I go :-)
    Ideally, a dongle/controller that is already paired will be able to get a connection again.

  10. #635
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    The Ebay stuff arrived today. Hard to say if they work or not..., Do they have an LEDs or lights on them that supposed to light up at all when they are in use?

    I.e. wonder if batteries in these work or not.

    quick looks at it on RPI:
    Code:
    pi@raspberrypi:~ $ lsusb -v -d 054c:042f
    
    Bus 001 Device 004: ID 054c:042f Sony Corp. PlayStation Move navigation controller
    Couldn't open device, some information will be missing
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      idVendor           0x054c Sony Corp.
      idProduct          0x042f PlayStation Move navigation controller
      bcdDevice            1.00
      iManufacturer           1
      iProduct                2
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           41
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0x80
          (Bus Powered)
        MaxPower              500mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      0 No Subclass
          bInterfaceProtocol      0 None
          iInterface              0
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.11
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength     148
             Report Descriptors:
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               1
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               1
    pi@raspberrypi:~ $
    Now Hid Information:
    Code:
    pi@raspberrypi:~ $ sudo usbhid-dump -i0 | grep -v : | xxd -r -p | hidrd-convert -o spec
    Usage Page (Desktop),               ; Generic desktop controls (01h)
    Usage (Joystik),                    ; Joystik (04h, application collection)
    Collection (Application),
        Collection (Logical),
            Report ID (1),
            Report Size (8),
            Report Count (1),
            Logical Minimum (0),
            Logical Maximum (255),
            Input (Constant, Variable),
            Report Size (1),
            Report Count (19),
            Logical Minimum (0),
            Logical Maximum (1),
            Physical Minimum (0),
            Physical Maximum (1),
            Usage Page (Button),        ; Button (09h)
            Usage Minimum (01h),
            Usage Maximum (13h),
            Input (Variable),
            Report Size (1),
            Report Count (13),
            Usage Page (FF00h),         ; FF00h, vendor-defined
            Input (Constant, Variable),
            Logical Minimum (0),
            Logical Maximum (255),
            Usage Page (Desktop),       ; Generic desktop controls (01h)
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Collection (Physical),
                Report Size (8),
                Report Count (4),
                Physical Minimum (0),
                Physical Maximum (255),
                Usage (X),              ; X (30h, dynamic value)
                Usage (Y),              ; Y (31h, dynamic value)
                Usage (Z),              ; Z (32h, dynamic value)
                Usage (Rz),             ; Rz (35h, dynamic value)
                Input (Variable),
            End Collection,
            Usage Page (Desktop),       ; Generic desktop controls (01h)
            Report Size (8),
            Report Count (39),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Input (Variable),
            Report Size (8),
            Report Count (48),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Output (Variable),
            Report Size (8),
            Report Count (48),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Feature (Variable),
        End Collection,
        Collection (Logical),
            Report ID (2),
            Report Size (8),
            Report Count (48),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Feature (Variable),
        End Collection,
        Collection (Logical),
            Report ID (238),
            Report Size (8),
            Report Count (48),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Feature (Variable),
        End Collection,
        Collection (Logical),
            Report ID (239),
            Report Size (8),
            Report Count (48),
            Usage (Pointer),            ; Pointer (01h, physical collection)
            Feature (Variable),
        End Collection,
    End Collection
    pi@raspberrypi:~ $

  11. #636
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    Quote Originally Posted by KurtE View Post
    The Ebay stuff arrived today. Hard to say if they work or not..., Do they have an LEDs or lights on them that supposed to light up at all when they are in use?

    I.e. wonder if batteries in these work or not.
    Batteries that aren't overly strong is probably common with the age of them.

    There is a single LED that should blink while it is charging.
    It also blinks when you press the PS button and it is attempting to bind to a bluetooth host.
    From there, it depends on the program - as that can do various things with the LED.

    They can be a bit of a challenge to charge.
    Easiest is to use a mini-usb cable connected to a windows box, or to a PS3.
    There is a handshake of sorts that is needed, so you cannot simply connect them to something like a phone charger.

  12. #637
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,189
    @KurtE and @knightshade - just ordered one myself off ebay - looks like wont be until Monday I get one.....

  13. #638
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    @knightshade and @mjs513... May have to play around some, but it is interesting on Linux the sixpair program does not work with these... Probably looks at product ID...
    Maybe need to hack the sources?

    What do others do to pair these?

  14. #639
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,189
    This is the only thing I could find, so far, in terms of a driver.

    https://github.com/alexandrezfs/OSX-...troller-driver

  15. #640
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    Thanks, yes they have mode a version of some of this stuff called psmove.

    For the heck of it, I had previously downloaded the sixpair code as the current versions of linux did not want to install the prebuilt... No release stuff...

    So I edited the source file and changed the DEVICE define to that of the Move controller and it now appears to have tried and hopefully paired the one unit with a BT dongle...

    Next up try again on T4 or T3.6 to see what it shows me...

  16. #641
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    Quote Originally Posted by KurtE View Post
    @knightshade and @mjs513... May have to play around some, but it is interesting on Linux the sixpair program does not work with these... Probably looks at product ID...
    Maybe need to hack the sources?

    What do others do to pair these?
    Historiclaly, I've used a sketch from Circuits@Home with one of their host shields on an Arduino.

    I've also used your JoystickBT.ino script to pair these successfully (with a minor modification due to the lack of a select button)
    After pairing, I was able to successfully test using the controller/dongle with a Circuits@Home host shields on an Arduino.

  17. #642
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    @knightshade and @mjs513 - I pushed up some changes which I think work for the PlayStation Move navigation controller

    Two sets of changes/hacks needed:

    1) For USB claim needs to use the product ID as specified earlier here and treat it as a PS3...

    2) Bluetooth - needed to look at the remote name, in this case: Navigation Controller to know that it is a PS3.

    To make it easier to do the pairing, I changed the button sequence which was hold down the Select button and then press PS to be holding down at least one of:
    (Select, R1, L1) and then press the PS button.

    Note: I think only one of the two controllers I received is working right now...

    But you might try syncing up to my changes and see if it works for you

    Kurt

  18. #643
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    Thanks!

    From a learning perpective, I will want to look over the code diff - but I will say that this appears to have fixed things.

    Without wires (I was already paired) - I was able to simply turn on the remote and start to get output to the screen.
    I grabbed a second remote, and it appears that also bound and was outputting to the screen.
    I only use the term "appears" - as the only thing differentating the output between the two controllers was the values (buttons, joysticks) and the text output would alternate between what I was doing on each of the two controllers.

    With those changes, I think that this is enough to get me into trouble.
    Many thanks!

  19. #644
    Junior Member
    Join Date
    Oct 2016
    Posts
    13
    In looking over the code changes, this is what I missed:
    Code:
    	} else if (strncmp((const char *)remoteName, "Navigation Controller", 21) == 0) {
    		DBGPrintf("  JoystickController::mapNameToJoystickType %x %s - set to PS3\n", (uint32_t)this, remoteName);
    		joystickType_ = PS3;

    I don't have one here to test, but I suspect that the other half is called the "Motion controller" in that string and will also need to be added before it will work.
    (Not needed for me - but perhaps someone down the road.)

    From another thread that I googled:
    [ 741.363723] input: Sony Computer Entertainment Motion Controller as
    /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/0003:054C:03D5.000A/input/input19
    [ 741.421269] hid-generic 0003:054C:03D5.000A: input,hiddev0,hidraw0:
    USB HID v1.10 Gamepad [Sony Computer Entertainment Motion Controller]
    on usb-0000:00:1d.0-1/input0

    root@amd:~# evtest /dev/input/event7
    Input driver version is 1.0.1
    Input device ID: bus 0x3 vendor 0x54c product 0x3d5 version 0x110
    Input device name: "Sony Computer Entertainment Motion Controller"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)

  20. #645
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    With some additional funds (and little more) - I ordered a refurbished Motion Controller, which should arrive in a week or so... So I will then hopefully be able to verify it...

    Also at that point it might be fun to start working on support for multiple BT devices connected at the same time.

  21. #646
    Junior Member
    Join Date
    Mar 2019
    Posts
    16
    @Kurt

    I found all the information about the device including modalias.


    Modalias: usb:v1915pEEEEd0001

    So it works exactly like VARMILO VB87M BLUETOOTH KEYBOARD and the firmware for the device is based on Nordic keyboard example .

    Can you make it work with that keyboard as well or tell me what I need to do?

    Thanks

  22. #647
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,189
    Quote Originally Posted by KurtE View Post
    @knightshade and @mjs513 - I pushed up some changes which I think work for the PlayStation Move navigation controller

    Two sets of changes/hacks needed:

    1) For USB claim needs to use the product ID as specified earlier here and treat it as a PS3...

    2) Bluetooth - needed to look at the remote name, in this case: Navigation Controller to know that it is a PS3.

    To make it easier to do the pairing, I changed the button sequence which was hold down the Select button and then press PS to be holding down at least one of:
    (Select, R1, L1) and then press the PS button.

    Note: I think only one of the two controllers I received is working right now...

    But you might try syncing up to my changes and see if it works for you

    Kurt
    Morning Kurt.
    Which branch did you push the changes to?

  23. #648
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    Quote Originally Posted by mjs513 View Post
    Morning Kurt.
    Which branch did you push the changes to?
    https://github.com/KurtE/USBHost_t36...WIP2-Bluetooth

  24. #649
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,189
    @KurtE
    Well got my motion controller today and decided to give it a try. Just without any debugging yet all I get when it is wired is:
    Code:
    *** Device HID1 54c:42f - connected ***
      manufacturer: Sony
      product: Navigation Controller
    *** HID Device Joystick1 54c:42f - connected ***
      manufacturer: Sony
      product: Navigation Controller
    Will try and figure out what I did after diner and a nap

    EDIT: Ok plug it in a couple of times and it hooked up wired and printed data no problem. Paired it using the function in the Joystick sketch, reloaded sketch and hooked right up with BT. As was mentioned there is a difference in some on the axis mapping between wired and BT which should be easy enough to adjust.
    Last edited by mjs513; 04-27-2019 at 10:15 PM.

  25. #650
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,544
    Today I received my Sony Motion Controller... Looks like it might take a little work...
    Linux information from RPI3:
    Code:
    pi@raspberrypi:~ $
    lsusb
    Bus 001 Device 004: ID 054c:03d5 Sony Corp. PlayStation Move motion controller
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    pi@raspberrypi:~ $ lsusb -v -d  054c:03d5
    
    Bus 001 Device 004: ID 054c:03d5 Sony Corp. PlayStation Move motion controller
    Couldn't open device, some information will be missing
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      idVendor           0x054c Sony Corp.
      idProduct          0x03d5 PlayStation Move motion controller
      bcdDevice            4.60
      iManufacturer           1
      iProduct                2
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           41
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0x80
          (Bus Powered)
        MaxPower              500mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         3 Human Interface Device
          bInterfaceSubClass      0 No Subclass
          bInterfaceProtocol      0 None
          iInterface              0
            HID Device Descriptor:
              bLength                 9
              bDescriptorType        33
              bcdHID               1.10
              bCountryCode            0 Not supported
              bNumDescriptors         1
              bDescriptorType        34 Report
              wDescriptorLength     178
             Report Descriptors:
               ** UNAVAILABLE **
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               2
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  1x 64 bytes
            bInterval               2
    pi@raspberrypi:~ $ sudo usbhid-dump -i0 | grep -v : | xxd -r -p | hidrd-convert -o spec
    Usage Page (Desktop),       ; Generic desktop controls (01h)
    Usage (Gamepad),            ; Gamepad (05h, application collection)
    Collection (Application),
        Report ID (1),
        Usage Page (Button),    ; Button (09h)
        Usage Minimum (01h),
        Usage Maximum (18h),
        Logical Minimum (0),
        Logical Maximum (1),
        Physical Minimum (0),
        Physical Maximum (1),
        Report Size (1),
        Report Count (24),
        Input (Variable),
        Usage Page (FF00h),     ; FF00h, vendor-defined
        Usage (24h),
        Report Size (8),
        Report Count (3),
        Input (Variable),
        Usage Page (Desktop),   ; Generic desktop controls (01h)
        Usage (X),              ; X (30h, dynamic value)
        Usage (Y),              ; Y (31h, dynamic value)
        Usage (Z),              ; Z (32h, dynamic value)
        Usage (Rz),             ; Rz (35h, dynamic value)
        Logical Minimum (0),
        Logical Maximum (255),
        Report Count (4),
        Input (Variable),
        Usage Page (FF00h),     ; FF00h, vendor-defined
        Usage (20h),
        Report Count (38),
        Input (Variable),
        Report ID (2),
        Usage (21h),
        Report Count (48),
        Output (Variable),
        Report ID (6),
        Usage (27h),
        Report Count (8),
        Output (Variable),
        Report ID (3),
        Usage (23h),
        Report Count (8),
        Feature (Variable),
        Report ID (16),
        Usage (22h),
        Report Count (48),
        Feature (Variable),
        Report ID (224),
        Usage (25h),
        Report Count (48),
        Feature (Variable),
        Report ID (17),
        Usage (26h),
        Report Count (48),
        Feature (Variable),
    End Collection,
    Usage Page (FF02h),         ; FF02h, vendor-defined
    Usage (20h),
    Collection (Application),
        Usage (21h),
        Report ID (4),
        Logical Minimum (0),
        Logical Maximum (255),
        Report Size (8),
        Report Count (15),
        Feature (Variable),
        Usage (22h),
        Report ID (5),
        Report Count (22),
        Feature (Variable),
    End Collection,
    Usage Page (FF03h),         ; FF03h, vendor-defined
    Usage (20h),
    Collection (Application),
        Usage (21h),
        Report ID (160),
        Logical Minimum (0),
        Logical Maximum (255),
        Report Size (8),
        Report Count (34),
        Feature (Variable),
        Usage (22h),
        Report ID (161),
        Report Count (22),
        Feature (Variable),
    End Collection
    pi@raspberrypi:~ $
    Try running with it plugged in to USB:
    Code:
    USB Host Testing
    960
    *** Device HID1 54c:3d5 - connected ***
      manufacturer: Sony Computer Entertainment
      product: Motion Controller
    *** HID Device Joystick1 54c:3d5 - connected ***
      manufacturer: Sony Computer Entertainment
      product: Motion Controller
    If I turn on Debug stuff:
    Code:
    USB Host Testing
    960
    sizeof Device = 36
    sizeof Pipe = 96
    sizeof Transfer = 64
    power up USBHS PHY
     reset waited 5
    USBHS_ASYNCLISTADDR = 0
    USBHS_PERIODICLISTBASE = 1FFF6000
    periodictable = 1FFF6000
    port change: 10001803
        connect
      begin reset
    port change: 10001005
      port enabled
      end recovery
    new_Device: 12 Mbit/sec
    new_Pipe
    enumeration:
    enumeration:
    enumeration:
    Device Descriptor:
      12 01 00 02 00 00 00 40 4C 05 D5 03 60 04 01 02 00 01 
        VendorID = 054C, ProductID = 03D5, Version = 0460
        Class/Subclass/Protocol = 0 / 0 / 0
        Number of Configurations = 1
    enumeration:
    enumeration:
    Manufacturer: Sony Computer Entertainment
    enumeration:
    Product: Motion Controller
    enumeration:
    Config data length = 41
    enumeration:
    Configuration Descriptor:
      09 02 29 00 01 01 00 80 FA 
        NumInterfaces = 1
        ConfigurationValue = 1
      09 04 00 00 02 03 00 00 00 
        Interface = 0
        Number of endpoints = 2
        Class/Subclass/Protocol = 3(HID) / 0 / 0
      09 21 10 01 00 01 22 B2 00 
        HID, 1 report descriptor
      07 05 02 03 40 00 02 
        Endpoint = 2 OUT
        Type = Interrupt
        Max Size = 64
        Polling Interval = 2
      07 05 81 03 40 00 02 
        Endpoint = 1 IN
        Type = Interrupt
        Max Size = 64
        Polling Interval = 2
    enumeration:
    USBHub memory usage = 960
    USBHub claim_device this=1FFF2020
    USBHub memory usage = 960
    USBHub claim_device this=1FFF23E0
    HIDParser claim this=1FFF27C0
    HIDParser claim this=1FFF2DE0
    HIDParser claim this=1FFF3420
    HIDParser claim this=1FFF4720
    HIDParser claim this=1FFF40E0
    JoystickController claim this=1FFF4FC0
    BluetoothController claim this=1FFF3A40
    Descriptor 4 = INTERFACE
    HIDParser claim this=1FFF27C0
     bInterfaceClass =    3
     bInterfaceSubClass = 0
     bInterfaceProtocol = 0
    HID Parser Claim: 09 04 00 00 02 03 00 00 00 09 21 10 01 00 01 22 B2 00 07 05 02 03 40 00 02 07 05 81 03 40 00 02 
    report descriptor size = 178
    Two endpoint HID:
      endpoint = 2
       size = 64
       interval = 2
      endpoint = 81
       size = 64
       interval = 2
    new_Pipe
    allocate_interrupt_pipe_bandwidth
     best_bandwidth = 5, at offset = 0, shift= 0
    new_Pipe
    allocate_interrupt_pipe_bandwidth
     best_bandwidth = 6, at offset = 1, shift= 0
    Descriptor 33 = HID
    Descriptor 5 = ENDPOINT
    Descriptor 5 = ENDPOINT
    control callback (hid)
    05 01 09 05 A1 01 85 01 05 09 19 01 29 18 15 00 25 01 35 00 45 01 75 01 95 18 81 02 06 00 FF 09 24 75 08 95 03 81 02 05 01 09 30 09 31 09 32 09 35 15 00 26 FF 00 95 04 81 02 06 00 FF 09 20 95 26 81 02 85 02 09 21 95 30 91 02 85 06 09 27 95 08 91 02 85 03 09 23 95 08 B1 02 85 10 09 22 95 30 B1 02 85 E0 09 25 95 30 B1 02 85 11 09 26 95 30 B1 02 C0 06 02 FF 09 20 A1 01 09 21 85 04 15 00 26 FF 00 75 08 95 0F B1 02 09 22 85 05 95 16 B1 02 C0 06 03 FF 09 20 A1 01 09 21 85 A0 15 00 26 FF 00 75 08 95 22 B1 02 09 22 85 A1 95 16 B1 02 C0 
      mesg = 22000681
      got report descriptor
    Found top level collection 10005
    find_driver
      driver 1FFF4FCC
    Match PID/VID: 5
    Found top level collection FF020020
    find_driver
      driver 1FFF4FCC
      driver 1FFF4D60
    Rawhid Claim: 54c:3d5 usage: ff020020
      driver 1FFF4E00
    Rawhid Claim: 54c:3d5 usage: ff020020
    No Driver claimed topusage: FF020020
    Found top level collection FF030020
    find_driver
      driver 1FFF4FCC
      driver 1FFF4D60
    Rawhid Claim: 54c:3d5 usage: ff030020
      driver 1FFF4E00
    Rawhid Claim: 54c:3d5 usage: ff030020
    No Driver claimed topusage: FF030020
    send special PS3 feature command
    ERROR Followup
        remove from followup list
        remove from followup list
      qtd: 88A0, token=4C10B508, next=7083788B
    Now to start debugging

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •