-
Notifications
You must be signed in to change notification settings - Fork 792
Added support for ESP8266 #263
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
Conversation
… to a value in the ESP8266 Arduino core
The Wifio is not supported for now
@huming2207 I just merged in your changes ;) |
@huming2207 now I just need you to test all this. |
@Lauszus Got it, thanks mate! |
@huming2207 any updates? |
@Lauszus Sorry for the delay. I've got an intern so I'm a bit busy now. I'll try it in the following days. |
* master: The Xbox button on the Xbox One controller was not read properly Added support for Teensy 3.5 and 3.6 # Conflicts: # .travis.yml
@Lauszus Sorry for the delay, now I've tested that GPIO0 for INT doesn't work, it will let the SoC boot into bootloader mode. So perhaps we need to change to another pin. I'll try GPIO16 now. |
Okay I've tested both GPIO0 and 16, neither of them work. I guess it may has some issues with power supply as my USB output only has 4.5v. My laptop (Macbook Pro mid-2015) should be fine, but something may went wrong with my circuit. |
@Lauszus Okay so here is the result. I'm testing with the newest library code from ESP8266 branch (this one: 46a036c), and I compiled and downloaded the USB HID sample code to one of my NodeMCU 1.0 board (the one with a ESP-12E module). If I set GPIO0 as INT pin, the board sometimes won't boot, it seems has entered the bootloader mode and waiting me transfer a new firmware to it. Then if I unplug the INT cable from my board and reset it, the serial prints "OSC did not start." (module didn't initialized???) If I set GPIO16 as INT, then it won't boot completely. If I set GPIO5 as INT, then it will boot normally, but if I connect a keyboard to it, it doesn't have any further output. |
By the way, I'm very sorry for the long delay. |
Also I have tested with an external power supply for the target USB device, my keyboard, but it doesn't work too. |
What do you mean by "it doesn't have any further output". Did you enable serial debugging: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging. Btw please run the following example: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/board_qc/board_qc.ino. |
Here is the output from board_qc with the debug option enabled:
|
I have checked my circuit and I didn't connect the RESET pin from the USB module. Do I need to connect it to my ESP board? |
@Ognian I only picked P0 based on feedback, since I have not really played around with the ESP8266 myself. I will change it to P5 now then. |
I have now changed it to pin 5: c2b6dbf. |
@Lauszus ok some more results:
I'll try with the USBHID examples... |
@Lauszus Ok continue testing... |
This commit should fix the issue with If you could test any of the Bluetooth examples as well, then that would be great! |
@Lauszus Ok tested with newest version of board_qc, is this OK? It looks different from the output...
|
@Ognian yes that looks fine. The GPIO test is normally only used for internal testing as not many people use the GPIO pins on the shield anyway. |
Unexpected state != fail. I've seen this happen before.
The "problem" is that the MAX chip isn't getting a hardware reset or power
on reset (usually)
…On Tue, Jun 13, 2017 at 7:13 AM, Kristian Sloth Lauszus < ***@***.***> wrote:
@Ognian <https://github.com/ognian> yes that looks fine. The GPIO test is
normally only used for internal testing as not many people use the GPIO
pins on the shield anyway.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADskzAff7jZfq74v_8wjpKJvZDjmrFEkks5sDm7FgaJpZM4KfkW7>
.
--
Visit my github for awesome Arduino code @ https://github.com/xxxajk
|
@xxxajk yes exactly. It looks fine to me. |
Yes it looks really good now: |
You will need to either unplug and replug the device, or add a USB power
switch IC.
This is a known problem.
…On Tue, Jun 13, 2017 at 7:28 AM, Ognian ***@***.***> wrote:
Yes it looks really good now:
USB_desc is working; USBHID_desc is working; a Keyboard and another Mouse
is working...
only problem seems to be that when pressing the reset button sometimes I
do not get the initial answer from the usb device attached...
I'm continuing with the tests...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADskzI5Iuw1ipBrawwq40_6hXSIGNkdQks5sDnJ4gaJpZM4KfkW7>
.
--
Visit my github for awesome Arduino code @ https://github.com/xxxajk
|
… On Tue, Jun 13, 2017 at 7:29 AM, Andrew Kroll ***@***.***> wrote:
You will need to either unplug and replug the device, or add a USB power
switch IC.
This is a known problem.
On Tue, Jun 13, 2017 at 7:28 AM, Ognian ***@***.***> wrote:
> Yes it looks really good now:
> USB_desc is working; USBHID_desc is working; a Keyboard and another Mouse
> is working...
> only problem seems to be that when pressing the reset button sometimes I
> do not get the initial answer from the usb device attached...
> I'm continuing with the tests...
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#263 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADskzI5Iuw1ipBrawwq40_6hXSIGNkdQks5sDnJ4gaJpZM4KfkW7>
> .
>
--
Visit my github for awesome Arduino code @ https://github.com/xxxajk
--
Visit my github for awesome Arduino code @ https://github.com/xxxajk
|
@Lauszus OK keyboard and mouse just works, and some other devices are properly detected too.
|
Please test the following example on your Mac: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Bluetooth/SPP/SPP.ino. If it works it then it should create a serial port named Please see the following blog post on how to connect a Bluetooth mouse using the BTHID example: http://blog.tkjelectronics.dk/2013/12/bluetooth-hid-devices-now-supported-by-the-usb-host-library/. |
@Lauszus
|
@Ognian okay. Try to disable and enable Bluetooth. The baudrate does not matter, as it is an emulated serial port. |
@Lauszus sorry for the late answer, had to leave my desk very quickly yesterday...
turn mouse off, reset board, turn mouse on With the SPP.ino I'm still not able to connect to /dev/tty.Arduino-TKJSP but I think that the sketch works and the problem is with my very very old bluetooth dongle since this is the output from the bluetooth info in OSX:
It says SPP supported: No |
@Ognian no worries. I will merge the PR now, as it looks to me like everything is working, as it creates the serial port. To be honest I think the problem is something with your computer. Thanks a lot for testing! |
@Lauszus you where totally right: rebooting the mac, and SPP.ino is working too... |
@Ognian good to hear that it is working! Please open up a new issue if you encounter any bugs :) |
Hi guys, A noob here. I am trying to connect NodeMcu ESP8266 board to Mini USB Host Shield (v2.0 dated Aug. 16, 2014), same USB Host Shield as the one @huming2207 posted a picture of above. When running
I have double-checked my soldering and tried validating connections. Unfortunately, I am not 100% sure if I got all of the connections between USB Shield and ESP8266 right. Wondering if you guys have any suggestions on connecting the boards and what other things I could try to continue debugging. One of my concerns is that the Mini USB Host Shield I have could be damaged, so I am purchasing a new one to see if that works. All the help is highly appreciated! Thanks, |
@baghdasaryan Does the yellow wire connect to RX? If so, it looks off-by-one. Here is my hook up for a USB host mini board with Adafruit Feather ESP8266. |
Thanks, @gdsports! Your picture got me looking in the right direction. After mapping all the pins correctly, I got it working on HiLetgo NodeMCU ESP8266 board that I have. So, following are the issues that prevented me from getting the setup working from the first try:
Was able to get connections between the two boards right using the following mappings:
I also connected both ESP8266 and USB Host Shield to an external 5V power supply (before I was only connecting USB Host Shield to external 5V power supply). Following are pictures of my most up-to-date working setup. Thanks for the help! |
Hi! |
See: #262