usbserial

C# serial communication with u-blox gps

假装没事ソ 提交于 2019-12-19 03:45:29
问题 I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then watch the flow of data from the GPS. Then I want the data in my program, not so easy... I have implemented some methods using the serialPort class to read from the GPS, but am unsuccessful. I have programmed several serial device readers and writers before in C#, but this one stops me. As an example, the simple code in

How to find the path of USB which is mounted to android?

倾然丶 夕夏残阳落幕 提交于 2019-12-18 08:46:15
问题 I am working on an android application to read data from USB. The usb can be connected to android with serial port and my app can find it. Now, I want to read data files and folder from USB. I have read many articles. I found that they use this code : Environment.getExternalStorageDirectory(); However in my case, I got that the path is /storage/emulated/0. When I try to read all the files which are contained in the path, I got the following statements: /storage/emulated/0/Android /storage

Control USB ports

雨燕双飞 提交于 2019-12-18 07:09:31
问题 can i send specific signals to USB ports using Ruby or C++, also the operating system is Windows, so this is like totally new 4 me (to program for windows), so i'm trying to do it as a DLL file, can this DLL contain Ruby code ?? by the way this is just a training project, so it dosn't matter that much, i'm just practicing on those stuff under windows. 回答1: I see two separate questions here. So I'll try to anwser them separatly. How to control USB Devices from your code Yes you can control USB

“The semaphore timeout period has expired” error for USB connection

僤鯓⒐⒋嵵緔 提交于 2019-12-17 07:29:14
问题 I'm getting this error... The semaphore timeout period has expired. On this line... ThePorts.ActivePort1.Open(); ...but I only get it from time to time. When it happens, it happens over and over again. Then the problem goes away, for hours or days, then it comes back. The serial port is a USB with a BlueTooth connected. I think this guy was having a very similar problem, but not in C# Freeze on SerialPort.Open / DeviceIoControl / GetcommState with usbser.sys As best I can estimate, I have

Custom Baud Rate, redux

本小妞迷上赌 提交于 2019-12-13 16:32:31
问题 I am having exactly the problem detailed at Custom baud rate -- SetCommState() fails with baud=921600 but succeeds with baud=115200 -- albeit on Windows 7 64-bit and with a couple of other odd circumstances, as follows: 1) The port I'm talking to, is a USB-to-UART adapter from Silicon Labs, with their driver but (as I understand it; don't quote me) re-signed to identify itself as from my company (we redistribute it with our hardware product which requires it). The COM port appears in Device

Need to find and open a USB serial device on linux

折月煮酒 提交于 2019-12-13 07:37:45
问题 I'm writing a small C application to run on my (Linux) QNAP NAS that will talk to an Arduino (I have no difficulty with any of the USB code for the arduino). (The arduino has a trusted application on it that accepts text commands via USB serial.) My wish was to find it using the USB vendor/product IDs (only half implemented at the moment). What I have so far (see below) works quite nicely in that it does find the device. // runs on NAS #include <stdio.h> #include <usb.h> main () { struct usb

Identifying a device by retrieving its USB ID

我怕爱的太早我们不能终老 提交于 2019-12-13 00:35:53
问题 I'd like my application to be able to detect a where a particular USB device has been mounted, and adapt accordingly. Ideally, I'd associate paths with a USB serial number, rather than with a given path. However, I cannot figure out a simple way to access these unique IDs from VB.Net code. Has anybody succeeded in doing this? 回答1: You should use WMI to query for the Win32_USBControllerDevice class. Here is a blog entry showing some sample code with Powershell which you should be able to adapt

Python SerialException: Device reports readiness to read but returned no data

情到浓时终转凉″ 提交于 2019-12-12 17:14:13
问题 I'm using an Arduino Nano, previously an UNO, to collect data from sensors and then send the data back over a USB connection through a powered hub to a Raspberry Pi model B running Jessie 4.1.19+ Mar, 15 2016 and Python 2.7. The python code uses pyserial readline to get the data. In general it works fine but occasionally (typically a couple of times a day) it fails with the above message. It seemed the only way to fix it was to unplug the USB connection, reconnect it and restart the program.

Data from USB ~ Serial Port

限于喜欢 提交于 2019-12-11 16:09:48
问题 I would like to transfer data from a USB Host (of my Laptop or Android Device) to Serial COM port (of a Desktop PC) through a USB - Serial port(DB-9) adapter. Is there any library existed to do this task?? i have already studied and tried http://developer.android.com/guide/topics/connectivity/usb/host.html but failed. Can i send data by a using a java program or Android App from my Laptop or Android Device ?? Can i receive data by an app in Desktop PC and show us???? If so please guide me how

USB VCP connection fails occasionally

女生的网名这么多〃 提交于 2019-12-11 15:52:24
问题 My question is quite simple: I operate 20 CP210x (Silicon Lab) devices over an industrial 20 Port USB Hub. In one of about 1000 trials to open the port I get a problem: The call to CreateFile(portName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); is blocking and doesn't return. In this case it doesn't help to repeat or to restart my software. Only plugging out/in the device helps. Of course the port name is including backslashes, as required for higher COM Port numbers. The