usb

How can I use COM and USB ports within Cygwin?

若如初见. 提交于 2019-12-06 19:52:04
问题 I want to send/receive data from my Arduino board with a Python script. I would like to do it using Python and its pySerial module which seems to fit my needs. So I installed Python and pySerial within cygwin (windows XP behind). The Python script is rather straightforward: $ cat example.py #print "testing my COM26 port using python" import serial ser = serial.Serial() ser.baudrate = 9600 ser.port = 26 ser ser.open() ser.isOpen() However at runtime I get the following error. $ python example

Trouble connecting to LG phone with adb (Mac OS X 10.7.5)

孤人 提交于 2019-12-06 17:07:35
问题 When I run adb devices there are no devices showing as connected. My device is a LG Optimus Exceed 2 running 4.4.2 There are many of these posts around, so here's what I've done: I'm using the cord that came with the phone. It charges and tries to sync photos, so it isn't an issue here. Switching usb ports and trying a powered usb hub doesn't affect it either. I've added the vendor id (0x1004) to ~/.android/adb_usb.ini Restarted and unplugged any combination of things you can think of USB

Looking for Example Embedded Linux HID Device Code

☆樱花仙子☆ 提交于 2019-12-06 17:04:27
I want to set up my embedded application as a HID device, with a separate process controlling the HID interface to allow dynamic connections to a PC. There seems to be many people out there that have done it, but I would like to do is: a) Understand how to configure my build (Freescale i.MX Linux using ltib) to include the USB APIs and includes in my build (ie g_hid.h). b) Where can I find an example application which does something like move the mouse about the screen to demonstrate the operation of the HID? Thanx for your help! http://lxr.linux.no/#linux+v3.3/Documentation/usb/gadget_hid.txt

Can linux signal my Qt program when a particular USB device is connected?

泄露秘密 提交于 2019-12-06 16:48:34
I want linux to inform my Qt program by a signal when a particular USB device is connected. Storage devices like flash disk or hard drive. How can I do this? What are your suggestions? UPDATE: I have found that QtDbus can provide the functionality that I need but I have not figure out how exactly. Is there anyone can give information about getting USB device notification with QtDbus? I have been reading this tutorial: http://dbus.freedesktop.org/doc/dbus-tutorial.html This tutorial says: D-Bus is designed for two specific cases: Communication between desktop applications in the same desktop

Android USB to Samsung Eclipse Cannot Connect

若如初见. 提交于 2019-12-06 16:37:44
Right now I am trying to connect to Samsung Captivate. I see the device, but adb devices shows and empty list. Debugging in Eclipse I cannot see the device. I see it in the Windows 7 device list however. phone says connected. But adb devices does not list anything. What else do I need to do? Samsung has a separate driver for connecting their Android devices for to Windows machines. I think there is an option in Kies to install this. This solution is to connect via wifi, so there is no installation of drivers needed. First you need to download the shell terminal emulator on your android phone.

Linux USB driver probe not called if device already plugged

浪尽此生 提交于 2019-12-06 15:53:27
If I use a modified usb skeleton driver on Linux and I insmod the module with the USB device already plugged in, the probe function doesn't get called. I need to unplug and replug the device in order for the driver to be activated. This is not the case for e.g. the serial drivers, I made some tests. Is there a reason for this? How do I get the probe function to get called? Almost all USB HID devices are automatically managed by usbhid driver. Try the following: sudo rmmod usbhid sudo insmod your_driver sudo insmod usbhid You probably need to unbind your device from usbhid and bind it to your

Two webcams on one usb 2.0 hub - works in windows but not linux

牧云@^-^@ 提交于 2019-12-06 15:27:31
The openCV code below grabs simultaneous images from two cameras. It works fine in windows, with the cameras both attached to one usb 2.0 hub. When I try the same code in linux, it only has enough bandwidth for one camera at a time. I've also tried viewing the two streams at once with guvcview, same issue. What I need is some way to force the webcams to work together, possibly by setting the amount of bandwidth the driver requests. capture = cv.CaptureFromCAM(0) capture2 = cv.CaptureFromCAM(1) while True: frame = cv.QueryFrame(capture) frame2 = cv.QueryFrame(capture2) cv.ShowImage("w1", frame)

Communication between Android device(phone) and PC via USB coding

对着背影说爱祢 提交于 2019-12-06 14:58:46
I searched for some websites and learned that the way to communicate between android device(phone) and PC via USB is to have an app implementing serversocket on the phone and another app implementing client socket on PC. I kinda fixed the phone side's app(no exception now), but I got an exception "Ljava.lang.StackTraceElement" trying to initiate a socket("localhost", 38300). Does anybody know what's going on with this and how I can fix it? I attached both side's of the code below. My step to get it to run is as follows : environment: Samsung Android phone, Linux PC, Android Studio developer

What is most appropriate USB class to handle images and video transfer and streaming?

a 夏天 提交于 2019-12-06 14:26:08
问题 I am working on a project (a digital camera) that should be able to take still images and short video clips and make those available to the host. As well as being able to stream live video. Which USB class[es] should I use? Should I use PTP (for still images and video) and USB Video Class for streaming? Does PTP support transfer of video? Does PTP support video streaming? 回答1: For static objects PTP is better since it does have a definition for an object. Current Canon DSLRs are also capable

Read Raw USB Input on Windows

余生颓废 提交于 2019-12-06 14:07:20
I have device that is a USB HID Human Interface that sends keycodes to usb host when I press the keys and I just can't find a simple program that will dump all the input data that comes in my USB port? (with source code available of course. USBlyzer does it, but it's shareware) Justin Dearing Check out libusb and #USBLib Both are open sourse. #USBLib is a .net wrapper around the multi platform libusb. 来源: https://stackoverflow.com/questions/7373247/read-raw-usb-input-on-windows