usbserial

Xamarin.Forms: Read Data using UsbDeviceConnection Library

霸气de小男生 提交于 2021-02-10 14:34:07
问题 I Have to read data from UsbDeviceConnection but the call UsbDeviceConnection.BulkTransfer(......) always returns -1. when I have to write data, all works fine, but when I try to receive, the call always returns -1 (receive failed). [Obsolete] public string ConnectAndRead() { // Get a usbManager that can access all of the devices var usbManager = (UsbManager)Forms.Context.GetSystemService(Context.UsbService); while(usbManager.DeviceList.Count == 0) { Debug.WriteLine($"Nessun dispositivo

Xamarin.Forms: Read Data using UsbDeviceConnection Library

和自甴很熟 提交于 2021-02-10 14:31:45
问题 I Have to read data from UsbDeviceConnection but the call UsbDeviceConnection.BulkTransfer(......) always returns -1. when I have to write data, all works fine, but when I try to receive, the call always returns -1 (receive failed). [Obsolete] public string ConnectAndRead() { // Get a usbManager that can access all of the devices var usbManager = (UsbManager)Forms.Context.GetSystemService(Context.UsbService); while(usbManager.DeviceList.Count == 0) { Debug.WriteLine($"Nessun dispositivo

Android app not synchronized with Arduino Serial communication

走远了吗. 提交于 2020-07-08 22:25:48
问题 I have a simple sonar arduino project so that it prints the distance every second. I have implemented an android app using UsbSerial to communicate with my arduino. So far so good, I am able to receive data and the data I receive is correct, but the problem is that the values are sometimes not properly sent. Here is the sample output I receive: data: 7 data: 1 data: data: 71 and here is the code that generates output: private UsbSerialInterface.UsbReadCallback mCallback = new

How to get event for different baudrate?

巧了我就是萌 提交于 2020-02-04 22:19:57
问题 I am working on native android application. In this application I am connecting hardware devices using usb cable, for this connection I used below library: https://github.com/felHR85/UsbSerial I have 3 different hardware devices and each device has different baudrate. I have one scan button in app. If user click on it then I need to check which device is connected and print its information. To implement this, I create 3 methods. Each method have same code with different baudrate. When user

How to get event for different baudrate?

人走茶凉 提交于 2020-02-04 22:18:32
问题 I am working on native android application. In this application I am connecting hardware devices using usb cable, for this connection I used below library: https://github.com/felHR85/UsbSerial I have 3 different hardware devices and each device has different baudrate. I have one scan button in app. If user click on it then I need to check which device is connected and print its information. To implement this, I create 3 methods. Each method have same code with different baudrate. When user

How to find specific Teensy in COM list

独自空忆成欢 提交于 2020-01-07 04:38:10
问题 I am new to this so my first project is making a Skype notification cube from a TeensyLC and some LEDs. I know I can hard-code the COM port for communications but if I unplug it and use a different plug my COM port changes. I'd like to be able to plug the board in and have the software find it automatically. [Edit] It looks like I didn't express myself well the first time, so let me try this again. If I call SerialPort.GetPortNames() I get an array of {"COM1", "COM2", "COM3"}. If I make a new

USB-Serial communication giving strange output

馋奶兔 提交于 2020-01-02 11:44:27
问题 I'm trying to get data from a mercury analyzer (Seefelder-Messtechnik Hg Analyzer 3000) that gives output to a 9-pin R232 serial port to my OSX 10.10 laptop. I've followed the steps described here to install the PL-2303 driver: http://pbxbook.com/other/mac-tty.html The device manual (http://www.seefelder-messtechnik.com/V71-3-02-21e.pdf) lists the communication protocol as "9600 Baud, 8 data bit, 1 stop bit, no log, no parities". I attempt to read from the device by using the 'screen' command

USB-Serial communication giving strange output

梦想与她 提交于 2020-01-02 11:43:08
问题 I'm trying to get data from a mercury analyzer (Seefelder-Messtechnik Hg Analyzer 3000) that gives output to a 9-pin R232 serial port to my OSX 10.10 laptop. I've followed the steps described here to install the PL-2303 driver: http://pbxbook.com/other/mac-tty.html The device manual (http://www.seefelder-messtechnik.com/V71-3-02-21e.pdf) lists the communication protocol as "9600 Baud, 8 data bit, 1 stop bit, no log, no parities". I attempt to read from the device by using the 'screen' command

Identify COM port using VID and PID for USB device attached to x64

自作多情 提交于 2019-12-30 06:40:29
问题 As following i able to get usb com port names attached to 32bit win7OS machine, by given pid and vid,but when running in x64 it stuck in the following line: comports.Add((string)rk6.GetValue("PortName")); This is my code static List<string> ComPortNames(String VID, String PID) { String pattern = String.Format("^VID_{0}.PID_{1}", VID, PID); Regex _rx = new Regex(pattern, RegexOptions.IgnoreCase); List<string> comports = new List<string>(); RegistryKey rk1 = Registry.LocalMachine; RegistryKey