Silent print with multiple devices (chrome) - google-chrome

So I have this POS (running Windows Embedded POSReady 7 as OS) and I have this web app (I'm using PL/SQL, javascript) that will print documents and recipts. There will be two printers connected to the POS, one is a laser printer (for the documents) and the other is a thermic printer (for the recipts).
I want to use Google Chrome's --kiosk --kiosk-printing BUT I need to switch printers because of the situation I described before, is there a way to achieve this?

You can use a Chrome App to achieve this. You can connect to the USB and write PCL or image files directly to printer.
Our demo: https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/apps/samples/usb-label-printer show how this can be achieved.
You do need to know the exact printer type you are connecting too and also write the device driver for it, but generally it is not to complex.

Related

Can I access an USB HID in Chrome without an App?

I want to use an USB HID from a website. The website will only be accessed by Chrome browsers. The solution should require a minimum amount of extra software and setup for the website user to work.
The USB device presents itself as USB HID to the OS and I need to write and read byte arrays to and from it in order to implement the manufacturers specification for some of the device's features.
My current solution consists of two parts:
A Chrome App that uses the chrome.hid API to talk to the device. This App exposes a Chrome Cross-Extension messaging port to provide and interface for "service calls".
JavaScript code on the website that sends requests to the Chrome App, which then talks to the USB device to process the request.
In order to make it easier for the user I want to get rid of the App, so the user can just surf to the website, grant access to the device if necessary and then be able to use the device.
To be clear, I want the user to be able to use the website without installing any dependency first.
I already tried using the WebUSB navigator.usb API but Chrome blocks access to USB HID devices. Is there another way to accomplish this?
WebHID is being developed for this use case. It has been available behind a feature flag since Chrome 78, with an original trial expected in Chrome 84 (probably later due to current Covid-19 situation), estimated stable August 2020 .
For more details: https://github.com/robatwilliams/awesome-webhid

Automate connecting to bluetooth devices from Chrome

I've written a simple web app to factory-reset bluetooth devices that were accidentally turned on during shipping. The app scans for a class of bluetooth devices (those made by the company I work for), renders a list of devices found, and, when I click a button next to a device in the list, sends a reset message to the device.
This is a very manual process and I'd like to automate it. The problem is the Chrome dialog that asks for permissions to pair with a device. I am trying automate the app with Puppeteer, but I can't find a way to either (a) programmatically grant permissions to pair with a device or (b) to select the device in the dialog and click the "pair" button via Puppeteer. Anyone know if what I'm trying to do is possible, or if there's a better way to achieve the goal? Thanks!
This is not possible in Chrome. (I work on chrome.) The automation that does exist for Chrome's testing is layered such that actual Bluetooth connections aren't made.
Eventually we would like to enable this workflow via Enterprise configuration controls. But that is not started yet and there is no date commitment.
One alternative is to use node.js, though you lose the easy interface. You might build the reset backend in a node server and have it serve a web page interface.

Using PhantomJS, Electron, NWJS or AppJS as a wallpaper engine for Mac OS X, Linux and Windows

I have recently discovered the Mac OS X application GeekTool where one can use a html file as your wallpaper. However that isnt the most interesting thing, what I find interesting about it is that it keeps the html file alive even allowing http requests. I wanted to create that using Node.js and some other web technology that allows to run a browser on the desktop with full access to nodejs' APIs.
So I wondered if there is any way to create an alive browser in the background (as a wallpaper), which is interactive (e.g. I can press buttons and type in inputs). If so, where can read about that?
I prefer either one of the packages mentioned above, but others are accepted as well. What I need it to do is just being under the desktop-icons but as well over the default wallpaper, so it can be interactive.
Thanks 😀

Can I mirror my Chrome browser to multiple Chromecast devices

We have a dashboard system (Dashing) that we can view through a browser (Chrome). We have two TVs up displaying this dashboard now. Each TV has a $350 PC connected to it. I am wondering if we could use a Chromecast plugged into each TV and have only one PC "displaying" the dashboard. This is relevant because 1) we are looking at adding monitors after we expand our office and 2) the PCs tend to be a pain in the ..., with things like updates pushed from IT, password chances, etc. One PC would definitely be better. Bonus points if I can get rid of all the PCs and just use Chromecast pointed at a URL.
Thanks,
Although not supported officially, I was successfully able to cast my entire screen to two devices by using both the Google cast and the Google cast (Beta) extensions simultaneously. I could only get it to work using one extension in an incognito window and the other in a normal window.
You can cast to multiple Cast devices if you create an additional "people" in Chrome settings for each of your Cast devices, then open a new window(not tab) for each "people".
Each "people"/user can attach to a different Cast device. It helps to match the user name to the device or location to keep it all straight.
Ex: Cast a movie from NAS to 3 TVs.
Use VLC to stream movie.
Open 3 Chrome/chromium windows(not tabs), changing each window to a unique user/person.
Start streaming.
Point each window at stream, play and cast to a different device.
Performance will depend on ability of PC and router/wifi. We use the Ethernet power supply for Chromecast to reduce load on wifi AP. (We had Cat5 Ethernet already installed)
Since all browser windows are pointed at same stream, the sync is pretty good. Although we usually stream to living room, patio, and game room which a difference hard to detect.
Hope this helps someone.
Currently, you can only be connected to a single device at a time, hence can only mirror to one Cast device. You mentioned you are mirroring your browser. Is the content that you are mirroring a simple page, a video, ...? You may be able to come up with a simple app that would eliminate the need for having PC's completely. Tell us more about the content you are mirroring (hopefully it is not flash :-) )
The Chrome browser extension can only cast to one device. A workaround is to install the Chrome browser extension Beta version alongside the non-beta version, and you'll have a second browser extension that can cast to a second device.
My colleague suggests that if you install Chrome Canary, the Beta version of Chrome, you can run two Chromes, with two extensions each, and support four devices.
Hopefully, this limitation will be removed, and the browser extension will support multiple devices.
Our use case is driving information kiosk displays from a single computer. Chromecast is nice in that the display's physical security does not expose the PC driving the display.

