Skip to content

Commit 9d1cf46

Browse files
authored
Update README.md
Changed default branch name from master to main
1 parent 42e076d commit 9d1cf46

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@
22

33
[![Build Status](https://chrismillercode.visualstudio.com/UsbSerialForAndroid/_apis/build/status/anotherlab.UsbSerialForAndroid?branchName=master)](https://chrismillercode.visualstudio.com/UsbSerialForAndroid/_build/latest?definitionId=1&branchName=master)
44

5-
This is a driver library to allow your Xamarin 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+
This is a driver library to allow your Xamarin 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)
66
available on Android 3.1+.
77

88
No root access, ADK, or special kernel drivers are required; all drivers are implemented in
9-
c#. You get a raw serial port with `Read()`, `Write()`, and other basic
10-
functions for use with your own protocols. The appropriate driver is picked based on the device's Vendor ID and Product ID.
9+
c#. You get a raw serial port with `Read()`, `Write()`, and other basic
10+
functions for use with your own protocols. The appropriate driver is picked based on the device's Vendor ID and Product ID.
1111

12-
This is a Xamarin C# port of Mike Wakerly's Java [usb-serial-for-android](https://github.com/mik3y/usb-serial-for-android) library. It follows that library very closely. The main changes were to make the method names follow C# standard naming conventions. Some Java specific data types were replaced with .NET types and the reflection code is .NET specific. Code examples written for the Java version of the library should translate more or less faithfully to C#.
12+
This is a Xamarin C# port of Mike Wakerly's Java [usb-serial-for-android](https://github.com/mik3y/usb-serial-for-android) library. It followed that library very closely when it was ported. The main changes were to make the method names follow C# standard naming conventions. Some Java specific data types were replaced with .NET types and the reflection code is .NET specific. Code examples written for the Java version of the library should translate more or less faithfully to C#.
1313

14-
It also includes code derived from 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.
14+
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 the C# code was used, the Java library is not referenced.
1515

16-
UsbSerialForAndroid is a 100% C# port of the original java code.
16+
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
17+
18+
```
19+
git branch -m master main
20+
git fetch origin
21+
git branch -u origin/main main
22+
git remote set-head origin -a
23+
```
1724

1825
## Structure
1926

@@ -25,7 +32,7 @@ This solution contains two projects.
2532
## Getting Started
2633
**1.** Reference the library to your project
2734

28-
**2.** Copy the [device_filter.axml](https://github.com/anotherlab/UsbSerialForAndroid/blob/master/UsbSerialExampleApp/Resources/xml/device_filter.xml) from the example app to your Resources/xml folder. Make sure that the Build Action is set to AndroidResource
35+
**2.** Copy the [device_filter.axml](https://github.com/anotherlab/UsbSerialForAndroid/blob/master/UsbSerialExampleApp/Resources/xml/device_filter.xml) from the example app to your Resources/xml folder. Make sure that the Build Action is set to AndroidResource
2936

3037
**3.** Add the following attribute to the main activity to enable the USB Host
3138
```C#
@@ -45,10 +52,10 @@ This solution contains two projects.
4552
**6.** Refer to [MainActivity.cs](https://github.com/anotherlab/UsbSerialForAndroid/blob/master/UsbSerialExampleApp/MainActivity.cs) in the example app to see how connect to a serial device and read data from it.
4653

4754
## Working with unrecognized devices
48-
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.
55+
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.
4956

5057
UsbSerialProber is a class to help you find and instantiate compatible
51-
UsbSerialDrivers from the tree of connected UsbDevices. Normally, you will use
58+
UsbSerialDrivers from the tree of connected UsbDevices. Normally, you will use
5259
the default prober returned by ``UsbSerialProber.getDefaultProber()``, which
5360
uses the built-in list of well-known VIDs and PIDs that are supported by our
5461
drivers.
@@ -95,5 +102,4 @@ For other help and discussion, please join the usb-serial-for-android Google Gro
95102

96103
This library is licensed under LGPL Version 2.1. Please see LICENSE.txt for the complete license.
97104

98-
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.
99-
105+
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.

0 commit comments

Comments
 (0)