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

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,640
    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,640
    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
    5
    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,377
    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.

  11. #836
    Junior Member
    Join Date
    May 2019
    Posts
    5
    Quote Originally Posted by defragster View Post
    See post #1 this thread for some details on the Bt dongles used to work.
    Thanks, I purchased 3 dongles from that list. I'm using the "PANBT400 Plugable Bt 4.0 Low Energy" dongle but it's not working for me yet. I owned this exact dongle (purchased in 2017/2018) and it worked fine but I gave it to a friend. The only notable difference between that and this new version is a small bluetooth icon printed on the outside. I'm guessing they've made little tweaks as time passed? "Kinivo BTD-400 BT 4.0 Low Energy" is also not working for me. "ZEXMTE Bluetooth USB Adapter CSR 4.0" as well. They connect and display their NAME/ADDR but they wont pair after displaying the "attempting to pair" message.

    Some say "connect" and one says "good". Does "connect" mean they are fully functional or only "connecting and mostly untested"?

    Do you have a recommendation on how to collect some quality info to debug the connection? I'm about to do some digging.

  12. #837
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,377
    That post Jan 2018 - a few were tried and that post was updated - but you can see the one with more names is labelled GOOD and was the main common test unit. Not now sure what 'connect' means - perhaps thread search for those units and a post will detail results?

    Most of the work was done with T_3.6 when T_4.0 was in beta as the Beta unit breakouts had USBHost on the breakout the three of us had. Once a stable Bt dongle was found that search stopped to move onto devices - except to find that a finicky Bt_5.0 one the other month wholly failed to show promise.

  13. #838
    Junior Member
    Join Date
    May 2019
    Posts
    5
    Quote Originally Posted by defragster View Post
    That post Jan 2018 - a few were tried and that post was updated - but you can see the one with more names is labelled GOOD and was the main common test unit. Not now sure what 'connect' means - perhaps thread search for those units and a post will detail results?

    Most of the work was done with T_3.6 when T_4.0 was in beta as the Beta unit breakouts had USBHost on the breakout the three of us had. Once a stable Bt dongle was found that search stopped to move onto devices - except to find that a finicky Bt_5.0 one the other month wholly failed to show promise.
    Do you have a link for the "CSR 4.0 Bt Dongle" unit? The amazon page is dead and the name is too generic to find the exact model again. I'm using T_3.6, and added a 120uF cap to usbh_5v to prevent the teensy from rebooting when the BT dongle is connected.

    Interesting, the old "plugable" BT dongle only needed a 1uF cap to prevent a reboot, but this "new" plugable BT dongle needs a 120uF to stay reliable. That makes me think they changed some things, the dongle may no longer pass the tests. I haven't dug into the code yet to figure out exactly what is happening I'm new to USB HOST in general.

  14. #839
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,377
    that link is dead - so what was ordered will be too

    Looks like we'll need to find a new standby model - I just put one on wife's computer - probably one of those I had.

    Search of - does show Onvian USB Bluetooth Adapter CSR 4.0 Dongle Receiver Transfer Wireless Adapter for PC Computer Laptop Supports Windows 10 8.1 8 7 Vista XP - Upgraded Version

    Only $6 and this one Bluetooth-Dongle-Wireless-Receiver-Keyboard - I just ordered one of each

Posting Permissions

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