From a690c723b9fdde0a0042e09a7d49a8cbc21a528b Mon Sep 17 00:00:00 2001 From: Manuel Bl Date: Sun, 13 Oct 2024 13:50:24 +0200 Subject: [PATCH] Increase version to 1.1.0 --- README.md | 26 +++++++++++++------------- examples/bulk_transfer/README.md | 8 ++++---- examples/bulk_transfer/pom.xml | 4 ++-- examples/enumerate/README.md | 6 +++--- examples/enumerate/pom.xml | 4 ++-- examples/enumerate_kotlin/README.md | 6 +++--- examples/enumerate_kotlin/pom.xml | 4 ++-- examples/epaper_display/README.md | 10 +++++----- examples/epaper_display/pom.xml | 4 ++-- examples/monitor/README.md | 8 ++++---- examples/monitor/pom.xml | 4 ++-- examples/monitor_kotlin/README.md | 6 +++--- examples/monitor_kotlin/pom.xml | 4 ++-- examples/stm_dfu/README.md | 6 +++--- examples/stm_dfu/pom.xml | 4 ++-- java-does-usb/pom.xml | 2 +- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 329cca3..2055094 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![javadoc](https://javadoc.io/badge2/net.codecrete.usb/java-does-usb/javadoc.svg)](https://javadoc.io/doc/net.codecrete.usb/java-does-usb) -*Java Does USB* is a Java library for working with USB devices. It allows to query the conntected USB devices and to communicate with them using custom / vendor specific protocols. (It is not intended for communication with standard types of USB devices such as mass storage devices, keyboards etc.) +*Java Does USB* is a Java library for working with USB devices. It allows to query the conntected USB devices and to communicate with them using custom / vendor specific protocols. It is not intended for communication with standard types of USB devices such as mass storage devices, keyboards etc. -The library uses the [Foreign Function and Memory API](https://docs.oracle.com/en/java/javase/21/core/foreign-function-and-memory-api.html#GUID-FBE990DA-C356-46E8-9109-C75567849BA8) to access native APIs of the underlying operating system. It is written entirely in Java and does not use JNI or any native third-party library. The *Foreign Function and Memory API* has been introduced with Java 22. Preview versions were available in several earlier releases. +The library uses the [Foreign Function and Memory API](https://docs.oracle.com/en/java/javase/22/core/foreign-function-and-memory-api.html) to access native APIs of the underlying operating system. It is written entirely in Java and does not use JNI or any native third-party library. The *Foreign Function and Memory API* has been introduced with Java 22. @@ -31,14 +31,14 @@ If you are using Maven, add the below dependency to your pom.xml: net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 ``` If you are using Gradle, add the below dependency to your build.gradle file: ```groovy -compile group: 'net.codecrete.usb', name: 'java-does-usb', version: '1.0.0' +compile group: 'net.codecrete.usb', name: 'java-does-usb', version: '1.1.0' ``` ```java @@ -69,7 +69,7 @@ public class EnumerateDevices { - [Bulk Transfer](examples/bulk_transfer/) demonstrates how to find a USB device, open it and communicate using bulk transfer. - Enumeration ([Java](examples/enumerate/) / [Kotlin](examples/enumerate_kotlin/)) lists all connected USB devices and displays information about interfaces and endpoints. -- Monitor ([Java](examples/monitor/) / [Kotlin](examples/monitor_kotlin/)) lists the connected USB devices and then monitors for devices being connected and disconnnected. +- Monitor ([Java](examples/monitor/) / [Kotlin](examples/monitor_kotlin/)) lists the connected USB devices and then monitors for devices being connected and disconnected. - [Device Firmware Upload (DFU) for STM32](examples/stm_dfu) uploads firmware to STM32 microcontrollers supporting the built-in DFU mode. - [ePaper Display](examples/epaper_display) communicates with an IT8951 controller for e-Paper displays and shows an image on the display. @@ -77,8 +77,8 @@ public class EnumerateDevices { ## Prerequisite -- Java 22 available at [jdk.java.net](https://jdk.java.net/21/), [Azul](https://www.azul.com/downloads/?package=jdk), [Adoptium](https://adoptium.net/temurin/releases/) or with your favorite package manager. -- Windows (x86 64-bit), macOS (x86 64-bit, ARM 64-bit) or Linux 64 bit (x86 64-bit, ARM 64-bit) +- Java 22 or higher, available at [jdk.java.net](https://jdk.java.net/), [Azul](https://www.azul.com/downloads/?package=jdk), [Adoptium](https://adoptium.net/temurin/releases/) or with your favorite package manager. +- Windows (x86 64-bit), macOS (x86 64-bit, ARM 64-bit) or Linux 64 bit (x86 64-bit, ARM 64-bit). @@ -87,14 +87,14 @@ public class EnumerateDevices { ### macOS -No special considerations apply. Using this library, a Java application can connect to any USB device and claim any interfaces that isn't claimed by an operating system driver or another application. Standard operation system drivers can be unloaded if the application is run with root privileges. It runs both on Macs with Apple Silicon and Intel processors. +No special considerations apply. Using this library, a Java application can connect to any USB device and claim any interface that isn't claimed by an operating system driver or another application. Standard operation system drivers can be unloaded if the application is run with *root* privileges. It runs both on Macs with Apple Silicon and Intel processors. ### Linux -*libudev* is used to discover and monitor USB devices. It is closely tied to *systemd*. So the library only runs on Linux distributions with *systemd* and the related libraries. The majority of Linux distributions suitable for desktop computing (as opposed to distributions optimized for containers) fulfill this requirement. It runs on both Intel and ARM64 processors. +*libudev* is used to discover and monitor USB devices. It is closely tied to *systemd*. So the library runs on Linux distributions with *systemd* and the related libraries. The majority of Linux distributions suitable for desktop computing (as opposed to distributions optimized for containers) fulfill this requirement. It runs on both Intel and ARM64 processors. -Similar to macOS, a Java application can connect to any USB device and claim any interfaces that isn't claimed by an operating system driver or another application. Standard operation system drivers can be unloaded (without the need for root privileges). +Similar to macOS, a Java application can connect to any USB device and claim any interface that isn't claimed by an operating system driver or another application. Standard operation system drivers can be unloaded (without the need for root privileges). Most Linux distributions set up user accounts without permissions to access USB devices. The *udev* system daemon is responsible for assigning permissions to USB devices. It can be configured to assign specific permissions or ownership: @@ -111,13 +111,13 @@ Without the *udev* rule, it is still possible to enumerate and query all USB dev ### Windows -The Windows driver model is rather rigid. It's not possible to open any USB device unless it uses the *WinUSB* driver. This even applies to devices with no installed driver. Enumerating and querying USB devices is possible independent of the driver. +The Windows driver model is rather rigid. It's not possible to open a USB device unless it uses the *WinUSB* driver. This even applies to devices with no installed driver. Enumerating and querying USB devices is possible independent of the driver. USB devices can implement special control requests to instruct Windows to automatically install the WinUSB driver (search for *WCID* or *Microsoft OS Compatibility Descriptors*). The WinUSB driver can also be manually installed or replaced using a software called [Zadig](https://zadig.akeo.ie/). The test devices implement the required control requests. So the driver is installed automatically. -Windows for ARM64 is not yet supported. A port is probably easy, provided you have hardware to test it. +Windows for ARM64 is not yet supported. It will once an official Java build for version 22 or higher is available. @@ -135,7 +135,7 @@ The *Foreign Function And Memory API* has been available as a preview feature in | Version | Main New Features | Compatibility | | - | - | - | -| 1.0.x | Release for final Java API | JDK 22 | +| 1.x.x | Release for final Java API | JDK 22 and higher | | 0.7.x | New setter/getter names for improved Kotlin support; Kotlin examples | JDK 21 | | 0.6.x | Support for JDK 21; better handling of composite devices on Windows | JDK 21 | | 0.5.x | Support for JDK 20; high-throuput I/O streams | JDK 20 | diff --git a/examples/bulk_transfer/README.md b/examples/bulk_transfer/README.md index 4e03d79..8a86e90 100644 --- a/examples/bulk_transfer/README.md +++ b/examples/bulk_transfer/README.md @@ -11,9 +11,9 @@ This sample shows how to find a device, open it and transfer data from and to bu ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -39,7 +39,7 @@ $ mvn compile exec:exec [INFO] Scanning for projects... [INFO] [INFO] --------------< net.codecrete.usb.examples:bulk-transfer >-------------- -[INFO] Building bulk-transfer 1.0.0 +[INFO] Building bulk-transfer 1.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ bulk-transfer --- @@ -55,6 +55,6 @@ $ mvn compile exec:exec [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.228 s -[INFO] Finished at: 2024-02-18T16:23:29+01:00 +[INFO] Finished at: 2024-10-13T16:23:29+01:00 [INFO] ------------------------------------------------------------------------ ``` diff --git a/examples/bulk_transfer/pom.xml b/examples/bulk_transfer/pom.xml index a7f46a5..f822cd6 100644 --- a/examples/bulk_transfer/pom.xml +++ b/examples/bulk_transfer/pom.xml @@ -6,7 +6,7 @@ net.codecrete.usb.examples bulk-transfer - 1.0.0 + 1.1.0 bulk-transfer https://github.com/manuelbl/JavaDoesUSB/examples/bulk_transfer @@ -21,7 +21,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 diff --git a/examples/enumerate/README.md b/examples/enumerate/README.md index fcb2605..4c82874 100644 --- a/examples/enumerate/README.md +++ b/examples/enumerate/README.md @@ -10,9 +10,9 @@ This sample enumerates the connected USB devices and provides information about ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -38,7 +38,7 @@ $ mvn compile exec:exec [INFO] Scanning for projects... [INFO] [INFO] ----------------< net.codecrete.usb.examples:enumerate >---------------- -[INFO] Building enumerate 1.0.0 +[INFO] Building enumerate 1.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ enumerate --- diff --git a/examples/enumerate/pom.xml b/examples/enumerate/pom.xml index b4f4cf4..0da4fb2 100644 --- a/examples/enumerate/pom.xml +++ b/examples/enumerate/pom.xml @@ -6,7 +6,7 @@ net.codecrete.usb.examples enumerate - 1.0.0 + 1.1.0 enumerate https://github.com/manuelbl/JavaDoesUSB/examples/enumerate @@ -21,7 +21,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 org.tinylog diff --git a/examples/enumerate_kotlin/README.md b/examples/enumerate_kotlin/README.md index 57b4072..e5dd07a 100644 --- a/examples/enumerate_kotlin/README.md +++ b/examples/enumerate_kotlin/README.md @@ -10,9 +10,9 @@ This sample enumerates the connected USB devices and provides information about ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -40,7 +40,7 @@ $ mvn clean package ### Run the jar ```shell -$ java --enable-native-access=ALL-UNNAMED -jar target/enumerate-1.0.0-jar-with-dependencies.jar +$ java --enable-native-access=ALL-UNNAMED -jar target/enumerate-1.1.0-jar-with-dependencies.jar Device: VID: 0xcafe PID: 0xceaf diff --git a/examples/enumerate_kotlin/pom.xml b/examples/enumerate_kotlin/pom.xml index 5723406..19cc08e 100644 --- a/examples/enumerate_kotlin/pom.xml +++ b/examples/enumerate_kotlin/pom.xml @@ -4,7 +4,7 @@ net.codecrete.usb.examples enumerate - 1.0.0 + 1.1.0 jar enumerate @@ -64,7 +64,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 org.tinylog diff --git a/examples/epaper_display/README.md b/examples/epaper_display/README.md index 27789d5..7d29543 100644 --- a/examples/epaper_display/README.md +++ b/examples/epaper_display/README.md @@ -17,9 +17,9 @@ be temporarily detached.) ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -45,7 +45,7 @@ $ mvn compile exec:exec [INFO] Scanning for projects... [INFO] [INFO] -------------< net.codecrete.usb.examples:epaper-display >-------------- -[INFO] Building epaper-display 1.0.0 +[INFO] Building epaper-display 1.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ epaper-display --- @@ -60,7 +60,7 @@ Display size: 1200 x 825 [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.247 s -[INFO] Finished at: 2024-02-18T16:48:43+01:00 +[INFO] Finished at: 2024-10-13T16:48:43+01:00 [INFO] ------------------------------------------------------------------------ ``` @@ -79,6 +79,6 @@ $ sudo -i Password: $ cd /Users/me/Documents/JavaDoesUSB/examples/epaper_display $ export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-20.jdk/Contents/Home -$ $JAVA_HOME/bin/java --enable-native-access=ALL-UNNAMED -cp target/classes:/Users/me/.m2/repository/net/codecrete/usb/java-does-usb/1.0.0/java-does-usb-1.0.0.jar net.codecrete.usb.examples.EPaperDisplay +$ $JAVA_HOME/bin/java --enable-native-access=ALL-UNNAMED -cp target/classes:/Users/me/.m2/repository/net/codecrete/usb/java-does-usb/1.1.0/java-does-usb-1.1.0.jar net.codecrete.usb.examples.EPaperDisplay Display size: 1200 x 825 ``` diff --git a/examples/epaper_display/pom.xml b/examples/epaper_display/pom.xml index 98b8da4..70c5e81 100644 --- a/examples/epaper_display/pom.xml +++ b/examples/epaper_display/pom.xml @@ -6,7 +6,7 @@ net.codecrete.usb.examples epaper-display - 1.0.0 + 1.1.0 epaper-display https://github.com/manuelbl/JavaDoesUSB/examples/epaper_display @@ -21,7 +21,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 diff --git a/examples/monitor/README.md b/examples/monitor/README.md index dcd2f67..85e74d7 100644 --- a/examples/monitor/README.md +++ b/examples/monitor/README.md @@ -10,9 +10,9 @@ This sample program monitors USB devices as they are connected and disconnected. ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -39,7 +39,7 @@ $ mvn compile exec:exec [INFO] Scanning for projects... [INFO] [INFO] -----------------< net.codecrete.usb.examples:monitor >----------------- -[INFO] Building monitor 1.0.0 +[INFO] Building monitor 1.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ monitor --- @@ -59,6 +59,6 @@ Connected: VID: 0xcafe, PID: 0xceaf, manufacturer: JavaDoesUSB, product: Loop [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17.647 s -[INFO] Finished at: 2024-02-18T16:50:59+01:00 +[INFO] Finished at: 2024-10-13T16:50:59+01:00 [INFO] ----------------------------------------------------------------------- ``` diff --git a/examples/monitor/pom.xml b/examples/monitor/pom.xml index 99c09f6..28f0e92 100644 --- a/examples/monitor/pom.xml +++ b/examples/monitor/pom.xml @@ -6,7 +6,7 @@ net.codecrete.usb.examples monitor - 1.0.0 + 1.1.0 monitor https://github.com/manuelbl/JavaDoesUSB/examples/monitor @@ -21,7 +21,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 org.tinylog diff --git a/examples/monitor_kotlin/README.md b/examples/monitor_kotlin/README.md index 9941837..ebf7de7 100644 --- a/examples/monitor_kotlin/README.md +++ b/examples/monitor_kotlin/README.md @@ -10,9 +10,9 @@ This sample enumerates the connected USB devices and provides information about ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -40,7 +40,7 @@ $ mvn clean package ### Run the jar ```shell -$ java --enable-native-access=ALL-UNNAMED -jar target/monitor-1.0.0-jar-with-dependencies.jar +$ java --enable-native-access=ALL-UNNAMED -jar target/monitor-1.1.0-jar-with-dependencies.jar Present: VID: 0x1d6b, PID: 0x0002, manufacturer: Linux 6.5.0-18-generic xhci-hcd, product: xHCI Host Controller, serial: 0000:00:14.0, ID: /dev/bus/usb/001/001 Present: VID: 0xcafe, PID: 0xceaf, manufacturer: JavaDoesUSB, product: Loopback, serial: 35A737883336, ID: /dev/bus/usb/001/009 Monitoring... Press ENTER to quit. diff --git a/examples/monitor_kotlin/pom.xml b/examples/monitor_kotlin/pom.xml index c359f20..bc26258 100644 --- a/examples/monitor_kotlin/pom.xml +++ b/examples/monitor_kotlin/pom.xml @@ -4,7 +4,7 @@ net.codecrete.usb.examples monitor - 1.0.0 + 1.1.0 jar monitor @@ -64,7 +64,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 org.tinylog diff --git a/examples/stm_dfu/README.md b/examples/stm_dfu/README.md index 83b7e79..2575b16 100644 --- a/examples/stm_dfu/README.md +++ b/examples/stm_dfu/README.md @@ -12,9 +12,9 @@ Even though the DFU ## How to run -### Install Java 22 +### Install Java 22 or higher -Check that *Java 22* is installed: +Check that Java 22 or higher is installed: ```shell $ java -version @@ -58,7 +58,7 @@ Run the command below (adapting the file path depending on your specific board): ```shell $ mvn package -$ java --enable-native-access=ALL-UNNAMED -jar target/stm_dfu-1.0.0.jar ../../test-devices/loopback-stm32/bin/blackpill-f401cc.bin +$ java --enable-native-access=ALL-UNNAMED -jar target/stm_dfu-1.1.0.jar ../../test-devices/loopback-stm32/bin/blackpill-f401cc.bin DFU device found with serial 35A737883336. Target memory segment: Internal Flash Erasing page at 0x8000000 (size 0x4000) diff --git a/examples/stm_dfu/pom.xml b/examples/stm_dfu/pom.xml index 19d2f50..c2634cc 100644 --- a/examples/stm_dfu/pom.xml +++ b/examples/stm_dfu/pom.xml @@ -4,7 +4,7 @@ net.codecrete.usb.examples stm_dfu - 1.0.0 + 1.1.0 stm_dfu https://github.com/manuelbl/JavaDoesUSB/examples/stm_dfu @@ -19,7 +19,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 diff --git a/java-does-usb/pom.xml b/java-does-usb/pom.xml index 2d7a807..cbd3633 100644 --- a/java-does-usb/pom.xml +++ b/java-does-usb/pom.xml @@ -6,7 +6,7 @@ net.codecrete.usb java-does-usb - 1.0.0 + 1.1.0 22