usb

How can I emulate a COM port, write data to it and read data from it?

I'm trying to test my code that reads from a USB port (COM25 when the device is connected) that is created when a device is connected to my computer and to a boat. I cannot power the USB device when not on the boat so testing is difficult. Can someone let me know how to simulate a COM port and write data to it so my test program is able ...

USB - sync vs async vs semi-async (partially answered now)

Updates: I wrote an asynchronous C version and it works as it should. Turns out the speed issue was due to Python's GIL. There's a method to fine tune its behavior. sys.setcheckinterval(interval) Setting interval to zero (default is 100) fixes the slow speed issue. Now all that's left is to figure out is what's causing the other issu...

Determining the HID Path for USB HID device using libhid on Linux

I’m interested in using libhid to access a custom HID device that we are developing on a PIC microcontroller. I have been able to successfully get the test_libhid code to run. The instructions for reading and writing to devices using this library are provided as comments in the test_libhid code. I have attempted to follow the document...

How to develop a USB mass storage simulator in Linux?

Hi, I am new to programming USB. I want to develop a simulator in Linux for USB mass storage devices. I would be thankful to you if you share links. ...

USB Transaction Timeout on Mac OS X 10.5.7

Hello , I am newbie to MAC. I am writing a Device Firmware Updater for a Bluetooth Headset device on Mac OS X 10.5.7. while downloading the firmware I keep on getting "Transaction Timeout" errors very frequently. The application runs successfully for firmwares having size less than 700KB but it gives error "Transaction Timeout" for firmw...

Differentiating between data card and pen drive or USB flash drive

I am having a Vodaphone data card which can be inserted in a USB port. I have XP and Vista OS, and I am using WM_DEVICECHANGE event of Windows, to know USB Insertion and removal, and it's working fine for me. But I am not able to differentiate between Data card insertion and Pen drive insertion. Is it possible? ...

how to differentiate between lan card and data card

Dear All, I have a Data card with me. I wanted to know, is there any way programatically, i can tell that, it is data card and it is LAN card. I have used IFTable, I have used IListManager, INetwork manager provided by microsoft, but not able to solve the problem Edited: I have one lan card and one data card connected on my system, ...

Is there a definitieve resource that documents navigation of the linux /proc and /sys filesystems?

We use the /proc and /sys file systems in Linux to discover various types of system configuration information. Typically, we spelunk around through the different files and directories until we find the information that we need. I'm wondering if anyone knows of a definitive resource that documents how one would navigate through the /pro...

Using code written for the serial port on an usb port

Hi all :) I've got an USB card reader that I need to access from Lazarus / Delphi. The SDK is written in VB6 and talks to the serial port, so in Windows it installs a driver to map the USB port to a serial port. I'd like to skip that step (eg so that the same code works in Linux), but I'm not very familiar with the USB protocol, so I ...

Detect when a USB device is connected in C

I am new to C and am trying to write a program that syncs files on my computer to a USB device. It currently works my me cd'ing to the directory that the device mounts to and typing "myprog init" which creates a .myprog file. The idea then is that when a USB device is connected my program checks for the .myprog file, if it finds it then ...

Simulate USB insertion on OSX via software

How can I inject USB device nodes into OSX (>= 10.5) such as you might be able for debugging USB handlers / writing new USB drivers? I'm interested in this in order to handle non-USB devices using TokenD. From what it looks like, I would have to tackle faking USB-device insertion and then create a PC/SC ifdHandler that would handle thi...

Data collection with Android via USB

What would be the best way to access the USB as a serial port on a android device (HTC Magic) ? I am thinking about a OBD-II interface, can I do this on a startdard phone or more likely I'll need a modified firmware ? ...

Deleting files on FAT32 USB changes the first cluster information

i have made a file recovery software, which reads the FAT32 directory entry and identifies the first cluster of the file and attempts to recover the data, it is supposedly to be working fine however when i try on a fat32 usb disk the following happens. The Cluster number assigned to a file when it is not deleted is different from the cl...

USB Communication API

Is there a decent USB communication API? Preferably cross-platform (Linux if not, I guess) I don't have a specific use in mind, I just want to learn about using the USB ports for future electronics projects. I realize this is very general, I'll try to refine the question as the answers point me in the right direction. Thanks. ...

Java video capture on Mac OS X (USB/Firewire)

Looking for resources and information regarding capturing video from an external webcam on Mac OS X using Java. QTKit seems to only offer this functionality in native code. Any information would be appreciated. ...

Is libusb the preferred method on Mac OS X to access USB device?

Is libusb the preferred method to talk to a device over USB (using AT commands) on OS X these days? Is there any high level equivalent in cocoa? ...

Reading the serial number of USB storage device in Vb

Is it possible to read the serial number of a USB drive using VB. ...

Linux USB: turning the power on and off?

How can I programmatically enable and disable the power to a particular USB port on Linux? Is such a thing even possible? (no -- see below) Mac answers appreciated as well! I was trying for a BOC (don't pretend you weren't try to get one too!) and ended up with one of these, and would like to get some use out of the thing by hooking it ...

Do I need to write my own host side USB driver for a CDC device

This may not be considered to be directly programming related but I am at a loss to know where else to ask. I have tried looking at a variety of websites but so far Google has not been my friend. I am having trouble finding out whether I need to write my own device driver for the various windows/linux/mac platforms that the device I am...

How to map USB HID input to keyboard strokes?

I am a .NET developer, and I want to turn my USB HID device (Mouse, Dance Pad, Guitar or Drums, specially Drums) into a keyboard (with few keys, I know). Do I need to develop this from scratch? Is there any tool that does that? Is there any library that would help me? ...