usb

Would it be possible to read out physical keyboard strokes in node.js?

放肆的年华 提交于 2019-12-21 05:13:16
问题 I have a node application which runs on a raspberry pi that keeps track of a bunch of UPnP-players (Sonos), which I would like to be able to control through a physical remote. I have a couple of airmouses, which has small keyboards as well as volume buttons that I would like to use. I have tried to get a grip on how to read out physical key strokes on a linux machine, and come to the conclusion that I need to read events from the input device, which in my case would be: /dev/input/by-id/usb

Is USB power always enabled ? And if not, how to write a driver

痞子三分冷 提交于 2019-12-21 04:58:13
问题 I have a device that came with an AC power adapter where the connector is a mini USB plug. The device however doesn't seem to power itself from a computer's USB port (using a standard USB-mini USB cable) unless a specific driver is installed. The driver is only available for Windows. I would like to charge the device from USB plugs on different platforms. My question is: why isn't power getting to the device without the driver? Is a driver always required for a USB port to start giving power?

cdc_acm : failed to set dtr/rts - can not communicate with usb cdc device

↘锁芯ラ 提交于 2019-12-21 04:49:11
问题 I was trying to enumerate usb cdc device using pic24fj128gb206. Device seems to be enumerated properly. But when I connect my device to Linux PC, I am getting the below warning message from kernel. cdc_acm 1-8.1.6.7:1.0: failed to set dtr/rts And this message will repeat when I try to connect using screen. screen /dev/ttyACM9 115200 And I am not able to communicate with my device from PC [ Ubuntu, 14.04 ] When analysing the data using wireshark, it looks like USB communication is fine until,

Flash memory as mass storage device using STM32 USB Device Library

旧街凉风 提交于 2019-12-21 04:41:04
问题 There is this flash memory IC on my board, which is connected to my STM32F04 ARM processor. USB port of the processor is available for the user. I want my flash memory to be detected as storage device when connected to PC via USB. As the first step I defined my USB class as MSC in my program which works fine. Since when I connect my board to PC, it detects a mass storage device connected, giving an error that "You should format the disc before using it". Now the question is that, how I can

How to run Python script on USB flash-drive insertion

徘徊边缘 提交于 2019-12-21 04:34:06
问题 My goal is to run a Python script on USB flash-drive insertion. I have written a udev rule and a shell script that is called in that rule. udev rule: /etc/udev/rules.d/10-usb.rules KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", RUN+="/home/Hypotheron/Desktop/script.sh" script.sh: #!/bin/sh echo 'Hello, world.' > /home/Hypotheron/Desktop/foo.txt #/home/Hypotheron/Desktop/job.py & exit The first line of my Python file is: #!/usr/bin/python I also did these following commands:

Recording from ALSA - understanding memory mapping

自闭症网瘾萝莉.ら 提交于 2019-12-21 04:32:22
问题 Im attempting to use ALSA to take the input from a USB audio device and write it out to disk as a series of signed short values. What I'm ending up with are blocks of what appear to be valid data interspersed with large blocks of zeros. I'm guessing that I have my buffers setup incorrectly and am not using the memory mapping properly. What I'm trying: sample rate: 8K (this is forced by the device) buffer size: 2048 period size: 512 one channel The device appears to be opened properly and

micromax a111 is not detected by adb

牧云@^-^@ 提交于 2019-12-21 02:43:15
问题 Recently i've purchased micromax a111 android device. I am android developer. So tried this device for debugging option. But the adb is not able to detect the device. I have change the settings also, but not working out. If any one have the solution please help me regarding this. 回答1: micromax doesn't have official PC-Suite, so you need to download a third party PC-Suite like Moborobo or Mobogenie, after installation you can restart the system, now your mobile will be detected. 回答2: Add the

How can BeagleBone Black be used as Mass Storage Device?

拟墨画扇 提交于 2019-12-21 02:35:25
问题 Is it possible to use the BB as Mass Storage Device? I want it to be connected to an audio player that can read files from USB connectivity (such as USB flash drive) and act as data storage device containing one specific folder (and its sub-folders) from the file system (if possible, on a flash drive connected to the board.). As the device specs says, it has connectivity of: USB client for power & communications USB host Operating system will probably be Ubuntu but can be changed. What

Android: USB Communication Android <-> External Device

耗尽温柔 提交于 2019-12-21 02:28:10
问题 I found several threads speacking about this subject, but after read them I don't have a clear idea about my problem. We have a external device (something like a tomtom device, I mean, not an accessory) and we want to connect this device to an android device. And we want to have serial communication between the external device and the android device using a USB connection. (At this time we have communication between the external device and other non android devices using RS232 interface, but

How to know which device is connected in which /dev/ttyUSB port

那年仲夏 提交于 2019-12-20 19:11:12
问题 I am using two Wavecom 16-port modems. When I attach the modems to my system, I am able to list of all the /dev/ttyUSB port names, but also I want to know, which modem is containing ports 0 to 16 and which one is containing ports 17 to 32? The modems may be attached and removed many times in a single day, so I also want to keep logs when modems get disconnected and connected again. Any idea how to do so using c/c++/php script/node.js ? 回答1: You can get this information from the sys filesystem