peripherals

Bluetooth Peripheral ADVERTISE_FAILED_DATA_TOO_LARGE

不问归期 提交于 2019-11-30 12:12:22
I am trying to advertise in NEXUS 9 and getting the error of ADVERTISE_FAILED_DATA_TOO_LARGE. It was working perfectly fine when I was adding the service after successfully advertising but if I add the service through Advertise Data builder so that other devices can filter while scanning, I get error code 1 i.e ADVERTISE_FAILED_DATA_TOO_LARGE a) Working Code public void startAdvertisingService() { AdvertiseSettings settings = new AdvertiseSettings.Builder() .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH) .setTimeout(0) .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)

Controlling simple relay switch via USB

天大地大妈咪最大 提交于 2019-11-28 19:13:16
问题 I'm looking to control a mains powered light from a simple relay switch connected via USB to the computer. The relay switch isn't even a USB device, it's just a simple switch that requires the USB voltage to turn it on. When the voltage drops below a threshold, the switch will turn the light off. My problem is that I can't control the power output of a USB port. I'm happy to do it using any language on Windows or Linux (but preferably Java because I'm used to it). 回答1: Unfortunately, in most

How can I cycle a USB device from C#?

拟墨画扇 提交于 2019-11-28 18:28:21
I'd like to cycle (simulate unplug and re-inserting) a USB device (modem) after a certain event has fired. I found a sample on codeproject: http://www.codeproject.com/KB/system/usbeject.aspx That allows me to identify+eject the device via its non-volatile serial, but I need it to recycle, not just eject. I have read this: http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2005-02/1292.html I do not understand it. This has been mentioned in other USB related posts: http://www.codeproject.com/KB/system/DriveDetector.aspx It is not relevant to my problem.

How can I cycle a USB device from C#?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 11:22:33
问题 I'd like to cycle (simulate unplug and re-inserting) a USB device (modem) after a certain event has fired. I found a sample on codeproject: http://www.codeproject.com/KB/system/usbeject.aspx That allows me to identify+eject the device via its non-volatile serial, but I need it to recycle, not just eject. I have read this: http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2005-02/1292.html I do not understand it. This has been mentioned in other USB

Can HTML5 communicate with peripherals like scanners and credit card readers?

…衆ロ難τιáo~ 提交于 2019-11-26 12:51:59
问题 My company writes software that installs on client machines to perform point-of-sale transactions. The software interfaces with a variety of external peripherals (receipt printers, bar code scanners, credit-card readers, etc). We do this with a WinForms app that we created in Visual Studio using the Microsoft OPOS library, which in turn communicates with our cloud server (a la client-server model). There are obvious inefficiencies in this model, primarily with updates. I\'m researching other