Skip to content

Commit 32645ba

Browse files
committed
1 parent c583004 commit 32645ba

File tree

5 files changed

+43
-16
lines changed

5 files changed

+43
-16
lines changed

Java/Serial/src/main/java/gurux/serial/GXFtdi.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public Chipset getChipset() {
112112
public static boolean isUsing(final String stringManufacturer, final int vendor, final int product) {
113113
return (vendor == 1027 && (product == 24557) || product == 24577 || product == 24597) ||
114114
//Tespro
115-
(vendor == 403 && product == 6001) ||
115+
(vendor == 0x403 && product == 0x6001) ||
116+
//KoCoS
117+
(vendor == 0x403 && product == 0x6015) ||
116118
"FTDI".equalsIgnoreCase(stringManufacturer);
117119
}
118120

Java/Serial/src/main/java/gurux/serial/GXPort.java

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public class GXPort {
7474
*/
7575
private String mSerial;
7676

77+
/**
78+
* Version number.
79+
*/
80+
private String mVersion;
81+
7782
/**
7883
* Raw descriptors.
7984
*/
@@ -209,15 +214,18 @@ public String getInfo() {
209214
if (mVendorId != 0) {
210215
sb.append("Vendor: ");
211216
sb.append(mVendor);
212-
sb.append(" ID: ");
217+
sb.append(" ID: 0x");
213218
sb.append(Integer.toHexString(mVendorId));
214219
sb.append(nl);
215220
}
216221
sb.append("Product: ");
217222
sb.append(mProduct);
218-
sb.append(" ID: ");
223+
sb.append(" ID: 0x");
219224
sb.append(Integer.toHexString(mProductId));
220225
sb.append(nl);
226+
sb.append("Version: ");
227+
sb.append(mVersion);
228+
sb.append(nl);
221229
if (mSerial != null) {
222230
sb.append("Serial: ");
223231
sb.append(mSerial);
@@ -249,7 +257,7 @@ public String getSerial() {
249257
/**
250258
* @param value Serial number.
251259
*/
252-
public void setSerial(String value) {
260+
public void setSerial(final String value) {
253261
mSerial = value;
254262
}
255263

@@ -263,7 +271,23 @@ public byte[] getRawDescriptors() {
263271
/**
264272
* @param value Raw descriptors.
265273
*/
266-
public void setRawDescriptors(byte[] value) {
274+
public void setRawDescriptors(final byte[] value) {
267275
mRawDescriptors = value;
268276
}
277+
278+
/**
279+
*
280+
* @return Version number.
281+
*/
282+
public String getVersion() {
283+
return mVersion;
284+
}
285+
286+
/**
287+
*
288+
* @param value Version number.
289+
*/
290+
public void setVersion(final String value) {
291+
this.mVersion = value;
292+
}
269293
}

Java/Serial/src/main/java/gurux/serial/GXSerial.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ void addPort(final UsbDevice device, final boolean notify) {
395395
port.setPort(device.getDeviceName());
396396
port.setVendorId(device.getVendorId());
397397
port.setProductId(device.getProductId());
398+
port.setVersion(device.getVersion());
398399
Map.Entry<String, String> info = find(mContext, device.getVendorId(), device.getProductId());
399400
if (info != null) {
400401
port.setVendor(info.getKey());
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<!-- Kamstrup -->
4-
<usb-device vendor-id="6056" product-id="1" class="0" subclass="0" protocol="0" />
4+
<usb-device vendor-id="6056" product-id="1" />
55
<!-- Prolific -->
6-
<usb-device vendor-id="1367" product-id="8200" class="0" subclass="0" protocol="0" />
6+
<usb-device vendor-id="1367" product-id="8200" />
77
<!-- -->
8-
<usb-device vendor-id="6790" product-id="29987" class="255" subclass="0" protocol="0" />
8+
<usb-device vendor-id="6790" product-id="29987" />
99
<!-- Prolific BF-810 -->
10-
<usb-device vendor-id="1659" product-id="8963" class="255" subclass="0" protocol="0" />
10+
<usb-device vendor-id="1659" product-id="8963"/>
11+
<usb-device vendor-id="1659" product-id="9123" />
1112
<!-- FTDI -->
12-
<usb-device vendor-id="1027" product-id="24557" class="255" subclass="0" protocol="0" />
13-
<usb-device vendor-id="1027" product-id="6001" class="255" subclass="255" protocol="255" />
14-
<usb-device vendor-id="1027" product-id="24577" class="0" subclass="0" protocol="0" />
15-
<usb-device vendor-id="403" product-id="6001" class="255" subclass="255" protocol="255" />
16-
13+
<usb-device vendor-id="1027" product-id="24557" />
14+
<usb-device vendor-id="1027" product-id="6001" />
15+
<usb-device vendor-id="1027" product-id="24577" />
16+
<usb-device vendor-id="1027" product-id="24597" />
1717
<!-- CP21xx -->
18-
<usb-device vendor-id="4292" product-id="60000" class="0" subclass="0" protocol="0" />
18+
<usb-device vendor-id="4292" product-id="60000" />
1919
</resources>

Java/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.useAndroidX=true
2121
android.nonTransitiveRClass=true
2222

2323
#Version
24-
version=3.0.1
24+
version=3.0.2

0 commit comments

Comments
 (0)