Can I share a file to other plateform (iOS or Android) via Bluetooth on WP8?

My WP8 app has some audio or videos, I'd like to share them with other plateform devices, such as iPhone or android devices. The first thing that comes to mind is Bluetooth. Can I realize this feature in my app? And how to do it? Thank you!
Sure you can do that, its the same like all file sharing apps do (whatsapp for Example) but your are about to do this using bluetooth connection, you just need to build a connection and transfer the file to the target device which should be able to open the file according to its format and the installed apps on the device.
I've worked with iOS Bluetooth extensively and the different ways you can share data over Bluetooth is by:
Using one of the Bluetooth profiles already supported by iOS: http://support.apple.com/kb/ht3647
Bluetooth LE (Core Bluetooth). I haven't used this, but the bandwidth and data structure of data being transmitted is limited, so it may not suit your purpose of sending audio and video.
Game Kit. This is for iPhone-to-iPhone data transmission though.
External Accessory Framework. This framework allows you to transmit raw data, but is only available to BT-enabled devices with special Apple authentication hardware (you have to join the MFi program and go all these hoops to get your device qualified). This doesn't work for you too, since you'd want to send data from WP8 or Android, which are definitely not MFi qualified.
So, bottom line, you CAN NOT send raw audio or video data from WP8 and Android to your iPhone unless you jailbreak the iPhone and put a new stack. iOS's BT stack is really limiting in that way, as I've learned the hard way.
On the bright side, you can definitely send raw data between Android and WP8 over Bluetooth. You have to create an RFCOMM socket on both ends (one sending; one listening). The Bluetooth profile used for this sort of data transfer is called a Serial Port Profile.