You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On MacOS it is becoming more and more difficult to install kernel extensions, and their successor since Catalina, driver extensions. It can also be challenging to get a DriverKit entitlement in order to write a driver extension. Apple includes built-in kernel/driver extensions for a number of chipsets, but not all, and these also don't work if the device has a custom USB PID/VID.
Luckily, if there is no existing USB serial port driver installed, MacOS will load the default USB driver, which can be accessed over WebUSB. I have written a bunch of JS user-space drivers for FTDI, Texas Instruments, Silicon Labs and Prolific chipsets, and these work well as a fallback mechanism.
However, It does lead to a confusing user experience, where we first have to display the Web Serial permission prompt in case there is a USB driver already installed, and then display the WebUSB permission prompt when the user presses Cancel (as the Web Serial API doesn't find any devices) so that we can then connect using WebUSB instead.
Could there be away to make Web Serial a little bit more aware of WebUSB, for example by providing a new method that would automatically fall back to navigator.usb.requestDevice when navigator.serial.requestPort comes up empty?
The text was updated successfully, but these errors were encountered:
Ah, that's great, thanks @reillyeon ! I should probably have checked there first, but at least now we have issues on both repos tracking this. How can I help move this forward?
The challenge is mainly on the implementation side. There's platform-specific work necessary to make sure we're modeling the device relationships correctly between the platform USB, serial and HID APIs. It's something that's on our team's roadmap but I can't make any promises on when we'll be able to deliver it.
On MacOS it is becoming more and more difficult to install kernel extensions, and their successor since Catalina, driver extensions. It can also be challenging to get a DriverKit entitlement in order to write a driver extension. Apple includes built-in kernel/driver extensions for a number of chipsets, but not all, and these also don't work if the device has a custom USB PID/VID.
Luckily, if there is no existing USB serial port driver installed, MacOS will load the default USB driver, which can be accessed over WebUSB. I have written a bunch of JS user-space drivers for FTDI, Texas Instruments, Silicon Labs and Prolific chipsets, and these work well as a fallback mechanism.
However, It does lead to a confusing user experience, where we first have to display the Web Serial permission prompt in case there is a USB driver already installed, and then display the WebUSB permission prompt when the user presses Cancel (as the Web Serial API doesn't find any devices) so that we can then connect using WebUSB instead.
Could there be away to make Web Serial a little bit more aware of WebUSB, for example by providing a new method that would automatically fall back to
navigator.usb.requestDevice
whennavigator.serial.requestPort
comes up empty?The text was updated successfully, but these errors were encountered: