Skip to content

Commit 1f95612

Browse files
authored
Merge pull request #73 from anotherlab/cleanup-1
cleanup
2 parents 4e2e59b + d254deb commit 1f95612

File tree

3 files changed

+36
-28
lines changed

3 files changed

+36
-28
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ![Logo](UsbSerialForAndroid/icon.png) UsbSerialForAndroid
2-
[![NuGet version (usbserialforandroid)](https://img.shields.io/nuget/v/usbserialforandroid?style=flat-square)](https://www.nuget.org/usbserialforandroid/)
2+
[![NuGet version (usbserialforandroid)](https://img.shields.io/nuget/v/usbserialforandroid?style=flat-square)](https://www.nuget.org/packages/UsbSerialForAndroid)
33

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)
55
available on Android 3.1+.
66

77
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
1212

1313
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.
1414

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).
2416

2517
## Breaking changes
2618
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.
3830
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).
3931

4032
## 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.
4234

4335
**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
4436

@@ -60,7 +52,7 @@ The original demo and the .sln format solution file were deprecated and removed
6052
**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.
6153

6254
## 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.
6456

6557
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.
6658

@@ -82,12 +74,20 @@ List<UsbSerialDriver> drivers = prober.FindAllDrivers(usbManager);
8274
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.
8375

8476

85-
## Compatible Devices
77+
## Compatible Serial Chipsets
78+
79+
* FTDI:
80+
FT232R, FT2232H, FT4232H, FT232H, FT230X, FT231X, FT234XD
81+
* CP210x:
82+
UART Bridge, CP2102, CP2105, CP2108
83+
* Prolific PL2303:
84+
PL2303HX, PL2303HXD, PL2303TA, PL2303GC, PL2303GB, PL2303GT, PL2303GL, PL2303GE, PL2303GS
85+
* Qinheng CH34x:
86+
CH340, CH341A
87+
* CDC Driver:
88+
Arduino, Teensyduino, Atmel Lufa, ARM mbed, ST CDC, Raspberry Pi Pico Micropython, Raspberry Pi Pico SDK, Qinheng CH9102F, IOIO OTG, Elatec TWN4 OTG
8689

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.
9191

9292
## Additional information
9393

@@ -110,4 +110,4 @@ This library is licensed under the MIT License. Please see [LICENSE.txt](https:/
110110

111111
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.
112112

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)

UsbSerialForAndroid/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# UsbSerialForAndroid
22

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)
44
available on Android 3.1+.
55

66
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
3838
**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.
3939

4040
## 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.
4242

4343
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.
4444

@@ -60,12 +60,20 @@ List<UsbSerialDriver> drivers = prober.FindAllDrivers(usbManager);
6060
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.
6161

6262

63-
## Compatible Devices
63+
## Compatible Serial Chipsets
6464

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).
65+
* FTDI:
66+
FT232R, FT2232H, FT4232H, FT232H, FT230X, FT231X, FT234XD
67+
* CP210x:
68+
UART Bridge, CP2102, CP2105, CP2108
69+
* Prolific PL2303:
70+
PL2303HX, PL2303HXD, PL2303TA, PL2303GC, PL2303GB, PL2303GT, PL2303GL, PL2303GE, PL2303GS
71+
* Qinheng CH34x:
72+
CH340, CH341A
73+
* CDC Driver:
74+
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.
6977

7078
## Additional information
7179

@@ -88,4 +96,4 @@ This library is licensed under the MIT License. Please see [LICENSE.txt](https:/
8896

8997
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.
9098

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)

UsbSerialForAndroid/UsbSerialForAndroid.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Product>UsbSerialForAndroid</Product>
1414
<PackageTags>usbserial,usb,serialport,serial,android,androidusb,usbhost,usb-serial,dotnetandroid,hardware,driver,peripherals,device,communications,net10.0-android,dotnet</PackageTags>
1515
<Description>USB Serial library for Android
16-
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+.
1717

1818
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.
1919
</Description>

0 commit comments

Comments
 (0)