 This short video is about brand new capabilities your web app can use to communicate with hardware devices over blue juice USB NFC serial and here this is opening up so many opportunities But if your current thinking is what or why I bet you're gonna learn something today I'm Francois Beaufort and in this video I want to show you what you can do with those device APIs How they work and what developers have delivered so far But first, why are we building these APIs in Chrome? We want to make it safe and easy for you to connect to real-world devices from affordable NFC tags to specialized heat devices Flashing a new OS to your phone or even programming a microcontroller But ultimately by bringing those APIs the web platform More users will be able to interact safely with existing and upcoming devices I believe we should not have to install sketchy banners to control hardware devices. And here's how Chrome protects us First a web app counts access to device without user permission The user has to specifically select the device then grant the web app device access Unlike native apps, web apps are not allowed to list all connected devices Cross-origin IFRAMs count by default from users And of course, HTTPS is a requirement for interior users In 2015, we added the WebLU to CPI so that web apps could connect to nearby Bluetooth low-energy devices and interact with them through the GAT protocol Think of heart rate monitors, toys, sensors, bulbs, and many more In short, you could read and write some characteristics on the device and get notified of changes This code, for instance, is all you need to read the battery level of a user-selected Bluetooth device Gordon Williams, the lead developer of Esprino, an open-source JavaScript interpreter for microcontrollers took advantage of web Bluetooth to build the web ID We want to allow users to get started really quickly They can get one of our devices, go to a website and start writing code in seconds without having to install anything, and that's only possible because of web Bluetooth and web serial Going to a website is faster and safer for users in installing an app But even if you wanted to make an app, there's no universal API that works on Windows, Mac, Linux, Chrome OS, Android, and iOS that we can use for Bluetooth and serial With Chrome's device APIs, we can have one JavaScript code base that we use by all platforms and the APIs use by so many people that they're well tested, reliable, and stable We don't have to maintain bills for each different platform we support either and software updates can be done by changing the website rather than having to manage app store submissions for every platform You can learn more about web Bluetooth by checking out links in the descriptions Web USB is one secure web accessing user-selected USB devices from a web app without having to install drivers via privileged executables Think of easier firmware updates, mobile device screen recorders, ledgers, oscilloscope, and so on My personal favorite is the official Android flash tool that allows you to flash a new OS to your Android device entirely from the browser You can learn more about web USB by checking out links in the description More recently, web apps on Android devices can now experiment with reading and writing to NFC tags when they are close proximity to the user's device I'm thinking museums and art galleries could show some additional information about a display when the user touched the device to an NFC tag or an inventory management web app could read or write data to an NFC tag on a container to update information on its content Web NFC is currently limited to a binary message format called NDEV which works great across different tag formats First, prompt the user to allow your web app to scan energy tags Then, handle incoming and death messages by subscribing to reading events I built a web NFC card demo game last year It was a lot of fun, and the code was really simple I was only using serial numbers to identify NFC cards Writing to an NFC tag is similar to reading This time, call the write method with a string to write some tags or pass a dictionary with an NDEV message to write some new write, for instance You can find everything about web NFC at web.dev slash nfc Oh, and I want to say thank you to the folks at Intel for their work They are doing an amazing job The serial API is one of those device APIs that reminds you that the world we're living in today still relies on legacy devices that are critical to our lives And Henry, your tag will tell us why I want you to pretend for a second that you are an anesthesiologist which means you put people to sleep and it's your job to make sure that they stay alive during this process and you do so by hooking up a patient to something like this a patient vitals monitor Now, in addition to actually putting the patient to sleep it's your job to track everything So every five minutes, you have to take a reading off of this device and put it into something called a sedation record And a lot of people these days are doing that with pen and paper So naturally we built a progressive web app at anesthesiacharting.com that does this for you It not only helps you produce the record but we can actually use web serial to pull the vitals data directly off of these monitors and put it into the record It's really simple We get instant cross-platform distribution without having to ask these doctors to go install some software They can just go to a web page, plug in their device and they're off and running It's beautifully simple Turns out there are thousands of these devices out there that cost thousands of dollars and we're completely fine but we can give them new life by just being able to control it and being able to pull the data off of them Currently most of them aren't even hooked up to anything So this is really awesome being able to take advantage of the investments that they've already made and really bring it back to life In other words the serial API breached the web and the physical world by allowing web apps to communicate with serial devices such as patient monitors but also microcontrollers, 3D printers, Arduino's, Raspberry's, and the list goes on To listen to data coming from a serial device first prompt the user to select the serial port then wait for the serial connection to open at a specific boat rate and finally within a simple right to look call the read method from the readable stream reader object and that's all How to write to a serial port in all details about the serial API are available at web.dev.serial There is a long tail of human interface devices also known as HEAD such as alternative auxiliary keyboards or exotic gamepad that are just too new too old or even too uncommon to be accessible by systems device drivers Lucky for us the web HEAD API provides a safe way to access those Olivier Guet from Logitech will share why it matters At Logitech being able to connect our devices with more system and OECs including the web is important Technologies like Bluetooth, HEAD, or USB are at the core for Logitech MySend keyboards We have done some nice demo but perhaps interacting with our devices For example we have done a demo a device from our date and tell you from the web and it works great We have been contributing to this web other APIs since the beginning participating in forums and submitting patches With web HEAD we also quickly built a web app to burn new devices to our unifying model It's easy to communicate with devices using web-made API by writing just a few lines of code We already involved this web-print app for Chrome browser That's you, the first beta of F browser was released When we tried our web app on edge we had a nice surprise it was immediately working That's the cross-platformity of the web You can have just one code base and it works on different systems Now let's have a look at what it takes to make your Apple keyboard backlight link Yeah, just like this Prompt the user to select the keyboard backlight HEAD device then wait for the connection to open and finally send some feature reports with bytes that contain instructions to turn on and off the backlight This is a simple example but it shows you how quick and easy you can get started with web view Have a look at web.dev.cd to learn more about the API and play with samples And here we are I deeply believe the web platform is getting better for everyone with hardware devices support It gets better for kids who love hacking devices with friends It gets better for developers as the barrier to entry is lower and they can now provide a solution that works cross-platform It gets better for users as they don't have to install drivers via privileged executables And most of all it gets better because it allows old and new devices to coexist in an open platform Thanks for watching