You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://www.nuget.org/usbserialforandroid/)
2
+
[](https://www.nuget.org/packages/UsbSerialForAndroid)
3
3
4
-
This is a driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the [Android USB Host API](http://developer.android.com/guide/topics/connectivity/usb/host.html)
4
+
This is a .NET driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the [Android USB Host API](http://developer.android.com/guide/topics/connectivity/usb/host.html)
5
5
available on Android 3.1+.
6
6
7
7
No root access, ADK, or special kernel drivers are required; all drivers are implemented in
@@ -12,15 +12,7 @@ This is a C# port of Mike Wakerly's Java [usb-serial-for-android](https://github
12
12
13
13
It also includes code derived from a portion of LusoVU's [XamarinUsbSerial](https://bitbucket.org/lusovu/xamarinusbserial) library. XamarinUsbSerial was a C# wrapper for the Java usb-serial-for-android. It used an older version of the usb-serial-for-android .jar file. Only the C# code was used, the Java library is not referenced.
14
14
15
-
The default branch has been renamed from master to main. if you have a local clone, you can run the following commands to update the name of the default branch
16
-
17
-
```
18
-
git branch -m master main
19
-
git fetch origin
20
-
git branch -u origin/main main
21
-
git remote set-head origin -a
22
-
```
23
-
This library supports .NET 10 and Microsoft Android. Support for Xamarin Android and previous versions of .NET have been dropped. Sample application has been replaced with a new app demo. If you need the old demo or want to support older versions of .NET, please use [version 1.1.1](https://github.com/anotherlab/UsbSerialForAndroid/releases/tag/v1.1.1).
15
+
This library supports .NET 10 and Microsoft Android. Support for Xamarin Android and previous versions of .NET have been dropped. The original Xamarin sample application has been replaced with a new app demo. If you need the old demo or want to support older versions of .NET, please use [version 1.1.1](https://github.com/anotherlab/UsbSerialForAndroid/releases/tag/v1.1.1).
24
16
25
17
## Breaking changes
26
18
I cleaned up the code in order to publish this as a nuget package. Someone created a nuget package based on a two year old version of this code base and published to nuget under their own name (and without credit to the original authors). I changed the root namespace from `Hoho.Android.UsbSerial` to `Anotherlab.UsbSerialForAndroid` to make it easier to manage on nuget.
@@ -38,7 +30,7 @@ This solution contains two projects and a slnx solution file.
38
30
The original demo and the .sln format solution file were deprecated and removed removed prior to this release. As mentioned above, the last version of those files were in in [version 1.1.1](https://github.com/anotherlab/UsbSerialForAndroid/releases/tag/v1.1.1).
39
31
40
32
## Getting Started
41
-
**1.** Grab the package from [nuget](https://www.nuget.org/usbserialforandroid/)or download the repo and and Reference the library to your project.
33
+
**1.** Grab the package from [nuget](https://www.nuget.org/packages/UsbSerialForAndroid). You can clone or download the repo and Reference the library to your project.
42
34
43
35
**2.** Copy the [device_filter.axml](https://github.com/anotherlab/UsbSerialForAndroid/blob/main/UsbSerialForAndroidDemo/Resources/xml/device_filter.xml) from the example app to your Resources/xml folder. Make sure that the Build Action is set to AndroidResource
44
36
@@ -60,7 +52,7 @@ The original demo and the .sln format solution file were deprecated and removed
60
52
**6.** Refer to [MainActivity.cs](https://github.com/anotherlab/UsbSerialForAndroid/blob/main/UsbSerialForAndroidDemo/MainActivity.cs) in the example app to see how connect to a serial device and read data from it.
61
53
62
54
## Working with unrecognized devices
63
-
The UsbSerialForAndroid has been compiled with the Vendor ID/Product ID pairs for many common serial devices. If you have a device that is not defined by the library, but will work with one of the drivers, you can manually add the VID/PID pair. If you have a device that is not in the GetSupportedDevices() method for that driver, you can submit a pull request that adds the vendor and product IDs to that driver.
55
+
The UsbSerialForAndroid library has been compiled with the Vendor ID/Product ID pairs for many common serial devices. If you have a device that is not defined by the library, but will work with one of the drivers, you can manually add the VID/PID pair. If you have a device that is not in the GetSupportedDevices() method for that driver, you can submit a pull request that adds the vendor and product IDs to that driver.
64
56
65
57
UsbSerialProber is a class to help you find and instantiate compatible UsbSerialDrivers from the tree of connected UsbDevices. Normally, you will use the default prober returned by ``UsbSerialProber.getDefaultProber()``, which uses the built-in list of well-known VIDs and PIDs that are supported by our drivers.
Of course, nothing requires you to use UsbSerialProber at all: you can instantiate driver classes directly if you know what you're doing; just supply a compatible UsbDevice.
Arduino, Teensyduino, Atmel Lufa, ARM mbed, ST CDC, Raspberry Pi Pico Micropython, Raspberry Pi Pico SDK, Qinheng CH9102F, IOIO OTG, Elatec TWN4 OTG
86
89
87
-
**Serial chips:* FT232R, CDC/ACM (eg Arduino Uno) and possibly others.
88
-
See [CompatibleSerialDevices](https://github.com/mik3y/usb-serial-for-android/wiki/Compatible-Serial-Devices).
89
-
**Android phones and tablets:* Nexus 7, Motorola Xoom, and many others.
90
-
See [CompatibleAndroidDevices](https://github.com/mik3y/usb-serial-for-android/wiki/Compatible-Android-Devices).
90
+
Additional devices can be easily added.
91
91
92
92
## Additional information
93
93
@@ -110,4 +110,4 @@ This library is licensed under the MIT License. Please see [LICENSE.txt](https:/
110
110
111
111
Copyright 2017, Tyler Technologies. All Rights Reserved. Portions of this library are based on the [usb-serial-for-android](https://github.com/mik3y/usb-serial-for-android) and [XamarinUsbSerial](https://bitbucket.org/lusovu/xamarinusbserial) libraries. Their rights remain intact.
112
112
113
-
The icon used for the demo app was derived from [Serial to USB by Bonegolem](https://thenounproject.com/browse/icons/term/serial-to-usb/) (CC BY 3.0)
113
+
The icon used for the repo, nuget package, and demo app was derived from [Serial to USB by Bonegolem](https://thenounproject.com/browse/icons/term/serial-to-usb/) (CC BY 3.0)
Copy file name to clipboardExpand all lines: UsbSerialForAndroid/README.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# UsbSerialForAndroid
2
2
3
-
This is a driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the [Android USB Host API](http://developer.android.com/guide/topics/connectivity/usb/host.html)
3
+
This is a .NET driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the [Android USB Host API](http://developer.android.com/guide/topics/connectivity/usb/host.html)
4
4
available on Android 3.1+.
5
5
6
6
No root access, ADK, or special kernel drivers are required; all drivers are implemented in
@@ -38,7 +38,7 @@ If you are seeing this from the nuget package, the source code for this library
38
38
**6.** Refer to [MainActivity.cs](https://github.com/anotherlab/UsbSerialForAndroid/blob/main/UsbSerialForAndroidDemo/MainActivity.cs) in the example app to see how connect to a serial device and read data from it.
39
39
40
40
## Working with unrecognized devices
41
-
The UsbSerialForAndroid has been compiled with the Vendor ID/Product ID pairs for many common serial devices. If you have a device that is not defined by the library, but will work with one of the drivers, you can manually add the VID/PID pair. If you have a device that is not in the GetSupportedDevices() method for that driver, you can submit a pull request that adds the vendor and product IDs to that driver.
41
+
The UsbSerialForAndroid library has been compiled with the Vendor ID/Product ID pairs for many common serial devices. If you have a device that is not defined by the library, but will work with one of the drivers, you can manually add the VID/PID pair. If you have a device that is not in the GetSupportedDevices() method for that driver, you can submit a pull request that adds the vendor and product IDs to that driver.
42
42
43
43
UsbSerialProber is a class to help you find and instantiate compatible UsbSerialDrivers from the tree of connected UsbDevices. Normally, you will use the default prober returned by ``UsbSerialProber.getDefaultProber()``, which uses the built-in list of well-known VIDs and PIDs that are supported by our drivers.
Of course, nothing requires you to use UsbSerialProber at all: you can instantiate driver classes directly if you know what you're doing; just supply a compatible UsbDevice.
61
61
62
62
63
-
## Compatible Devices
63
+
## Compatible Serial Chipsets
64
64
65
-
**Serial chips:* FT232R, CDC/ACM (eg Arduino Uno) and possibly others.
66
-
See [CompatibleSerialDevices](https://github.com/mik3y/usb-serial-for-android/wiki/Compatible-Serial-Devices).
67
-
**Android phones and tablets:* Nexus 7, Motorola Xoom, and many others.
68
-
See [CompatibleAndroidDevices](https://github.com/mik3y/usb-serial-for-android/wiki/Compatible-Android-Devices).
Arduino, Teensyduino, Atmel Lufa, ARM mbed, ST CDC, Raspberry Pi Pico Micropython, Raspberry Pi Pico SDK, Qinheng CH9102F, IOIO OTG, Elatec TWN4 OTG
75
+
76
+
Additional devices can be easily added.
69
77
70
78
## Additional information
71
79
@@ -88,4 +96,4 @@ This library is licensed under the MIT License. Please see [LICENSE.txt](https:/
88
96
89
97
Copyright 2017, Tyler Technologies. All Rights Reserved. Portions of this library are based on the [usb-serial-for-android](https://github.com/mik3y/usb-serial-for-android) and [XamarinUsbSerial](https://bitbucket.org/lusovu/xamarinusbserial) libraries. Their rights remain intact.
90
98
91
-
The icon used for the demo app was derived from [Serial to USB by Bonegolem](https://thenounproject.com/browse/icons/term/serial-to-usb/) (CC BY 3.0)
99
+
The icon used for the repo, nuget package, and demo app was derived from [Serial to USB by Bonegolem](https://thenounproject.com/browse/icons/term/serial-to-usb/) (CC BY 3.0)
This is a driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the Android USB Host API available on Android 3.1+.
16
+
This is a .NET driver library to allow your Microsoft Android app to communicate with many common USB serial hardware. It uses the Android USB Host API available on Android 3.1+.
17
17
18
18
No root access, ADK, or special kernel drivers are required; all drivers are implemented in C#. You get a raw serial port with Read(), Write(), and other basic functions for use with your own protocols. The appropriate driver is picked based on the device's Vendor ID and Product ID.
0 commit comments