-
Notifications
You must be signed in to change notification settings - Fork 230
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
Serial over ESPUSB #13
Comments
You have gotten MUCH MUCH further than I did!!!! I tried doing this and all it would tell me was "not enough bandwidth" errors over and over. Are you using a bulk endpoint? Are you somehow getting CDC to work over an interrupt endpoint? If that works, any chance at a RNDIS device working? You can have whatever custom commands you want with the control_transfer messages... Totally up to you! |
Oops I forgot to get back to this message... I'm sorry First, I can't get this to work on bulk endpoint. The dmesg doesn't recognize it. However, using interrupt endpoint, I could get some results but lots of kernel warning and errors. I've read from a thread forum somewhere that the newer Linux kernel doesn't support low-speed CDC anymore. I haven't attempted the HID-serial but this seems to be a very good method to attempt if low speed CDC really doesn't work. I'm going to test this many more times before I disregard this method. Hopefully, this works :D What's RNDIS? virtual Ethernet? |
(1) I always used control messages instead of HID, but if by some miracle you can get it to enumerate as a serial device, I suppose we could do it. Control messages with libusb are really beneficial because of two reasons (a) they handle all framing, you basically say "send this command, with this code and this payload" or "send this command and give me the response buffer" and it goes and does it... and (b) it's fast! (2) RNDIS: Yes, virtual ethernet. LUFA supports it. It's how I made my Minecraft server that fits in a USB port. https://www.youtube.com/watch?v=YNrFOClrzTA (3) I still don't know if the ESP32 can do USB full speed, but hopefully around Christmas time I'm going to have an opening to give it a whirl. |
(1) Wow, I'll definitely look thru the control message more now. Sounds promising. (2) That's some very interesting thing you did there. It's amazing how LUFA did it, what is needed to get RNDIS to work? Isn't LUFA based on hardware USB? But I guess it's always worth a try to make the impossible possible :) (3) I saw nosdk8266 and 346MHz ESP8266. Is it possible to run full speed USB on that? It's exciting to see you work. ESP32 full speed is really somethg to look forward to. Let me know if I could be of help in any way possible since I've also received my ESP-devkitC from Espressif. |
(2) I recommend not using LUFA since it is not nearly as lightweight as their name implies :-p. LUFA is meant for hardware stacks. It might be possible to use in our situation bout would be difficult. If full-speed works, it wouldn't be difficult to get RNDIS running. But I agree serial matters most, first. (3) I do suppose it may be "technically" "maybe" possible... But it would take re-jiggering the USB stack. It would take a fair bit of hand-coding. 346 MHz is 4.325x faster than 80 MHz. Full-speed is 8x faster than low-speed. I can't find the thing that said how many cycles it takes to read from the GPIOs. So I don't know for sure it would be possible. I seem to recall "19" cycles being thrown around which would make it a tight pinch if at all possible :-/. MORE IMPORTANTLY: Would this /actually/ be useful? Since wifi cannot be used at all when overclocking. And, if we used it during the bootloader phase, we'd have to come up with some way of "disconnecting" the pullup and attaching it to the other leg, to switch between full and low speed. |
(3) I gave myself a few days to think of an idea on what to use full speed on the bootloader.... If full-speed is not attainable on the 'normal' SDK maybe, what this could do is that each time you want to use full speed, the esp8266 will reboot to bootloader and perform the USB full speed task and come back to WiFi SDK again. Use case:
|
Man... I don't know why OSes don't permit all the endpoints at low speed :(. Fingers crossed for time around Christmas to give full-speed a go. |
Hi sorry for creating double issue (Joystick over ESPUSB) but I didn't want to mix these two projects together.
I thought of sharing these with others, just in case someone here is interested.
I've been attempting serial over espusb as how I've seen DigiSpark did it using Low-Speed CDC. So I tried replicating their method as well. I have only did the change to the usb_config.h for the moment.
usb_config.h (https://gist.github.com/leopck/0d3d1e38a11f3742f0a86bdcb3d88740)
So after multiple trial and errors I somehow got something on my 'dmesg'
Which looks like good news! Until I see more messages below:
This issue is similar to an issue from DigiSpark (digistump/DigistumpArduino#16) but it wasn't resolved at the end. Any ideas?
Also, there's another option which is to use v-USB HID Serial as shown here (http://rayshobby.net/hid-class-usb-serial-communication-for-avrs-using-v-usb/) but I haven't attempted this.
@cnlohr I was reading thru how you sent data over the espUSB and from the file 'execute_reflash.c' I saw that you used libusb_control_transfer to transfer pieces of the software over. Is it possible to reuse this for serial?
The text was updated successfully, but these errors were encountered: