Forum Rule: Always post complete source code & details to reproduce any issue!
Page 14 of 20 FirstFirst ... 4 12 13 14 15 16 ... LastLast
Results 326 to 350 of 480

Thread: T3.6 USB Host - Bluetooth

  1. #326
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    Hi Guys,

    I structure/class would be great. But I also want to make sure that we hopefully we support other joystick objects as well.

    Earlier I did some testing, where I compiled up a Teensy to be a USB Joystick and it was working back then...

    But what I have not tested is some other types of joysticks like: some higher end Logitechs, or some by thrustmaster or... Probably because I don't have any nor have need for one...

    But now that I am thinking about it, I do have a couple of driving wheels/pedals... One for a PS3 and another one that works with the XBox One... Wonder how those might show up...

    On a side note: I thought for the fun of it and curiosity I ordered an Arduino Pro Mini (clone) which should arrive tomorrow or Tuesday, that I thought I might try hooking up to smaller size Host Shield 2, to see if maybe it might work (not likely), but...

  2. #327
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    Quote Originally Posted by KurtE View Post
    Hi Guys,

    I structure/class would be great. But I also want to make sure that we hopefully we support other joystick objects as well.

    Earlier I did some testing, where I compiled up a Teensy to be a USB Joystick and it was working back then...

    But what I have not tested is some other types of joysticks like: some higher end Logitechs, or some by thrustmaster or... Probably because I don't have any nor have need for one...

    But now that I am thinking about it, I do have a couple of driving wheels/pedals... One for a PS3 and another one that works with the XBox One... Wonder how those might show up...

    On a side note: I thought for the fun of it and curiosity I ordered an Arduino Pro Mini (clone) which should arrive tomorrow or Tuesday, that I thought I might try hooking up to smaller size Host Shield 2, to see if maybe it might work (not likely), but...
    @KurtE and @defragster

    Since I am rather obliging and had a Logitech Extreme 3D Pro Joystick (https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1) in the garage I just loaded up the basic Joystick Sketch and worked no problem. Think it worked better than the Xbox. Anyway what i am showing below is just a quick and dirty initial dump - I would have to map all the buttons on the joystick of course.

    Code:
    USB Host Joystick Testing
    *** Device joystick[1D] 0:0 - connected ***
      manufacturer: ��C��
    ��������a�a�����O�Dh��9A�
      product: FHF���G����
      Serial: a�a(``��(F���s�(F��� F���l�
    *** Device HID1 46d:c215 - connected ***
      manufacturer: Logitech
      product: Logitech Extreme 3D
    *** Device joystick[1D] - disconnected ***
    *** HID Device joystick[0H] 46d:c215 - connected ***
      manufacturer: Logitech
      product: Logitech Extreme 3D
    Joystick(0): buttons = 0 0:508 1:508 5:128 9:8
    Joystick(0): buttons = 0 0:512 1:508 5:128 9:8
    Joystick(0): buttons = 0 0:520 1:508 5:128 9:8
    Joystick(0): buttons = 0 0:526 1:508 5:128 9:8
    Joystick(0): buttons = 0 0:534 1:512 5:128 9:8
    Joystick(0): buttons = 0 0:540 1:512 5:128 9:8
    Joystick(0): buttons = 0 0:520 1:512 5:128 9:8
    Joystick(0): buttons = 0 0:512 1:512 5:128 9:8
    EDIT:
    If you are going get a mini usb host shield really recommend trying to get an original one or really read the reviews.

    Anyway just a quick and dirty:
    0 => Stick left and right
    1 => Stick fwd and backward
    5 => Rotate of the stick
    9 => little hat on top of the stick.
    buttons: as normal, on this one there is 11 buttons. all show up

  3. #328
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    Quick check finds SparkFun USB Host Shield $27 - it was updated a couple years back (some fixed routing?) and must be working as they haven't replaced it again?

    I don't see that Adafruit has one - but they have this related/linked library : https://github.com/felis/USB_Host_Shield_2.0

  4. #329
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE and @defragster and others,

    Here is something just to think about for joysticks or gamepads. It will be interesting to see the XBOX and Kurt's steering wheel and pedal data. Just talking point right now - kind of combination of hs2 and usb hid messages:
    Code:
    struct data
    {
    	struct {
    		int16_t x;
    		int16_t y;
    	} LXY
    	
    	struct {
    		int16_t x;
    		int16_t y;
    	} RXY
    	
    	struct {
    		int16_t vz;
    	} VXY
    	
    	uint8_t hat0;
    	uint8_t hat1;
    	
    	touchpadXY xy;
    	
    	gpButtons btns;  //could just use 1, prefer generic
    	Buttons jBtns;
    	
    	uint8_t battery;
    
        int16_t accX, accZ, accY;
        int16_t gyroY, gyroZ, gyroX;
    
    }
    	
    	
    union Buttons {
            struct {
                    uint8_t btn1;
                    uint8_t btn2;
                    uint8_t btn3;
                    uint8_t btn4;
                    uint8_t btn5;
                    uint8_t btn6;
                    uint8_t btn7;
                    uint8_t btn8;
                    uint8_t btn9;
                    uint8_t btn10;
                    uint8_t btn11;
                    uint8_t btn12;
                    uint8_t btn13;				
                    uint8_t btn14;				
            } __attribute__((packed));
    } __attribute__((packed));
    
    union gpButtons {
            struct {
                    uint8_t arrows;
                    uint8_t square;
                    uint8_t cross;
                    uint8_t circle;
                    uint8_t triangle;
    
                    uint8_t l1;
                    uint8_t r1;
                    uint8_t l2;
                    uint8_t r2;
                    uint8_t share;
                    uint8_t options;
                    uint8_t l3;
                    uint8_t r3;
    
                    uint8_t ps;
                    uint8_t touchpad;
            } __attribute__((packed));
    } __attribute__((packed));
    
    struct touchpad {
            struct {
                    uint8_t touching; // The top bit is cleared if the finger is touching the touchpad
                    uint16_t x;
                    uint16_t y;
            } __attribute__((packed))
    } __attribute__((packed));

  5. #330
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    Hi Mike,

    A structure, like that could be interesting,

    I guess the real question to me is to figure out how all of the different USB and Bluetooth joysticks map into it.

    Example your real joystick couple of messages up: Joystick(0): buttons = 0 0:512 1:512 5:128 9:8
    Again using the USB standard for low Axis numbers:
    Code:
    30                         X                         DV                         4.2  
    31                         Y                         DV                         4.2  
    32                         Z                         DV                         4.2  
    33                         Rx                         DV                         4.2  
    34                         Ry                         DV                         4.2  
    35                         Rz                         DV                         4.2  
    36                         Slider                         DV                         4.3  
    37                         Dial                         DV                         4.3  
    38                         Wheel                         DV                         4.3  
    39                         Hat                         switch                         DV                         4.3
    It uses the Standard Axis of (X=0, Y=1, Rz=5, Hat=9)

    I can imagine some other joysticks may use the Slider values, Dial, rnd Rx,Ry...

    Or plug in a Teensy that has been configured as Joystick:
    There appears to be two semi-standard versions of it:

    From usb_desc.h - #define JOYSTICK_SIZE 12 // 12 = normal, 64 = extreme joystick

    The 12 size one sort of matches the PS3/PS4 like data at low end, where the defined Axis is:
    usb_desc.c
    It defines (X, Y, Z, Rz) as the 4 main Axis, with 10 bits of data. It also defines two other sliders ...

    But then there is the monster version, where they define:
    // extreme joystick (to use this, edit JOYSTICK_SIZE to 64 in usb_desc.h)
    // 128 buttons 16
    // 6 axes 12
    // 17 sliders 34
    // 4 pov 2

    And I remember a thread or two where Paul (and others) built some monster unit with tons of sliders and knobs, where they maybe use it to control music?...

  6. #331
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    Mike and others,

    I should also mention that current Joystick output is also sort of busted, or kludged or ... when it comes to things like the Teensy Monster joystick,

    That is how to handle:
    Code:
          0x05, 0x01,                     // Usage Page (Generic Desktop)
            0x09, 0x01,                     // Usage (Pointer)
            0xA1, 0x00,                     // Collection ()
            0x15, 0x00,                     // Logical Minimum (0)
            0x27, 0xFF, 0xFF, 0, 0,         // Logical Maximum (65535)
            0x75, 0x10,                     // Report Size (16)
            0x95, 23,                       // Report Count (23)
            0x09, 0x30,                     // Usage (X)
            0x09, 0x31,                     // Usage (Y)
            0x09, 0x32,                     // Usage (Z)
            0x09, 0x33,                     // Usage (Rx)
            0x09, 0x34,                     // Usage (Ry)
            0x09, 0x35,                     // Usage (Rz)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x09, 0x36,                     // Usage (Slider)
            0x81, 0x02,                     // Input (variable,absolute)
    That is, the X, Y, Z, Rx, Ry, Rz are easy: That is Axis (0, 1, 2,3,4, 5)
    But not we get to the next several items, what this is saying that we should have Axis(6), but it should be an array of 17 items, which needless to say
    that all 17 would not fit into index 6... Don't remember what kludge it is using to maybe handle this.

    Also I have never tried it, But wonder what you get if you configure a Teensy as a FlightSim_interface?

    Again I am not trying to resist changing the interface, but hopefully trying to make sure we take into account all of the different ways we think someone might try to use this.

    Of course some feedback would be great!

  7. #332
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    Quote Originally Posted by defragster View Post
    Quick check finds SparkFun USB Host Shield $27 - it was updated a couple years back (some fixed routing?) and must be working as they haven't replaced it again?

    I don't see that Adafruit has one - but they have this related/linked library : https://github.com/felis/USB_Host_Shield_2.0
    Yep if I did not have a working unit, I would think about getting the Sparkfun one, I also wondered if it might work with the Teensy Arduino shield kit: https://www.sparkfun.com/products/13288

    I don't think the larger shield I have would work as I believe it uses the ICSP header and I don't remember if the teensy shield mapped pins 10-13 into that connector or not...

    I had an early version of that teensy shield that had issue with power pins on the ICSP, which created issues.

  8. #333
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    @mjs513 and @defragster - maybe more of this should maybe go on Joystick thread
    But I did bring down the older logitech Driving force Wheel and the name showed up in our joystick programs but no data so far...

    So looking at RPI info

    Plugged it in and saw:
    Code:
    pi@raspberrypi:~ $ dmesg | tail -20
    [   51.695732] Bluetooth: L2CAP socket layer initialized
    [   51.695766] Bluetooth: SCO socket layer initialized
    [   52.073364] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [   52.073372] Bluetooth: BNEP filters: protocol multicast
    [   52.073386] Bluetooth: BNEP socket layer initialized
    [  108.906658] usb 1-1.4: new full-speed USB device number 4 using dwc_otg
    [  109.054926] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c294
    [  109.054940] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [  109.054948] usb 1-1.4: Product: Driving Force GT
    [  109.113326] logitech 0003:046D:C294.0001: fixing up Logitech Driving Force report descriptor
    [  109.115320] input: Driving Force GT as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C294.0001/input/input0
    [  109.115622] logitech 0003:046D:C294.0001: input,hidraw0: USB HID v1.00 Joystick [Driving Force GT] on usb-3f980000.usb-1.4/input0
    [  109.127620] usb 1-1.4: USB disconnect, device number 4
    [  109.586664] usb 1-1.4: new full-speed USB device number 5 using dwc_otg
    [  109.737424] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c29a
    [  109.737436] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
    [  109.737444] usb 1-1.4: Product: Driving Force GT
    [  109.766105] input: Driving Force GT as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C29A.0002/input/input1
    [  109.767294] logitech 0003:046D:C29A.0002: input,hidraw0: USB HID v1.11 Joystick [Driving Force GT] on usb-3f980000.usb-1.4/input0
    [  109.767420] logitech 0003:046D:C29A.0002: Force feedback support for Logitech Gaming Wheels
    Some 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),
        Logical Minimum (0),
        Logical Maximum (7),
        Physical Minimum (0),
        Physical Maximum (315),
        Unit (Degrees),
        Usage (Hat Switch),             ; Hat switch (39h, dynamic value)
        Report Size (4),
        Report Count (1),
        Input (Variable, Null State),
        Unit,
        Logical Maximum (1),
        Physical Maximum (1),
        Usage Page (Button),            ; Button (09h)
        Usage Minimum (01h),
        Usage Maximum (15h),
        Report Size (1),
        Report Count (21),
        Input (Variable),
        Usage Page (FF00h),             ; FF00h, vendor-defined
        Usage (01h),
        Report Count (7),
        Input (Variable),
        Logical Maximum (16383),
        Physical Maximum (16383),
        Report Size (14),
        Report Count (1),
        Usage Page (Desktop),           ; Generic desktop controls (01h)
        Usage (X),                      ; X (30h, dynamic value)
        Input (Variable),
        Logical Maximum (1),
        Physical Maximum (1),
        Usage Page (FF00h),             ; FF00h, vendor-defined
        Usage (01h),
        Report Size (1),
        Report Count (2),
        Input (Variable),
        Logical Maximum (255),
        Physical Maximum (255),
        Usage Page (Desktop),           ; Generic desktop controls (01h)
        Usage (Y),                      ; Y (31h, dynamic value)
        Usage (Z),                      ; Z (32h, dynamic value)
        Report Size (8),
        Input (Variable),
        Report Count (7),
        Usage Page (FF00h),             ; FF00h, vendor-defined
        Usage (02h),
        Output (Variable),
        Report Count (131),
        Usage (03h),
        Feature (Variable),
    End Collection
    So looks somewhat normal: X, Y, Z... Need to look at again On teensy with debug stuff turned on.

  9. #334
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE, @defragster and others

    I think we are beginning to loose focus on what we started out doing with this incarnation of USBHost_t36, i.e., getting Bluetooth operational for the joysticks already identified - PS3, PS4 and XBOX controllers. PS3/PS4 seem to be operational for BT with XBOX TBD.

    With those controllers we started looking at creating a simple structure for getting the data remapped so it would be easier for the user to pull axis and button info. That's what that structure I presented as a starting point was meant to show. Attaching a real joystick vs a gamepad was just a test out of curiosity.

    With your last two posts we are now changing focus on to wired joysticks, which should be using HID but it is not really supported. I don't get any data dump for HID usage for the joystick or the XBOX like you already mentioned.

    Have no problem moving to using HID Joysticks but now that is a different beast than what we are doing for BT.

    Would recommend that we finish what we need to do for Bluetooth and then move over to HID joysticks, my term - wired joysticks Wish it was more than you and me and Tim having this conversation. Extra feedback would be nice as we said.

    I don't think the larger shield I have would work as I believe it uses the ICSP header and I don't remember if the teensy shield mapped pins 10-13 into that connector or not...
    Just took a look at the schematic for the shield and it looks like it has 10-13 wired into the ICSP header. Not sure of the power issues but there looks to be a 5v/3v jumper?

  10. #335
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    Focus - what's that? … back again had to start the woodstove and make tea and combat the dry air with humidifier ...

    Bt for USBHost seems like an important add - like any wireless way to talk with Teensy.

    Hey my MSFT Keyboard attached … oh wait focus …

    Using Frank's MEM imxrt-size tracker shows:
    ITCM : 50560 B (49.38 KB)
    DTCM : 37568 B (36.69 KB)
    OCRAM: 0 B (0.00 KB)
    Flash: 70352 B (68.70 KB)
    That is the info for KeyboardBT.ino. So I was not expecting it to look quite that big.
    T_3.6 shows this :
    Sketch uses 71512 bytes (6%) of program storage space. Maximum is 1048576 bytes.
    Global variables use 19408 bytes (7%) of dynamic memory, leaving 242736 bytes for local variables. Maximum is 262144 bytes.
    Anyhow - I suppose code size is a concern at some point - and that is the Debug version.

    Is there a compromise between Small / Simple / Uniform interface between USB/HID and Bt? Hopefully as prior post - Speed won't be an issue with some dozen bit/byte manipulations - as note on T$ that seems like it might in half the cycles of the T_3.6.

    For a given application if BtDeviceLibXYZ.h was pulled in for custom support that is almost what I expected - this isn't a Bt phone or Windows that needs to pickup any Random device. But it would be nice if certain classes of devices connected in a uniform way - USB/HID or Bt.

    Gotta run for breakfast - and tea over steep - woodstove is burning bright.

  11. #336
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    Hi @mjs513 and others...

    For me, there are multiple competing goals:

    That is before Bluetooth, the Joystick object was working (hopefully mostly still is) with USB, HID based joysticks when plugged in. Earlier tested again with PS3, PS4, and I did some testing with Teensy configured as Joystick, don't remember if I did much with monster joystick...

    XBox 360: Was I believe working wirelessly. But to do so, (NO USB port on them nor do they speak BT), instead it talked through Microsoft Wireless adapter:
    https://smile.amazon.com/Microsoft-A...dp/B00FAS1WDG/ I need to find where I put the one I purchased over a year ago...

    XBox One: I don't remember much on this one, will play more later...

    If HID dumping and the like is not working, maybe I busted something, I need to maybe check this out.

    Now with Bluetooth - Now trying to add support for all of these we can... The ones we know about as you mentioned are PS3, PS4, Xbox One.
    Maybe others? WII? With these I have two competing goals/desires:

    A) Code works the same if I have it plugged in or if I have it connected using BT. At least for some specific subsets, like buttons and standard Axis...

    B) The desire to make all of the Joysticks I use work the same, that is the same logical button maps the same, and same logical Axis maps the same...

    B1) and as a superset of B, you have a structure which breaks out your standard Bluetooth GamePad logical object, like you mentioned.

    Which I think B1 could be a great goal.

    And then there is another alternative that I am not sure if I would like or not... But will throw it up here.

    Someone could build a sub-class of Joystick object (called something like GamepadBT ), which hypothetically the main Joystick object did A) above and maybe map the BT to match the HID, but for those who want higher level Game pad functionality, could add in structure, maybe mapping of Accel and Gyro like information? Again not sure if this makes sense or not.

    Mike, again I think it would be great if you found an easy solution was found that met both A) and B1).

    As I mentioned yesterday for the short term, I will be more working on simply trying to get some of the underlying fundamentals to work. So far my attempt to get the name in the pair mode fails... Still want to setup a pair function for PS3, soon look at what Xbox One outputs, ...

  12. #337
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE and @defragster

    Sorry I have been sidetracked most of the day today - out shoveling snow, ice and water for about 2 and a half hours this morning then had to take wife to doctor and therapy.

    But I when I was just sitting I was thinking along the lines that Kurt mentioned that in the longer term have a game pad class or subset of joystick (have an idea on that). But what I am thinking about now is not worry about mega joysticks (64 bytes) but stick with the basic joystick size to start.

    A) The only thing that I didn't see for the standard joystick is where buttons are defined unless we use HAT to cover everything.
    B) The other thing with gamepads is that there are two joysticks - could just make LX,LY and LZ an array defined for gamepad or joystick.
    C) The last thing are the trigger values vs btn when pressed, for gamepad, again, could use slider as an array [2] defined somewhere.

    I did that a look at what Paul did for USB_joystick and USB_desc.

    EDIT: Just remembered another thought I had, create two structures, one for joystick and one for gamepad?

    EDIT: Not sure but going through the HID Usage Table document that you posted I think I got my answers.
    Last edited by mjs513; 03-04-2019 at 09:46 PM.

  13. #338
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    Another option:
    Code:
    struct data01
    {
    	uint16_t LX[0];
    	uint16_t LY[0];
    	uint16_t LZ[0];
    	uint16_t LX[1];   //1 for ps3,ps4, xbox second joystick
    	uint16_t LY[1];
    	uint16_t LZ[1];
    	uint16_t RX;
    	uint16_t RY;
    	uint16_t RZ;
    	uint8_t Start;
    	uint8_t Select;
    	uint16_t VX;	// accel-x
    	uint16_t VY;	// accel-y
    	uint16_t VZ;	// accel-z
    	uint16_t VBRX;	//touchpad-x
    	uint16_t VBRY;	//touchpad-y
    	uint8_t VBRZ;	//not used for now
    	uint8_t Slider;
    	uint8_t Dial;
    	uint8_t Wheel;
    	uint8_t Hat;	//Hat value on joystick
    	uint8_t Dpad;	//single value as opposed to ID 90-93 for arrows
    	uint8_t l_trig;	//my addition for left trig value on PS3/PS4/XBOX
    	uint8_t r_trig;	//my addition for rigth trig value on PS3/PS4/XBOX
    }
    	
    	
    union buttons09 {	//Table 14 not sure how to handle this
    	uint8_t 
    }
    
    union gpButtons {
    	uint8_t arrows;
    	uint8_t square;
    	uint8_t cross;
    	uint8_t circle;
    	uint8_t triangle;
    
    	uint8_t l1;
    	uint8_t r1;
    	uint8_t l2;
    	uint8_t r2;
    	uint8_t l3;
    	uint8_t r3;
    
    	uint8_t start;
    	uint8_t select;
    	uint8_t share;
    	uint8_t options;
    	
    	uint8_t ps;
    	uint8_t touchpad;
    }
    Just another though a little closer to HID usage but it appears there is some flexibility in formats

  14. #339
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE and @defragster

    Not sure where to put anything anymore - here or the other thread

    Anyway - I updated PS4 and the new example so axis[0] to axis[5] match PS3. The other axes are of course different and the button values are different as well - you all may what to see how bad I screwed it up. Pardon my language.

  15. #340
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    @defragster and @mjs513 - Thought I would mention, I did a quick and dirty update of message #1 in this thread, including copy of the data with some of the things we tested...

    Over time would be nice to have more of the, to use the Mouse, do the ... type information.

    Good news is, I believe all three of us can now edit this message

  16. #341
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    Well Good news is that it looks like I have edit ability now

    Not sure what the little IP address is - just clicked on it as a test - hope I didn't mess anything up...

  17. #342
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    Nice to see the first post with reference hardware. Glad you got Sr+ Mike - on the way to post office. Sr+ allows banning and other functions - seeing poster's ip comes with that.

    I pulled a ZIP of github and dumped with over write - not feeling up to github branching games . .. Didn't compile anything yet ...

  18. #343
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    I think, there may be a lot more stuff to figure out, on pairing with some devices, like I have two BT mice that don’t show up when I try pairing with them.

    This includes the one by logitech: https://smile.amazon.com/gp/product/B071VK5KXN/
    Also the Microsoft Arc Mouse: https://smile.amazon.com/Microsoft-E...dp/B072FG8LBV/

    The Arc mouse is one strange looking mouse. It is flat when turned off, you then bend it over to turn it on. There is two sort of buttons on it (one big one on top), but detects if pressing right side. There is some form of touch sensor on the button area, which you can use sort of like wheel and horizontal wheel (at least on windows)...

    Note: I tried the same BT dongle on a Linux 18.04 machine PC and some of these devices do show up...

    Also My routers show up, in list of things I can pair with.

    So there must be some differences on how it is searching. Also note HS2 did not see Arc mouse either...

  19. #344
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    @Paul, @mjs513 @defragster and anyone else...

    Not sure how far I want to go down this rabbit hole, I would like to hopefully figure out the XBox One Bluetooth stuff as it is actually seen.

    But as for the two mice, I mentioned in the previous posting, I am thinking it is a whole new set of code needed to handle.
    That is we are using the older standard way to talk to the devices, which is working for several things.

    But I think these new mice are using the LE setup to communicate and be setup. That is if you are looking at the Core_v5.1.pdf file there is whole section and then a whole volume describing the messages and events you need to handle for LE...

    I noticed this when I was trying to capture the USB packets on my PC talking to BT adapter while trying to pair up with XBox one controller.

    Near the start of the communications I was seeing:
    Code:
    SETUP	0x00	0x05	0x00 0x01 0x01 0x00 0x00 0x00 0x00 0x00
    IN	0x00	0x05	0x0000
    SETUP	0x00	0x05	0x20 0x00 0x00 0x00 0x00 0x00 0x04 0x00
    OUT	0x00	0x05	0x59 0x0C 0x01 0x00
    IN	0x01	0x13	0x0E 0x04 0x01 0x59 0x0C 0x00
    SETUP	0x00	0x05	0x20 0x00 0x00 0x00 0x00 0x00 0x08 0x00
    OUT	0x00	0x05	0x01 0x04 0x05 0x33 0x8B 0x9E 0x05 0x00
    IN	0x00	0x05	0x0000
    IN	0x01	0x13	0x0F 0x04 0x00 0x01 0x01 0x04
    SETUP	0x00	0x05	0x20 0x00 0x00 0x00 0x00 0x00 0x0A 0x00
    OUT	0x00	0x05	0x0B 0x20 0x07 0x01 0x12 0x00 0x12 0x00 0x00 0x00
    IN	0x00	0x05	0x0000
    IN	0x01	0x13	0x0E 0x04 0x01 0x0B 0x20 0x00
    SETUP	0x00	0x05	0x20 0x00 0x00 0x00 0x00 0x00 0x05 0x00
    OUT	0x00	0x05	0x0C 0x20 0x02 0x01 0x00
    IN	0x00	0x05	0x0000
    IN	0x01	0x13	0x0E 0x04 0x01 0x0C 0x20 0x00
    IN	0x01	0x13	0x3E 0x28 0x02 0x01 0x03 0x00 0x7D 0x2B 0x22 0x27 0x97 0xC0 0x1C 0x1B 0xFF 0x75
    IN	0x01	0x13	0x00 0x42 0x04 0x01 0x80 0x60 0xC0 0x97 0x27 0x22 0x2B 0x7D 0xC2 0x97 0x27 0x22
    IN	0x01	0x13	0x2B 0x7C 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0xC1
    IN	0x01	0x13	0x3E 0x2B 0x02 0x01 0x03 0x01 0xDA 0x2B 0xCD 0xC7 0x32 0x6C 0x1F 0x1E 0xFF 0x06
    IN	0x01	0x13	0x00 0x01 0x09 0x20 0x02 0xFF 0xB4 0xD0 0x90 0x2E 0xA6 0x45 0xBC 0x78 0x99 0x2F
    IN	0x01	0x13	0xE7 0xBC 0xE7 0x30 0x41 0x8D 0x88 0x6F 0x2E 0x56 0x7E 0x75 0xC9
    IN	0x01	0x13	0x3E 0x2B 0x02 0x01 0x03 0x01 0xDA 0x2B 0xCD 0xC7 0x32 0x6C 0x1F 0x1E 0xFF 0x06
    IN	0x01	0x13	0x00 0x01 0x09 0x20 0x02 0xFF 0xB4 0xD0 0x90 0x2E 0xA6 0x45 0xBC 0x78 0x99 0x2F
    IN	0x01	0x13	0xE7 0xBC 0xE7 0x30 0x41 0x8D 0x88 0x6F 0x2E 0x56 0x7E 0x75 0xD4
    IN	0x01	0x13	0x3E 0x1A 0x02 0x01 0x00 0x01 0xA2 0xDE 0xD5 0x19 0xF2 0x4D 0x0E 0x02 0x01 0x1A
    IN	0x01	0x13	0x0A 0xFF 0x4C 0x00 0x10 0x05 0x07 0x1C 0xA1 0xA2 0xF7 0xA5
    You see several commands Setup/OUT that are MSB = 0x20 which I highlighted in RED above. The one in green 0x401 HCI_Inquiry is the one to ask for devices to pair....

    But the 0x20 >> 2 is OGF=8 which is LE.
    So: 0x20B is HCI_LE_Set_Scan_Parameters
    and 0x20C is HCI_LE_Set_Scan_Enable

    And then we get a whole different set of events: The 0xE event (HCI_LE_Connection_Complete) which the on in Red is 0x28 bytes in length, so it took 3 messages to receive all of it...
    And we get get several of these sets of packets. My guess is that one of them would be the mouse if turned on in pair mode...

    So again not sure if I am going to go down this rabbit hole!

  20. #345
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    Quote Originally Posted by KurtE
    So again not sure if I am going to go down this rabbit hole!
    Not really sure you want to do that deep the rabbit hole at this point. It would probably require a whole rewrite or major restructure to get it working. Maybe later do a LE library if you are a glutton for punishment

  21. #346
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    @KurtE - I'd agree with Mike - perhaps if you got xBox1 working to some point for a placeholder. That seems like a new case of cans of worms. The only time I posted how big the code was it seemed large already - but that was a debug snapshot. Not that code size is super critical on T$ - but a bit more so on T_3.6 - for instance FrankB used it in C64 and already ported a private copy - not sure if that was for function or size.

    Given the break for LE rules and extensions - Probably best to make sure the common base code it ready to merge. Would be nice to have it all figured out and rewritten now if needed to support LE - but that would be a choice based on the need for that and the time on task to make that work.

  22. #347
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE and @defragster

    I downloaded the updated library and gave it a spin for the xbox. If I use pairing I am seeing this:
    Code:
    BT rx_data(16): 2f ff 1 e9 a7 db 1b aa 9c 1 0 8 5 0 ff a 
    BT rx_data(16): cb 19 9 58 62 6f 78 20 57 69 72 65 6c 65 73 73 
    BT rx_data(16): 20 43 6f 6e 74 72 6f 6c 6c 65 72 3 3 24 11 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(1): 0 
        Extended Inquiry Result - Count: 1
          BD:e9:a7:db:1b:aa:9c, PS:1, class: 508
          Local Name: Xbox Wireless Controller
          Peripheral device
            Gamepad
    BluetoothController::find_driver  driver 1fff4a38
    JoystickController::claim_bluetooth TRUE
      JoystickController::mapNameToJoystickType 1fff4a20 Xbox Wireless Controller - set to XBOXONE
      Joystick Type: 3
        *** Claimed ***
    HCI_INQUIRY_CANCEL called (02 04 00 )
        Control callback (bluetooth): 100 : 2 4 0 
    BT rx_data(6): e 4 1 2 4 0 
        Command Completed! 
    HCI_CREATE_CONNECTION called (05 04 0d e9 a7 db 1b aa 9c 18 cc 01 00 00 00 00 )
        Control callback (bluetooth): 101 : 5 4 d e9 a7 db 1b aa 9c 18 cc 1 0 0 0 0 
    BT rx_data(6): f 4 0 1 5 4 
        Command 405 Status 0
    s BT rx_data(13): 3 b 0 b 0 e9 a7 db 1b aa 9c 1 0 
        Connection Complete - ST:0 LH:b
    HCI_AUTH_REQUESTED called (11 04 02 0b 00 )
        Control callback (bluetooth): 110 : 11 4 2 b 0 
    BT rx_data(6): f 4 0 1 11 4 
        Command 411 Status 0
    BT rx_data(8): 17 6 e9 a7 db 1b aa 9c 
        Event: Link Key Request e9:a7:db:1b:aa:9c
    HCI_LINK_KEY_NEG_REPLY called (0c 04 06 e9 a7 db 1b aa 9c )
        Control callback (bluetooth): 120 : c 4 6 e9 a7 db 1b aa 9c 
    BT rx_data(12): e a 1 c 4 0 e9 a7 db 1b aa 9c 
        Command Completed! 
    BT rx_data(8): 16 6 e9 a7 db 1b aa 9c 
        Event: Pin Code Request e9:a7:db:1b:aa:9c
    HCI_PIN_CODE_REPLY called (0d 04 17 e9 a7 db 1b aa 9c 04 30 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 )
        Control callback (bluetooth): 130 : d 4 17 e9 a7 db 1b aa 9c 4 30 30 30 30 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(12): e a 1 d 4 0 e9 a7 db 1b aa 9c 
        Command Completed! 
    BT rx_data(5): 1b 3 b 0 5 
    
    =====================
    BT rx2_data(16): b 20 c 0 8 0 1 0 2 1 4 0 1 0 40 0 
        L2CAP Connection Request: ID: 1, PSM: 1, SCID: 40
     40BT rx_data(5): 6 3 6 b 0 
        Event: HCI Authentication complete(6): handle: b
    ConnectionRequest called(0b 20 0c 00 08 00 01 00 02 00 04 00 11 00 70 00 )
    tx_data callback (bluetooth): 0 : b 20 c 0 8 0 1 0 2 0 4 0 11 0 70 0 
    
    =====================
    BT rx2_data(20): b 20 10 0 c 0 1 0 3 0 8 0 40 0 70 0 3 0 0 0 
        L2CAP Connection Response: ID: 0, Dest:40, Source:70, Result:3, Status: 0
          Control Response
    L2CAP_ConfigRequest called(0b 20 10 00 0c 00 01 00 04 00 08 00 40 00 00 00 01 02 ff ff )
    tx_data callback (bluetooth): 0 : b 20 10 0 c 0 1 0 4 0 8 0 40 0 0 0 1 2 ff ff 
    BT rx_data(7): 13 5 1 b 0 2 0 
    
    =====================
    BT rx2_data(18): b 20 e 0 a 0 1 0 1 0 6 0 2 0 40 0 0 0 
        L2CAP command reject: ID: 0, length:6, Reason:2,  Data: 0 40 
    40 BT rx_data(6): 5 4 0 b 0 8 
        Event: HCI Disconnect complete(0): handle: b, reason:8
    Without pairing you can see there is a different header for extended message:
    Code:
    BluetoothController claim this=1fff36e0 vid:pid=a5c:21e8
        9 4 0 0 3 ff 1 1 0 7 5 81 3 10 0 1 7 5 82 2 40 0 1 7 5 2 2 40 0 1 9 4 1 0 2 ff 1 1 0 7 5 83 1 0 0 1 7 5 3 1 0 0 1 9 4 1 1 2 ff 1 1 0 7 5 
        83 1 9 0 1 7 5 3 1 9 0 1 9 4 1 2 2 ff 1 1 0 7 5 83 1 11 0 1 7 5 3 1 11 0 1 9 4 1 3 2 ff 1 1 0 7 5 83 1 19 0 1 7 5 3 1 19 0 1 9 4 1 4 2 ff 
        1 1 0 7 5 83 1 21 0 1 7 5 3 1 21 0 1 9 4 1 5 2 ff 1 1 0 7 5 83 1 31 0 1 7 5 3 1 31 0 1 9 4 2 0 2 ff ff ff 0 7 5 84 2 20 0 1 7 5 4 2 20 0 1 9 
        4 3 0 0 fe 1 1 0 9 21 5 88 13 40 0 10 1 
          rxep=1(16) txep=2(64) rx2ep=2(64)
    HCI_RESET called (03 0c 00 )
        Control callback (bluetooth): 1 : 3 c 0 
    BT rx_data(6): e 4 1 3 c 0 
        Command Completed! 
    HCI_WRITE_CLASS_OF_DEV called (24 0c 03 04 08 00 )
        Control callback (bluetooth): 3 : 24 c 3 4 8 0 
    BT rx_data(6): e 4 1 24 c 0 
        Command Completed! 
    HCI_Read_BD_ADDR called (09 10 00 )
        Control callback (bluetooth): 4 : 9 10 0 
    BT rx_data(12): e a 1 9 10 0 e0 e 0 86 19 0 
        Command Completed! 
       BD Addr:e0:e:0:86:19:0
    HCI_Read_Local_Version_Information called (01 10 00 )
        Control callback (bluetooth): 4 : 1 10 0 
    BT rx_data(14): e c 1 1 10 0 6 0 10 6 f 0 e 22 
        Command Completed! 
        Local Version: 6
    HCI_WRITE_SCAN_ENABLE called(1a 0c 01 02 )
        Control callback (bluetooth): 0 : 1a c 1 2 
    BT rx_data(6): e 4 1 1a c 0 
        Command Completed! 
    Write_Scan_enable Completed
    tedBT rx_data(12): 4 a e9 a7 db 1b aa 9c 8 5 0 1 
        Event: Incoming Connect -  e9:a7:db:1b:aa:9c CL:508 LT:1
          Peripheral device
            Gamepad
    BluetoothController::find_driver  driver 1fff4a38
    JoystickController::claim_bluetooth TRUE
        *** Claimed ***
    HCI_OP_REMOTE_NAME_REQ called (19 04 0a e9 a7 db 1b aa 9c 01 00 00 00 )
        Control callback (bluetooth): 0 : 19 4 a e9 a7 db 1b aa 9c 1 0 0 0 
    BT rx_data(6): f 4 0 1 19 4 
        Command 419 Status 0
    BT rx_data(16): 7 ff 0 e9 a7 db 1b aa 9c 58 62 6f 78 20 57 69 
    BT rx_data(16): 72 65 6c 65 73 73 20 43 6f 6e 74 72 6f 6c 6c 65 
    BT rx_data(16): 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
    BT rx_data(1): 0 
        Event: handle_hci_remote_name_complete(0)
        Remote Name: Xbox Wireless Controller
      JoystickController::mapNameToJoystickType 1fff4a20 Xbox Wireless Controller - set to XBOXONE
      Joystick Type: 3
    HCI_OP_ACCEPT_CONN_REQ called (09 04 07 e9 a7 db 1b aa 9c 00 )
        Control callback (bluetooth): 0 : 9 4 7 e9 a7 db 1b aa 9c 0 
    BT rx_data(6): f 4 0 1 9 4 
        Command 409 Status 0
    BT rx_data(10): 12 8 0 e9 a7 db 1b aa 9c 0 
    BT rx_data(13): 3 b 0 b 0 e9 a7 db 1b aa 9c 1 0 
        Connection Complete - ST:0 LH:b
    BT rx_data(5): 1b 3 b 0 5 
    BT rx_data(8): 17 6 e9 a7 db 1b aa 9c 
        Event: Link Key Request e9:a7:db:1b:aa:9c
    HCI_LINK_KEY_NEG_REPLY called (0c 04 06 e9 a7 db 1b aa 9c )
        Control callback (bluetooth): 120 : c 4 6 e9 a7 db 1b aa 9c 
    BT rx_data(12): e a 1 c 4 0 e9 a7 db 1b aa 9c 
        Command Completed! 
    BT rx_data(6): 5 4 0 b 0 15 
        Event: HCI Disconnect complete(0): handle: b, reason:15
    :15

  23. #348
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    2,697
    @KurtE and @defragster
    I just retested with the PS4 and the PS3 with the latest release - just as a double check. All is good - still pairs fine and sketch runs.

  24. #349
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,205
    @mjs513 and @defragster - I agree the LE can probably wait until later.

    As for @FrankB - If I remember correctly he is using is own class with the C64 stuff as he wanted more control over how the raw keyscans get converted to characters...

    I uploaded the stuff today as It finally gave me the way (probably proper way) for the pairing branch to get the name of the device. I figured that there was a reasonable way to do it as, most UI's you see, like paring with the PC gives you the names of the object and allows you to choose it. Right now hoping to figure out XBox, as you mentioned, the traces are different. I was trying to figure out where I diverged in both cases.

    I know it probably would help if I had proper tools to display the USB traces I am seeing from the PC... Probably could hack up something, but right now doing it manually.

    That is in my current code we see:
    Code:
    BluetoothController claim this=20004340 vid:pid=a12:1
        9 4 0 0 3 e0 1 1 0 7 5 81 3 10 0 1 7 5 2 2 40 0 1 7 5 82 2 40 0 1 9 4 1 0 2 e0 1 1 0 7 5 3 1 0 0 1 7 5 83 1 0 0 1 9 4 1 1 2 e0 1 1 0 7 5
        3 1 9 0 1 7 5 83 1 9 0 1 9 4 1 2 2 e0 1 1 0 7 5 3 1 11 0 1 7 5 83 1 11 0 1 9 4 1 3 2 e0 1 1 0 7 5 3 1 19 0 1 7 5 83 1 19 0 1 9 4 1 4 2 e0
        1 1 0 7 5 3 1 21 0 1 7 5 83 1 21 0 1 9 4 1 5 2 e0 1 1 0 7 5 3 1 31 0 1 7 5 83 1 31 0 1
          rxep=1(16) txep=2(64) rx2ep=2(64)
    HCI_RESET called (03 0c 00 )
        Control callback (bluetooth): 1 : 3 c 0
    BT rx_data(6): e 4 1 3 c 0
        Command Completed!
    HCI_WRITE_CLASS_OF_DEV called (24 0c 03 04 08 00 )
        Control callback (bluetooth): 3 : 24 c 3 4 8 0
    BT rx_data(6): e 4 1 24 c 0
        Command Completed!
    HCI_Read_BD_ADDR called (09 10 00 )
        Control callback (bluetooth): 4 : 9 10 0
    BT rx_data(12): e a 1 9 10 0 11 71 da 7d 1a 0
        Command Completed!
       BD Addr:11:71:da:7d:1a:0
    HCI_Read_Local_Version_Information called (01 10 00 )
        Control callback (bluetooth): 4 : 1 10 0
    BT rx_data(14): e c 1 1 10 0 6 bb 22 6 a 0 bb 22
        Command Completed!
        Local Version: 6
    HCI_WRITE_INQUIRY_MODE called (45 0c 01 02 )
        Control callback (bluetooth): 6 : 45 c 1 2
    BT rx_data(6): e 4 1 45 c 0
        Command Completed!
    HCI_Set_Event_Mask called (01 0c 08 ff ff ff ff ff 5f 00 00 )
        Control callback (bluetooth): 7 : 1 c 8 ff ff ff ff ff 5f 0 0
    BT rx_data(6): e 4 1 1 c 0
        Command Completed!
    HCI_INQUIRY called (01 04 05 33 8b 9e 30 0a )
        Control callback (bluetooth): 8 : 1 4 5 33 8b 9e 30 a
    BT rx_data(6): f 4 0 1 1 4
        Command 401 Status 0
    BT rx_data(16): 2f ff 1 dc 13 d6 1b aa 9c 1 2 8 5 0 c 62
    BT rx_data(16): d5 19 9 58 62 6f 78 20 57 69 72 65 6c 65 73 73
    BT rx_data(16): 20 43 6f 6e 74 72 6f 6c 6c 65 72 3 3 24 11 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(16): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(1): 0
        Extended Inquiry Result - Count: 1
          BD:dc:13:d6:1b:aa:9c, PS:1, class: 508
          Local Name: Xbox Wireless Controller
          Peripheral device
            Gamepad
    BluetoothController::find_driver  driver 20005698
    JoystickController::claim_bluetooth TRUE
      JoystickController::mapNameToJoystickType 20005680 Xbox Wireless Controller - set to XBOXONE
      Joystick Type: 3
        *** Claimed ***
    HCI_INQUIRY_CANCEL called (02 04 00 )
        Control callback (bluetooth): 100 : 2 4 0
    BT rx_data(6): e 4 1 2 4 0
        Command Completed!
    HCI_CREATE_CONNECTION called (05 04 0d dc 13 d6 1b aa 9c 18 cc 01 00 00 00 00 )
        Control callback (bluetooth): 101 : 5 4 d dc 13 d6 1b aa 9c 18 cc 1 0 0 0 0
    BT rx_data(6): f 4 0 1 5 4
        Command 405 Status 0
    BT rx_data(13): 3 b 0 48 0 dc 13 d6 1b aa 9c 1 0
        Connection Complete - ST:0 LH:48
    HCI_AUTH_REQUESTED called (11 04 02 48 00 )
        Control callback (bluetooth): 110 : 11 4 2 48 0
    BT rx_data(6): f 4 0 0 11 4
        Command 411 Status 0
    
    =====================
    BT rx2_data(16): 48 20 c 0 8 0 1 0 2 1 4 0 1 0 40 0
        L2CAP Connection Request: ID: 1, PSM: 1, SCID: 40
    BT rx_data(5): 1b 3 48 0 5
    BT rx_data(8): 17 6 dc 13 d6 1b aa 9c
        Event: Link Key Request dc:13:d6:1b:aa:9c
    HCI_LINK_KEY_NEG_REPLY called (0c 04 06 dc 13 d6 1b aa 9c )
    BT rx_data(6): f 4 0 1 0 0
        Command 0 Status 0
        Control callback (bluetooth): 120 : c 4 6 dc 13 d6 1b aa 9c
    BT rx_data(12): e a 1 c 4 0 dc 13 d6 1b aa 9c
        Command Completed!
    BT rx_data(8): 16 6 dc 13 d6 1b aa 9c
        Event: Pin Code Request dc:13:d6:1b:aa:9c
    HCI_PIN_CODE_REPLY called (0d 04 17 dc 13 d6 1b aa 9c 04 30 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 )
        Control callback (bluetooth): 130 : d 4 17 dc 13 d6 1b aa 9c 4 30 30 30 30 0 0 0 0 0 0 0 0 0 0 0 0
    BT rx_data(12): e a 1 d 4 0 dc 13 d6 1b aa 9c
        Command Completed!
    BT rx_data(5): 6 3 6 48 0
        Event: HCI Authentication complete(6): handle: 48
    ConnectionRequest called(48 20 0c 00 08 00 01 00 02 00 04 00 11 00 70 00 )
    tx_data callback (bluetooth): 0 : 48 20 c 0 8 0 1 0 2 0 4 0 11 0 70 0
    BT rx_data(7): 13 5 1 48 0 1 0
    
    =====================
    BT rx2_data(20): 48 20 10 0 c 0 1 0 3 0 8 0 40 0 70 0 3 0 0 0
        L2CAP Connection Response: ID: 0, Dest:40, Source:70, Result:3, Status: 0
          Control Response
    L2CAP_ConfigRequest called(48 20 10 00 0c 00 01 00 04 00 08 00 40 00 00 00 01 02 ff ff )
    tx_data callback (bluetooth): 0 : 48 20 10 0 c 0 1 0 4 0 8 0 40 0 0 0 1 2 ff ff
    BT rx_data(7): 13 5 1 48 0 1 0
    
    =====================
    BT rx2_data(18): 48 20 e 0 a 0 1 0 1 0 6 0 2 0 40 0 0 0
        L2CAP command reject: ID: 0, length:6, Reason:2,  Data: 0 40
    BT rx_data(6): 5 4 0 48 0 15
        Event: HCI Disconnect complete(0): handle: 48, reason:15
    So if I look through the data I captured from PC: starting at about line 383

    Code:
    OUT,0x00,0x05,0x0C 0x04 0x06 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0xE567
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x0A 0x01 0x0C 0x04 0x00 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0xDDF6
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x06 0x00,0x4CBE
    OUT,0x00,0x05,0x2D 0x0C 0x03 0x46 0x00 0x01,0xC9C9
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x07 0x01 0x2D 0x0C 0x00 0x46 0x00 0x08,0x261E
    IN,0x01,0x13,0x13 0x05 0x01 0x46 0x00 0x01 0x00,0x73EF
    IN,0x02,0x00,0x46 0x20 0x10 0x00 0x0C 0x00 0x01 0x00 0x03 0x0C 0x08 0x00 0x41 0x00 0x40 0x00 0x00 0x00 0x00 0x00,0x09A6
    OUT,0x02,0x00,0x46 0x00 0x10 0x00 0x0C 0x00 0x01 0x00 0x04 0x0D 0x08 0x00 0x41 0x00 0x00 0x00 0x01 0x02 0x00 0x04,0xC673
    IN,0x02,0x00,0x46 0x20 0x10 0x00 0x0C 0x00 0x01 0x00 0x04 0x01 0x08 0x00 0x40 0x00 0x00 0x00 0x01 0x02 0xC8 0x05,0x9D90
    OUT,0x02,0x00,0x46 0x00 0x12 0x00 0x0E 0x00 0x01 0x00 0x05 0x01 0x0A 0x00 0x41 0x00 0x00 0x00 0x00 0x00 0x01 0x02 0x00 0x04,0x92F3
    IN,0x01,0x13,0x13 0x05 0x01 0x46 0x00 0x01 0x00,0x73EF
    IN,0x02,0x00,0x46 0x20 0x0E 0x00 0x0A 0x00 0x01 0x00 0x05 0x0D 0x06 0x00 0x40 0x00 0x00 0x00 0x00 0x00,0x4BD7
    IN,0x01,0x13,0x13 0x05 0x01 0x46 0x00 0x01 0x00,0x73EF
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x05 0x00,0xBCBE
    OUT,0x00,0x05,0x11 0x04 0x02 0x46 0x00,0x6CB5
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0F 0x04 0x00 0x01 0x11 0x04,0x8852
    IN,0x01,0x13,0x17 0x06 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x0739
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x09 0x00,0xBCBB
    OUT,0x00,0x05,0x0C 0x04 0x06 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0xE567
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x0A 0x01 0x0C 0x04 0x00 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0xDDF6
    IN,0x01,0x13,0x31 0x06 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x35BB
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x0C 0x00,0xECB8
    OUT,0x00,0x05,0x2B 0x04 0x09 0xDC 0x13 0xD6 0x1B 0xAA 0x9C 0x01 0x00 0x05,0xF7A0
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x0A 0x01 0x2B 0x04 0x00 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x2C49
    IN,0x01,0x13,0x32 0x09 0xDC 0x13 0xD6 0x1B 0xAA 0x9C 0x03 0x00 0x04,0xFD27
    IN,0x01,0x13,0x33 0x0A 0xDC 0x13 0xD6 0x1B 0xAA 0x9C 0x1D 0xA7 0x0B 0x00,0x19BD
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x09 0x00,0xBCBB
    OUT,0x00,0x05,0x2C 0x04 0x06 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x24FE
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x0A 0x01 0x2C 0x04 0x00 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x1C6F
    IN,0x01,0x13,0x36 0x07 0x05 0xDC 0x13 0xD6 0x1B 0xAA 0x9C,0x513E
    OUT,0x02,0x00,0x46 0x00 0x0C 0x00 0x08 0x00 0x01 0x00 0x06 0x0E 0x04 0x00 0x41 0x00 0x40 0x00,0xD904
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x06 0x00,0x4CBE
    OUT,0x00,0x05,0x06 0x04 0x03 0x46 0x00 0x13,0x1EAE
    IN,0x01,0x13,0x06 0x03 0x05 0x46 0x00,0xDA71
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x13 0x05 0x01 0x46 0x00 0x01 0x00,0x73EF
    IN,0x01,0x13,0x0F 0x04 0x00 0x01 0x06 0x04,0x785D
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x04 0x00,0x2CBF
    OUT,0x00,0x05,0x59 0x0C 0x01 0x00,0xD42C
    IN,0x02,0x00,0x46 0x20 0x0C 0x00 0x08 0x00 0x01 0x00 0x07 0x0E 0x04 0x00 0x41 0x00 0x40 0x00,0x0DE5
    IN,0x01,0x13,0x0E 0x04 0x01 0x59 0x0C 0x00,0xE5DB
    IN,0x00,0x05,0x0000
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x08 0x00,0x2CBA
    OUT,0x00,0x05,0x01 0x04 0x05 0x33 0x8B 0x9E 0x05 0x00,0xF376
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0F 0x04 0x00 0x01 0x01 0x04,0x485F
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x0A 0x00,0x4CBB
    OUT,0x00,0x05,0x0B 0x20 0x07 0x01 0x12 0x00 0x12 0x00 0x00 0x00,0xF030
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x04 0x01 0x0B 0x20 0x00,0xF466
    SETUP,0x00,0x05,0x20 0x00 0x00 0x00 0x00 0x00 0x05 0x00,0xBCBE
    OUT,0x00,0x05,0x0C 0x20 0x02 0x01 0x00,0x6E60
    IN,0x00,0x05,0x0000
    IN,0x01,0x13,0x0E 0x04 0x01 0x0C 0x20 0x00,0x35D7
    IN,0x01,0x13,0x3E 0x1A 0x02 0x01 0x00 0x01 0x49 0x56 0x15 0x38 0x7E 0x78 0x0E 0x02 0x01 0x1A,0x04BA
    IN,0x01,0x13,0x0A 0xFF 0x4C 0x00 0x10 0x05 0x01 0x1C 0x57 0xC5 0x0F 0xB3,0x0AB2
    IN,0x01,0x13,0x3E 0x0C 0x02 0x01 0x04 0x01 0x49 0x56 0x15 0x38 0x7E 0x78 0x00 0xB3,0x6943
    IN,0x01,0x13,0x3E 0x2B 0x02 0x01 0x03 0x01 0xDA 0x2B 0xCD 0xC7 0x32 0x6C 0x1F 0x1E 0xFF 0x06,0x9D3C
    I see two place that output the HCI_LINK_KEY_NEG_REPLY command as shown in Red

    After that I expect to see a BT rx_data(8): 16 6 dc 13 d6 1b aa 9c
    Event: Pin Code Request dc:13:d6:1b:aa:9c

    Which I am not seeing...

  25. #350
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,839
    That sounds right for FrankB's mod that reminds me ... there was some USB interference with VGA and so many other things he had to contend with.

    I've been off on new tangents - one was hoping to make an edit to TouchScreen 2046 to have a getPix(x,y,pnt) with inbuilt mapping - and the code I had working before put into the class is not giving me expected results yet when rotating the 9341 display. I have it on a T_3.5 not sure where the anomaly is from. Was hoping that would match my prior results so I could migrate it to a common lib for the 9488 I'm missing something somewhere as my old button code maps properly to any of 20 tested screen buttons - on all their corners - in all four rotations on the same unit - using the same lib but local map functions ... apparently I've missed something I knew 38 months ago ... cut/paste/adjust ...

Posting Permissions

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