Live data from Hacker News

What are some interesting uses of WebUSB you have come across?

news.ycombinator.com

31–40 of 101 posts

Re: What are some interesting uses of WebUSB you have come across?

#31
post #3

I’ve seen it used as a POS with a chip reader.

The magnetic strip kind used to be able to just act as a keyboard. Didn't need WebUSB to use one with a web site.

WebUSB is a lot nicer because then you don't have credit card swipes, when the wrong thing is in focus, going to the wrong place.

Re: What are some interesting uses of WebUSB you have come across?

#33
post #29

I haven't had a good look at WebUSB but the landing page thing interests me if there is a way to user program the configuration. For instance configure a thumb drive to be storage for a WebApp and the landing page is the WebApp itself. Is this this easily doable (as a file on the drive with WebUSB info) or would it require diving into the thumbdrive firmware itself.

Yes, you need to provide a WebUSB USB descriptor on the device with a link to your site.

Re: What are some interesting uses of WebUSB you have come across?

#34

VIA, as you mentioned, is one of the niftiest I've seen. I just wish that VIA was a bit more robust, particularly around macros... I want to do something that does separate key down and key up events with pauses between. Unfortunately, VIA doesn't do that. And worse, my keyboard (Keychron K3 Pro) doesn't yet have a public firmware build for QMK, so I can't do it directly in there either... (I'm trying to write a macr…

VIA is an awesome resource for the community and really lowers the bar on entry (our users no longer need to or are expected to compile their own firmware just to tweak keys) as well as just being convenient and nice to have.

My only gripe is that they moved to web-only from “native” apps instead of offering both, but if that’s what needed to happen to bump up the development velocity, so be it.

Re: the delays, I think I recently saw something about delays being possible in macros now, or perhaps soon — it might have been in QMK nightly, I can’t remember.

Re: What are some interesting uses of WebUSB you have come across?

#35
It's used for flashing the BBC micro:bit in both Microsoft MakeCode (https://makecode.microbit.org) and the micro:bit Python Editor (https://python.microbit.org). MakeCode uses it for lots of other devices like MakeCode Arcade too https://arcade.makecode.com )

It's amazing for students to be able to quickly get a program they've written in their browser onto a device in their hands that can respond to and interact with the real world.

Also great because with MicroPython and the Python Editor you get a standalone Python environment including REPL that's completely isolated from the PC - schools love it because no matter what the students do they're not going to break the host PCs.

(The firmware that implements web USB on the micro:bit's USB interface chip is open source, DAPLink https://github.com/ARMmbed/DAPLink)

Re: What are some interesting uses of WebUSB you have come across?

#36

GrapheneOS uses WebUSB to flash Pixel phones: https://grapheneos.org/install/web

https://flash.android.com/ as well. I don't use Android anymore, but it's seriously cool that you can reflash the OS from a webpage.

Cool and kind of dangerous for nontechnical users tbh

Re: What are some interesting uses of WebUSB you have come across?

#37
post #23
post #7

Does a device need to specifically support WebUSB, or will it work with any USB device so long as the web page supports it? Or is it the browser that needs to support the device? I found contradictory information on this when searching.

Should work with any device. The web page needs to implement the driver/protocol to communicate with the hardware.

Even storage devices like thumb drives larger usb3 disks?

Re: What are some interesting uses of WebUSB you have come across?

#38

This is cool, but both safari and firefox will not implement it: https://usefulangle.com/web-updates/post/80/firefox-decines-... I assume this is because of security concerns.

Am I alone in thinking even its Chrome implementation is a massive security risk? The fact that users can grant any webpage COMPLETE control of a USB attached device is astonishing. Live webpages shouldn't be able to access this feature - can't wait for fake jailbreak and backup services to start cropping up.

Re: What are some interesting uses of WebUSB you have come across?

#40
post #7

Does a device need to specifically support WebUSB, or will it work with any USB device so long as the web page supports it? Or is it the browser that needs to support the device? I found contradictory information on this when searching.

Apparently the basic requirement is that the device should not have a driver already claiming the interface.

More info here: https://web.dev/build-for-webusb/

Post reply on HN