Forum Rule: Always post complete source code & details to reproduce any issue!
Page 34 of 34 FirstFirst ... 24 32 33 34
Results 826 to 835 of 835

Thread: T3.6 USB Host - Bluetooth

  1. #826
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,588
    Quote Originally Posted by KurtE View Post
    @mjs513 - Good morning...

    I am guessing there could be some form of timing issue. Example Yesterday I decide to make a version with GDB stub to see if maybe we crashed or the like, and instead it started showing some joystick messages...
    So will debug some more.

    I may for the fun of it hack up a new HID program (as per the other thread) to see if maybe we could for new HID based devices make it simple for us to see what data we are receiving and output... That way maybe make it easier to understand...
    @KurtE
    timing issue ran through my idea last night as well. Tried turning off the debugging stuff just to see what would happen. Basically nothing - had same issue. But had no idea where to even start to play with the timing unless its something with poll time or the interrupt not firing or the USB not keeping up? Don't know. Speaking out of my hat now but just things that went through my head.

    Hacking up a HID program to make it easier to use would be very useful! Maybe I would even learn how HID works.

    Oh interesting thing about my BT dongle linking up to my TV. Turns out it is hooking up to my TV in the living room. This morning I was able to link to it over my phone so I can watch you tube videos on it

  2. #827
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,588
    Out of curiosity (that one always gets me), I added a delay(4) in rx_data after que:
    Code:
    			default:
    				DBGPrintf("BluetoothController::rx_data : Unknown BT rx_data");
    				break;
    	    }
    		// Start read at start of buffer. 
    		queue_Data_Transfer(rxpipe_, rxbuf_, rx_size_, this);
    		if(rxbuf_[0] == EV_MAX_SLOTS_CHANGE) delay(4);
    	} else {
    and it did manage to get a bit farther on a T4.1 so that at least I got a joystick data:
    Code:
    Write_Scan_enable Completed
      JoystickController::connectionComplete 200076e0 joystick type 3
    1B 03 48 00 01 
    
    BT rx_data(5): 1b 3 48 0 1 
        EV_MAX_SLOTS_CHANGE - Slots: 1
    1B 03 48 00 05 
    
    BT rx_data(5): 1b 3 48 0 5 
        EV_MAX_SLOTS_CHANGE - Slots: 5
    
    =====================
    BT rx2_data(25): 48 20 15 0 11 0 71 0 a1 1 91 8c eb 86 f5 59 0 0 0 0 0 0 0 0 0 
    HID HDR Data: len: 17, Type: 1 Con:0 drvr:200076f8
    JoystickController::process_bluetooth_HID_data: data[0]=1
      Joystick Data: 01 91 8c eb 86 f5 59 00 00 00 00 00 00 00 00 00
    ok so now back to playing

  3. #828
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,636
    Afternoon now...

    I did some hacking up of a dump HID inputs... Maybe take a look and see what you think?
    Attached Files Attached Files

  4. #829
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,588
    @KurtE
    Gave it a try and posted my comments in the other thread. But I like it when you have a wired device. Be interesting if we could do that with attached Bluetooth devices as well . May look at that later - painting in progress

    Anyway. wanted to see if my PS4 still worked with the modifications. Unfortunately when i try to pair it does seem to even recognize the PS4 anymore. Since i have already paired it with the dongle i am using it does see and seems to work for a couple of seconds and then disconnects and have to reconnect. May want to give yours a try and see if you are seeing the same behavior?

  5. #830
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Does current version of library have no problem with connect via bt dongle with both version of dualshock 4?

  6. #831
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Quote Originally Posted by Dziubasku View Post
    Does current version of library have no problem with connect via bt dongle with both version of dualshock 4?
    I already try run on teensy 4.1, example-JoystickBT with dualshock 4(v2) borrowed from my friend, but connections via bluetooth dont work.
    Code:
    *** Device Bluet a12:1 - connected ***
      product: CSR8510 A10
      BDADDR: 10:71:da:7d:1a:0
    BluetoothController::find_driver  driver 20004b78
        *** Claimed ***
    *** BTHID Device Joystick1 0:0 - connected ***
      product: Wireless Controller
      Serial: �
    In example(JoystickBT.ino) I olny comment line:
    Code:
    BluetoothController bluet(myusb);   // version assumes it already was paired
    and uncomment
    Code:
    BluetoothController bluet(myusb, true, "0000");   // Version does pairing to device
    Earlier I had same problems with xbox one controller.

  7. #832
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,636
    XBox One has never worked. I have worked on it on and off, but it will require new portions of new Bluetooth subsections.

    However PS3 and PS4 have worked. I have found the PS4 to be more temperamental in the binding.

    Probably my most stable and advanced, i.e. in can at times support more than one BT device to connect.
    https://github.com/KurtE/USBHost_t36...BT-Multi-Merge

    It has been awhile since i have used the PS4, but I often needed to make sure it was reasonably fully charged, and then I think we got the bind process to work, where you do as you mentioned and do the bind process, and bring it up and hold share and push PS (if I remember correctly until you get the right blink and then hopefully it pairs up.

    Then at times I did not have it properly talking PS4 in this bind mode, so would then reprogram without the bind, and then hopefully when the program starts up you can simply press the PS button and it connects. Sometimes in past it could take a couple of attempts to get it to connect, but then usually worked.

  8. #833
    Junior Member
    Join Date
    Oct 2020
    Posts
    3
    Your version of USBHost doesnt help, but I found where was problem - my usb dongle(probably dont support edr or i don't know), I bought another one and now I can connect via bluetooth but after every time i need pair again and working only verison with uncomment this line
    Code:
    BluetoothController bluet(myusb, true, "0000");   // Version does pairing to device
    Also after pairing I have always connections but sometimes connection works but data have offset or something
    Code:
    LX: 1, LY: 124, RX: 129, RY: 8 
    
    L-Trig: 129, R-Trig: 124
    
    Buttons: 0
    
    Battery Status: 0
    Accel-g's: 0.000000, 0.000000, 0.000000
    Gyro-deg/sec: 0.000000, 0.000000, 0.000000
    Pitch/Roll: 180.000000, 180.000000
    Accel-g's/Gyro-deg/sec are 0 Pitch/Roll 180/180 but instead this another value changes when I moving pad.

    Everything is good almost always(data are fine)when I do this step by step:
    -start code with unplug dongle
    -plug in dongle
    -unplug
    -plug in again
    -start pairing pad(ps icon+share button on pad)
    Code:
    LX: 128, LY: 129, RX: 128, RY: 124 
    
    L-Trig: 0, R-Trig: 0
    
    Buttons: 8
    
    Battery Status: 30
    Accel-g's: -0.015259, 0.212524, 0.964844
    Gyro-deg/sec: 0.783341, 0.895247, 0.503576
    Pitch/Roll: 192.422073, 179.093948
    There is any way to only one time pair pad with dongle and next after every reset connections back without problems?

  9. #834
    Junior Member
    Join Date
    May 2019
    Posts
    3
    Hey KurtE, I believe you did the work for the ps move? It's awesome! I had it running for months with a ps3 move and plugable BT 4.0 dongle (both of were from pre-2018). I recently purchased a new plugable BT 4.0 dongle and it no longer works with any of my move controllers. They display the "attempt pairing" message, but they never connect after removing from USB. What dongle do you use? None of my new dongles seem to work.

  10. #835
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,374
    Quote Originally Posted by cgc View Post
    Hey KurtE, I believe you did the work for the ps move? It's awesome! I had it running for months with a ps3 move and plugable BT 4.0 dongle (both of were from pre-2018). I recently purchased a new plugable BT 4.0 dongle and it no longer works with any of my move controllers. They display the "attempt pairing" message, but they never connect after removing from USB. What dongle do you use? None of my new dongles seem to work.
    See post #1 this thread for some details on the Bt dongles used to work.

Posting Permissions

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