usb

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

前提是你 提交于 2019-12-20 19:11:04
问题 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

How can I limit the cache used by copying so there is still memory available for other cache?

ぐ巨炮叔叔 提交于 2019-12-20 17:29:10
问题 Basic situation: I am copying some NTFS disks in openSuSE. Each one is 2TB. When I do this, the system runs slow. My guesses: I believe it is likely due to caching. Linux decides to discard useful cache (eg. kde4 bloat, virtual machine disks, LibreOffice binaries, Thunderbird binaries, etc.) and instead fill all available memory (24 GB total) with stuff from the copying disks, which will be read only once, then written and never used again. So then any time I use these apps (or kde4), the

How to detect when USB device is being connected/disconnected?

大憨熊 提交于 2019-12-20 15:01:28
问题 I don't feel comfortable harnessing USB device with Delphi and have a next to nothing knowledge of the details of writing device driver (though I've come accross some when learning assembly with GoASM). The device could be either an usb modem or an usb printer. What I need is a direction to go and sample code adressing the topic. 回答1: This was taken from detect if usb device is connected unit U_Usb; interface uses Windows, Messages, SysUtils, Classes, Forms; type PDevBroadcastHdr = ^DEV

How to detect when USB device is being connected/disconnected?

我是研究僧i 提交于 2019-12-20 15:01:11
问题 I don't feel comfortable harnessing USB device with Delphi and have a next to nothing knowledge of the details of writing device driver (though I've come accross some when learning assembly with GoASM). The device could be either an usb modem or an usb printer. What I need is a direction to go and sample code adressing the topic. 回答1: This was taken from detect if usb device is connected unit U_Usb; interface uses Windows, Messages, SysUtils, Classes, Forms; type PDevBroadcastHdr = ^DEV

Sending commands from a PC to an Android phone - via physical connection (USB, Serial, etc)

心已入冬 提交于 2019-12-20 14:16:27
问题 I'm working on a project to automate some tasks (such as play a song, play a video, receive bluetooth data, etc) on an Android phone from a PC. Basically the PC will send a notifier to the phone and an app or something on the phone would then process the notifier and do 'something'. The opposite of this really: http://code.google.com/p/android-notifier/ I've seen some examples showing how to send commands to an Android listener app or service via a network connection, but in this case, I

Access USB serial ports using Python and pyserial

浪子不回头ぞ 提交于 2019-12-20 12:16:51
问题 How do I access the USB port using pyserial? I have seen an example with: import serial ser = serial.Serial('/dev/ttyUSB0') I used to access the serial port from MATLAB on Windows and using the appropriate syntax, /dev/ttyUSB0 would be replaced by COM1 or any other COM port. I'm on a Mac and I tried using the serial port scanners on the pyserial documentation to no avail. I think I should write it like this: import serial name = ? # Names of serial ports on Mac OS X ser = serial.Serial(name)

Access USB serial ports using Python and pyserial

我的未来我决定 提交于 2019-12-20 12:16:45
问题 How do I access the USB port using pyserial? I have seen an example with: import serial ser = serial.Serial('/dev/ttyUSB0') I used to access the serial port from MATLAB on Windows and using the appropriate syntax, /dev/ttyUSB0 would be replaced by COM1 or any other COM port. I'm on a Mac and I tried using the serial port scanners on the pyserial documentation to no avail. I think I should write it like this: import serial name = ? # Names of serial ports on Mac OS X ser = serial.Serial(name)

Send MIDI messages over USB on Android

爷,独闯天下 提交于 2019-12-20 11:09:36
问题 I would like to make an app on android which sends MIDI messages over USB to a computer to be able to control music softwares such as Cubase, FL, Reason, ect... Hardware MIDI controllers (e.g Keyboards) are automatically recognized in music software on Windows. I guess it's because they use the universal MIDI protocol which is directly recognized by the music software. They don't need their own driver. I'd like to be able to use my phone/tablet as a midi controller without having to install

Android USB isochronous data transfer

江枫思渺然 提交于 2019-12-20 10:53:11
问题 I am currently trying to find a way to handle USB data transfer on an isochronous endpoint on my Android 3.2 tablet (Host Mode supported). After writing some prototype code, I noticed that in the constants file for USB_ENDPOINT_XFER_ISOC states that "Isochronous endpoint type (currently not supported)". Is this possible without rooting the device? If so how would I go about doing this? Ideally I was hoping to stay within the java API, but if this is possible only via the NDK I would have to

JavaPOS Hello World in Java

点点圈 提交于 2019-12-20 10:44:15
问题 I would like to print a sample line on my USB POS (Point-Of-Sale) printer from a java program on Windows XP. I tried to setup a JavaPOS implementation but I get exception after exception for a missing jpos.xml or missing javax.usb.properties file. Can anyone tell me how to generate those files? They somewhat need to link to an implementation or something like that and I'm not sure what the (rare, unclear and incomplete) documentation means. Any other help would be appreciated. My current