-
Notifications
You must be signed in to change notification settings - Fork 9
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
Basic WebUSB support (mobile) #29
Basic WebUSB support (mobile) #29
Conversation
WebUSB api will be used as fallback API when WebSerial api is not available. It uses bundled javascript WebUSB FTDI Driver v0.01a from: https://github.com/pmp-p/webusb-ftdi/blob/master/webusb-ftdi.js Write support is now disabled - need test.
FIY @kaklik |
EDIT: Nevermind, I can do that too. |
also fix serial settings for both classes
Did some changes to the code over at your fork: UniversalScientificTechnologies#2 Please merge and I'll have a look at it once again. Then I'll probably merge as well. The Web Serial stuff all still works, so if the Web USB works on your end, great job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for UniversalScientificTechnologies#2 merge.
PR Code Mods
(how this can work before...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me know once WebUSB works for you and I'll test WebSerial again.
Fix WebSerial Write means Fix WebUSB Write... sorry |
I tested folowing setups using two USBToSerial devices: PC terminal <-> PC OpenMCA (WebSerial) |
And did everything work? |
In my opinion yes. But there are two things to discuse:
|
Think that's fine. The only thing that's important is that both WebSerial and WebUSBSerial return the same type. The remaining conversion to strings is the same for both, so the SerialManager can handle that.
I think it would actually be better to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shut i press this? (PR was accepted before)
I still see changes requesed, but i think that I accept all all changes by your PR... |
Yeah, don't worry. Nice job. |
@slimonslimon Can you please give the current Had to fix some problems when multiple devices were connected and/or disconnected at the same time while recording. I haven't touched the WebUSBSerial class much, but just to be sure that the checks in When this is working I will push the current |
Im sorry but, current dev doesnt work properly with WebUSBSerial. First think i found: comment this line: But i stil doesnt work when i remove comment, and I dont see other problem directly. |
Okay I see. That's something different with WebSerial then. Because WebSerial works without any delays. I will uncomment your delay in WebUSBSerial. Is it more of a problem with finding and selecting the right port, or is there an issue with the recording on your end? |
The issue was between keyboard and chair.... When I want use (for dev purpose) the WebUSB on PC (where chromium has debug menus), I should remove kernel module whose block the usb device... I forget this... |
Ok cool, thanks for testing! Will bump it to |
Well... I tested it with two devices and PC with blocked WEBSerial API (one is USB2Serial which dont have opposite connection now, and second is LabDOS which produces data). When I have open GammaMCA-console with LABDOS and remove USB2Serial from USB, console keep recieving data. GammaMCA.console works on Android. So I thing you can publis it, because Im not able to setup more complicated experiment now. I will test it deeper on next week, if it is needed. |
Yeah, all the WebSerial things still work just fine. So if at least something works for now (even rudimentary) with WebUSB, then it's a clear win. We can check more complicated scenarios in the future anyways. |
Just tested it with a random, new USB UART converter and made some minor adjustments to the filter so that it accepts any FTDI chip, not only one productId. Works great now, tested with an Arduino Uno as a dummy, even the console shows fine. |
WebUSB api will be used as fallback API when WebSerial api is not available. It uses bundled javascript WebUSB FTDI Driver v0.01a from: https://github.com/pmp-p/webusb-ftdi/blob/master/webusb-ftdi.js
Write support with WebUSB is now disabled - need test.
Write support with WebSerial is not tested. I need secondary usb-to-serial, to check if it works.