nathanRamaNoodles / Tinker-Controller

An open-source Game Controller App that allows you to use an Xbox/Ps4/Joycon or any controller that works with your phone to effortlessly control most micro-controllers such as Arduino/Esp8266/Raspberry Pi over WiFi, bluetooth, or USB.
GNU General Public License v3.0
186 stars 14 forks source link

how xbox one wireless gamepad connect esp8266 #2

Closed sj15712795029 closed 3 years ago

sj15712795029 commented 5 years ago

I have several problems bothering me. I am using xbox one wireless gamepad now, and its internal chip is wif (specific model I don't know). PC need to plug a usb adapter (chip is mt7612), but now I want to make their own MCU + wifi or esp8266 directly as MCU receives the handle data, like your esp8266, I watched a lot before https://github.com/atar-axis/xpadneo/wiki/Microsoft-Xbox-One-Wireless-Adapter, example of the above process is as follows: Example 1 - Initiated by AP 1.The AP (access point - wireless adapter) is sending Dot11Beacon at channel 161 2.The GP (gamepad) is scanning channel 1, 6, 11, 36, 40, 44, 48, 153, 157 and 161 for those Dot11Beacon packages 3.Once a Dot11Beacon is found, the GP is comparing the MAC of the Dot11Beacons origin to '62:45:B4:xx:yy:zz' TODO: not sure yet if this is really a hardcoded value, maybe it's up to the pairing process - don't know yet 3.1. If a fitting Dot11Beacon is found, the GP is sending out an Dot11AssoReq 3.2. If it doesn't fit, it keeps scanning 4.The AP is replying with an Dot11AssoResp packet 5.A lot of (pseudo) LLC / Raw messages of yet unknown purpose are exchanged

The connection operation between usb adapter and handle is: press pair connection key at the same time to connect. Usb adapter is a hidden hotspot, beacon's MAC is '62:45:B4:xx:yy:zz' and oui is Microsoft's So here's my question:

  1. I see that the SSID of your code is: ESPTest, which is open AP. How to make the gamepad come to connect to your esp8266 wifi?
  2. Will there be additional interactive packets after successful wifi connection?Handshake bags, asking HID report descriptor, etc
  3. How is your udp port determined?Why 4210? Is the gamepad fixed?
  4. Can I choose protocol when receiving HID report packets?For example, optional TCP /udp
  5. Can you link successfully without encryption (WEP,WPA/WAP2)? Looking forward to your reply
nathanRamaNoodles commented 5 years ago

The esp8266 isn't really connected directly to the Xbox controller. The Xbox controller connects to an android phone and the android phone connects to the esp8266.

So, get an OTG cable and connect your Xbox receiver to your phone. Then see if the Xbox controller connects and moves the controller UI on the android phone's display.

sj15712795029 commented 5 years ago

Thank you for your answer. If the game is connected to the mobile phone through OTG and can be controlled, I can understand it as follows: esp8266 <---- wifi -------> android app <---- USB ----> xbox However, when I saw your car demo controlling the game controller, there was no link to the phone. Did you do anything during this? One more thing: have you tried to connect directly to xbox via esp8266?

nathanRamaNoodles commented 5 years ago

I simply kept the phone on my pocket or lying on my bed, and I controllered the car. Yes, you have the right idea. The phone is basically a bridge.

nathanRamaNoodles commented 5 years ago

Xbox can't connect directly to esp8266 because wifi, USB, and Bluetooth are different protocols. The reason I made this app was to end the protocol war.

sj15712795029 commented 5 years ago

But I see that my xbox gamepad is wifi, so I'm wondering if I can connect to xbox directly via esp8266, just using the wifi function. In addition, I see that this wiki (https://github.com/atar-axis/xpadneo/wiki/Microsoft-Xbox-One-Wireless-Adapter) also has this idea, but I don't find anyone else on the Internet who has similar idea

nathanRamaNoodles commented 3 years ago

Closing due to inactivity