How can I connect an hid device to web app? - javascript

I want to connect an HID device to my web app, by USB connection.
The WebUSB API does not suit to me, because the device is an HID device(when using the WebUSB API, after device.open() there are an error: 'Access Denied.').
I wanted to use the WebHID API, but for now, this is not available. (WebHID API)
Does anyone know how to connect the device to the WEB app anyway?
Thanks!

The WebHID API is actually available on all desktop platforms (ChromeOS, Linux, macOS, and Windows) in Chrome 89. See https://developer.chrome.com/articles/hid/#browser-support
Can you share why WebHID is not working for you?

Related

access web serial api in android chrome browser

using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.
so which API is used to read and write data to serial devices in the android chrome browser.
also, there is a polyfill serial API for android chrome but is showing an error shown in the image.
The team that built the implementation of the Web Serial API in Chromium also wrote a polyfill library which uses WebUSB to support platforms which don't provide built-in serial drivers: https://github.com/google/web-serial-polyfill
It looks like you are already trying to use this library. Can you file an issue on the library's GitHub project so the team can look at the error you're seeing?
Note, it seems like there are some Android devices which have USB serial drivers that end up blocking WebUSB from claiming interfaces even though the platform doesn't let apps actually use them. https://crbug.com/1099521 is tracking a workaround for that.

Open/Listen to COM-Port client sided on mobile device, is it possible?

So I am using navigator.serial in my reactjs PWA to access the COM-Ports and receive information from a external bluetooth GNSS receiver.
This works perfect on any Windows device but fails on any mobile device that are using android/ios.
I found out that the serial API is not implemented on mobile, is there a workaround to this other than the bluetooth web API`? Any other way to listen to COM-Ports on mobile?

Web Bluetooth - Auto Connect to paired device

Is there a way to auto connect to a paired device with the web Bluetooth ?
So i can get rid of the annoying pop up device selector from google..
As of this moment, I have implemented navigator.bluetooth.getDevices() behind a flag in Chrome. To use the API, the Experimental Web Platform features flag in chrome://flags needs to be enabled. Please follow Issue 577953: bluetooth: Get permitted devices for updates on getDevices().
For reconnecting to a device, I'm also implementing the watchAdvertisements() API to allow apps to receive an Event when system perceives an advertisement packet from device on which this was called on. Please follow Issue 654897: bluetooth: Implement watchAdvertisements() for updates on this API.
These two are part of a bigger project for implementing persistent permissions for Web Bluetooth to allow sites to reconnect to devices that they already had permission to connect to via the device chooser prompt.

Does a non-mobile DJI Drone SDK exist?

I can see that DJI has a drone SDK for mobile apps (iOS/Android), but I would like to pilot the device from client-side JavaScript or desktop C#. Preferably some type of REST api that can be addressed by any language.
Does something like that exist? I don't see anything obvious on their website.
Did you find the DJI Onboard SDK?
It has sample programs for Qt, Linux, and STM32.
You could use the desktop app/web app to send commands to an MQTT server. You would then need to write a simple mobile app to connect to the MQTT server and subscribe to the command channel.
Then as commands come in via your various applications (desktop, web, etc) you translate the commands received from MQTT to the specific DJI SDK commands and send them to the UAV.
If you're looking to straight up control the drone without being connected to the RC controller or a mobile device, then the only option is the onboard SDK. If you are just looking for a way to run code on the drone directly, you would need to go through either the mobile SDK or onboard. There would be no way to do so without onboard or mobile sdk, you would need some device to communicate with your application and transfer those commands to the drone via onboard sdk or just write an android or ios application for the mobile sdk.
Just buy Blue stack emulator for Windows to simulate Android OS. Better option is to explore docker on Windows and spin some android docker container. It is free to host it in Azure also with database inside.

Twilio Client Python not Working in IOS Browser

I have created a simple twilio client application to make phone calls from Web Browser to phones. I used a sample Flask app to generate a secure Capability Token and used twilio.min.js library to handle calls from my HTML.
The functionality works fine in Computer Browsers and Android Phone Browsers, but fails in IOS browsers(checked both in Safari and Chrome). In android the page asks for permission to use mic and headphone but in IOS it doesnot even as for that. Is there anything that I am missing here? It would be really helpful if someone can throw some light into this.
The doc I referred to was : Twilio Hello Monkey Client
Twilio developer evangelist here.
Twilio Client uses WebRTC and falls back to Flash in order to make web browsers into phones. Unfortunately Safari on iOS supports neither WebRTC nor Flash so Twilio Client cannot work within any browser on iOS.
It is possible to build an iOS application to use Twilio Client just not a web application.

Categories

Resources