-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CHINESE COPY) Device not connected #1
Comments
Hi! Arduino 1.8.9 I ran sketch at README.
|
http://wiibrew.org/wiki/Wiimote#HID_Interface
https://github.com/takeru/Wiimote/blob/master/Wiimote.cpp#L474 |
Are you using the Arduino IDE? |
yes |
Huh, for some reason, I'm not getting any output in the Serial Monitor. I even changed the Serial.printf to Serial.print. I copy and pasted your example code from the README and put it into a *.ino file and then copy and pasted the other .cpp and .h files with the .ino file. I wonder if I should be using the ESP-idf alone? |
I have done the test with: I ran sketch at README. I have uncommented both lines: The log, but I am not able to make it run properly. Mtu is still 255 but the other point seems to be not important because it waits until the connection is properly done that is in the next lines. I attach the log. Thank you for your help.
|
I got the debugging to work :). I forgot esp32 had different debug levels. @takeru It works surprisingly well with my old Wiimote and responds to all button presses. However, it did not work on my Chinese Wiimote. The Chinese Wiimote has the same output as @CorrederaJorge and doesn't respond to button presses. Maybe there is a different protocol as @CorrederaJorge mentioned? I'd be happy to help figure out that protocol. Edit: Also, where are the motion controls? |
As @nathanRamaNoodles says I am using a chinese copy. I am afraid the protocol is different... |
I don't know about chinese wiimote.
It is not enough. To handle two or more connections, fix this "BUG" is required I think, when I wrote it. Can I find chinese version wiimote at aliexpress? |
yes, it's super cheap: Aliexpress Link or this one You can find them cheaper somewhere else, but the remote must say "NEW 2in1" at the middle of the remote. like this: |
Thanks. @nathanRamaNoodles You can change type of data from wiimote, accelerometer or IR sensor or, ... |
I'm quite interested in how you connected a wii remote to an esp32. Where did you learn about HID? Also, my goal is to try to connect an xbox one s controller to the esp32 using a similar technique using HID, and I was wondering if it is possible. |
Please try this branch. |
It works 0.0 Great Job 👍. I'm surprised you got it without having the remote :0 |
Actually, there is one bug. |
nice!
any resource is leaked??
any timeout? |
Actually, It's just after 15 seconds. the 20 buttons presses were irrelevant after further testing. So I guess we need to figure out what keeps the connection going every 15 seconds. The output is at the bottom; I changed the Serial output only for the
I have no idea. I looked on the internet, and can't figure out why it won't keep the connection. Also, I don't know if it helps, but after the 15-second disconnection, pressing the sync button on the Wiimote does nothing; the Wiimote LEDs are still in "1st player" and the only way to get back into sync is to replace the battery and press sync again.
|
Please compare two logs: official wiimote and chinese. To send some command from ESP32 to wiimote:
_set_led may extend timer. |
Nope, still gets stuck after 15 seconds. I also have a newer Official Wii remote and it doesn't connect to the esp32; in fact, it behaves just like the output of @CorrederaJorge's remote. At least the Chinese one works for a while ;) |
hmm, can you try _set_reporting_mode() to extend timer? Your newer official one is wii remore plus? or do you know revision? please check the wiki document. Mine is very old, it is not have plus sensors. I have plug-in sensors. |
Alright, if I can get it working.
yes, it has plus motion included. |
@takeru @nathanRamaNoodles I compiled, uploaded and it works at first. I need to check stability problems as @nathanRamaNoodles said. Great job!!!. Thank you very much!!!. |
@nathanRamaNoodles |
Hi: It disconnects after 15 seconds but if I set continuous reporting mode with _set_reporting_mode instruction it keeps sending info. Kind regards. |
@CorrederaJorge, Can I see your code, I can't seem to get it to work. |
Replace _set_reporting_mode(connection_handle, 0x30, false); by _set_reporting_mode(connection_handle, 0x30, true); and _set_reporting_mode(connection_handle, 0x32, false) by _set_reporting_mode(connection_handle, 0x32, true) in @takeru code. |
I tried that, but in the serial monitor it continues printing the buttons pressed and then stops after 5-7 seconds. I don't know what's going on. I also have genuine wii remotes that are the latest ones(2017) and they don't connect at all. |
"Wii Motion Plus" is one of extension controller. But, I tested and implemented only Nunchuck. You may have to initialize the "Plus". @CorrederaJorge |
I have a wii mote with plus. |
Hey, I also having trouble with connecting my WiiMote Plus. I seem a legit Nintendo one... here is the log:
Could you help out with that one? |
Hi Takeru, First thank you so much for your efforts in this project. |
https://github.com/takeru/Wiimote/network I never thought it would be a code that would last this long. Thank you. I don't know where the best code is. I'd be happy to look into what master should be and let you know. |
Its just I used the MASTER code first but could not get my cheap copy of Wiimote to work until I saw that some one else also had this issue. The I used your control_pipe build and it worked wonders :) I think it would be nice to have a : |
The original also work with the newer branch, right? |
Hi:
I have managed to compile and run the project in an ESP32 but when I try to connect I am not able to make it work.
The wiimote lights keep blinking and it receive CONFIGURATION RESPONSE but it doesn´t receive
if(data[0]==0xA1){ // HID 0xA1
to connect so when I push the buttons it doesn´t do anything at all.What am I doing wrong?.
I attach the debug output from Esp32 port.
Kind regards
The text was updated successfully, but these errors were encountered: