Skip to content

Commit 2808af2

Browse files
authored
Restructure README (#662)
1 parent 44702c9 commit 2808af2

File tree

3 files changed

+153
-316
lines changed

3 files changed

+153
-316
lines changed

README.md

Lines changed: 74 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,54 @@
11
# AWS IoT Device SDK for Java v2
22

3-
This document provides information about the AWS IoT device SDK for Java V2. This SDK is built on the [AWS Common Runtime](https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html)
3+
The AWS IoT Device SDK for Java v2 connects your Java applications and devices to the AWS IoT platform. It handles the complexities of secure communication, authentication, and device management so you can focus on your IoT solution. The SDK makes it easy to use AWS IoT services like Device Shadows, Jobs, Fleet Provisioning, and Commands.
44

5-
*__Jump To:__*
5+
**Supported Platforms**: Linux, Windows 11+, macOS 14+, Android API level 24+ (Android 7.0+)
66

7+
> **Note**: The SDK is known to work on older platform versions, but we only guarantee compatibility for the platforms listed above.
8+
9+
*__Topics:__*
10+
* [Features](#features)
711
* [Installation](#installation)
8-
* [Android](./documents/ANDROID.md)
12+
* [Minimum Requirements](#minimum-requirements)
13+
* [Consuming IoT Device SDK](#consuming-iot-device-sdk-from-maven-in-your-application)
14+
* [Getting Started](#getting-started)
915
* [Samples](samples)
10-
* [Mac-Only TLS Behavior](#mac-only-tls-behavior)
11-
* [Getting Help](#getting-help)
12-
* [FAQ](./documents/FAQ.md)
13-
* [API Docs](https://aws.github.io/aws-iot-device-sdk-java-v2/)
1416
* [MQTT5 User Guide](./documents/MQTT5_Userguide.md)
15-
* [Migration Guide from the AWS IoT SDK for Java v1](./documents/MIGRATION_GUIDE.md)
17+
* [Getting Help](#getting-help)
18+
* [Resources](#resources)
19+
20+
## Features
21+
22+
The primary purpose of the AWS IoT Device SDK for Java v2 is to simplify the process of connecting devices to AWS IoT Core and interacting with AWS IoT services on various platforms. The SDK provides:
23+
24+
* Integrated service clients for AWS IoT Core services
25+
* Secure device connections to AWS IoT Core using MQTT protocol including MQTT 5.0
26+
* Support for [multiple authentication methods and connection types](./documents/MQTT5_Userguide.md#how-to-setup-mqtt5-builder-based-on-desired-connection-method)
27+
* Android [support](./documents/ANDROID.md)
28+
29+
#### Supported AWS IoT Core services
30+
31+
* The [AWS IoT Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html) service manages device state information in the cloud.
32+
* The [AWS IoT Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html) service sends remote operations to connected devices.
33+
* The [AWS IoT fleet provisioning](https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html) service generates and delivers device certificates automatically.
34+
* The [AWS IoT Device Management commands](https://docs.aws.amazon.com/iot/latest/developerguide/iot-remote-command.html) service sends instructions from the cloud to connected devices.
1635

1736
## Installation
1837

38+
The recommended way to use the AWS IoT Device SDK for Java v2 in your project is to consume it from Maven Central.
39+
1940
### Minimum Requirements
2041

42+
To develop applications that use AWS IoT Device SDK for Java v2, you need:
2143
* Java 8+ ([Download and Install Java](https://www.java.com/en/download/help/download_options.html))
22-
* Java JDK 8+ ([Download and Install JDK](https://docs.oracle.com/en/java/javase/18/install/overview-jdk-installation.html#GUID-8677A77F-231A-40F7-98B9-1FD0B48C346A))
23-
* [Set JAVA_HOME](./documents/PREREQUISITES.md#set-java_home)
24-
25-
[Step-by-step instructions](./documents/PREREQUISITES.md)
26-
27-
### Requirements to build the AWS CRT locally
28-
* C++ 11 or higher
29-
* Clang 3.9+ or GCC 4.4+ or MSVC 2015+
30-
* CMake 3.1+
44+
* Java JDK 8+ ([Download and Install JDK](https://docs.oracle.com/en/java/javase/18/install/overview-jdk-installation.html))
45+
* A build tool such as [Maven](https://maven.apache.org/install.html)
3146

32-
[Step-by-step instructions](./documents/PREREQUISITES.md)
47+
See [detailed setup instructions](./documents/PREREQUISITES.md) for more information.
3348

3449
### Consuming IoT Device SDK from Maven in your application
3550

36-
Consuming this SDK via Maven is the preferred method of consuming it and using it within your application. To consume the Java V2 SDK in your application, add the following to your `pom.xml` dependencies:
51+
Add the following to your `pom.xml` dependencies:
3752

3853
``` xml
3954
<dependency>
@@ -46,57 +61,65 @@ Consuming this SDK via Maven is the preferred method of consuming it and using i
4661
Replace `1.27.4` in `<version>1.27.4</version>` with the latest release version for the SDK.
4762
Look up the latest SDK version here: https://github.com/aws/aws-iot-device-sdk-java-v2/releases
4863

49-
### Build IoT Device SDK from source
64+
### Building AWS IoT SDK from source
5065

51-
[Install Maven and Set PATH](https://maven.apache.org/install.html)
66+
See the [Development Guide](./documents/DEVELOPING.md) for detailed instructions on building from source and using local builds.
5267

53-
``` sh
54-
# Create a workspace directory to hold all the SDK files
55-
mkdir sdk-workspace
56-
cd sdk-workspace
57-
# Clone the repository
58-
git clone https://github.com/awslabs/aws-iot-device-sdk-java-v2.git
59-
cd aws-iot-device-sdk-java-v2
60-
# Compile and install
61-
mvn clean install
62-
```
68+
## Getting Started
69+
70+
To get started with the AWS IoT Device SDK for Java v2:
71+
72+
1. Add the SDK to your project - See the [Installation](#installation) section for Maven dependency details
73+
74+
2. Choose your connection method - The SDK supports multiple authentication methods including X.509 certificates, AWS credentials, and custom authentication. [MQTT5 User Guide connection section](./documents/MQTT5_Userguide.md#how-to-setup-mqtt5-builder-based-on-desired-connection-method) and [MQTT5 X509 sample](./samples/Mqtt/Mqtt5X509/README.md) provide more guidance
6375

64-
If you wish to use the latest CRT release, rather than the latest tested with the IoT SDK, you can run the following before running `mvn clean install`:
76+
3. Follow a complete example - Check out the [samples](samples) directory
6577

66-
~~~ sh
67-
# Update the version of the CRT being used
68-
mvn versions:use-latest-versions -Dincludes="software.amazon.awssdk.crt*"
69-
~~~
78+
4. Learn MQTT5 features - For advanced usage and configuration options, see the [MQTT5 User Guide](./documents/MQTT5_Userguide.md)
7079

7180
## Samples
7281

73-
[Samples README](samples)
82+
Check out the [samples](samples) directory for working code examples that demonstrate:
83+
- [Basic MQTT connection and messaging](./samples/README.md#mqtt5-client-samples)
84+
- [AWS IoT Device Shadow operations](./samples/ServiceClients/ShadowSandbox/README.md)
85+
- [AWS IoT Jobs](./samples/ServiceClients/JobsSandbox/README.md)
86+
- AWS IoT Fleet provisioning: [basic](./samples/ServiceClients/Provisioning/Basic/README.md) and [with CSR](./samples/ServiceClients/Provisioning/Csr/README.md)
87+
- [AWS IoT Commands](./samples/ServiceClients/CommandsSandbox/README.md)
88+
89+
The samples provide ready-to-run code with detailed setup instructions for each authentication method and use case.
90+
91+
## Getting Help
92+
93+
The best way to interact with our team is through GitHub.
94+
* Open [discussion](https://github.com/aws/aws-iot-device-sdk-java-v2/discussions): Share ideas and solutions with the SDK community
95+
* Search [issues](https://github.com/aws/aws-iot-device-sdk-java-v2/issues): Find created issues for answers based on a topic
96+
* Create an [issue](https://github.com/aws/aws-iot-device-sdk-java-v2/issues/new/choose): New feature request or file a bug
97+
98+
If you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
7499

75-
### Mac-Only TLS Behavior
100+
#### Mac-Only TLS Behavior
101+
102+
> [!NOTE]
103+
> This SDK does not support TLS 1.3 on macOS. Support for TLS 1.3 on macOS is planned for a future release.
76104
77105
Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level:
78106

79107
```
80-
static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided.
108+
static: certificate has an existing certificate-key pair that was previously imported into the Keychain.
109+
Using key from Keychain instead of the one provided.
81110
```
82111

83-
## Getting Help
112+
## Resources
84113

85-
The best way to interact with our team is through GitHub. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-java-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-java-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case.
86-
87-
Please make sure to check out our resources too before opening an issue:
114+
Check out our resources for additional guidance too before opening an issue:
88115

89116
* [FAQ](./documents/FAQ.md)
90-
* [IoT Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) ([source](https://github.com/awsdocs/aws-iot-docs))
117+
* [AWS IoT Core Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html)
91118
* [MQTT5 User Guide](./documents/MQTT5_Userguide.md)
92-
* Check for similar [Issues](https://github.com/aws/aws-iot-device-sdk-java-v2/issues)
119+
* [API Docs](https://aws.github.io/aws-iot-device-sdk-java-v2/)
93120
* [AWS IoT Core Documentation](https://docs.aws.amazon.com/iot/)
94-
* [Dev Blog](https://aws.amazon.com/blogs/?awsf.blog-master-iot=category-internet-of-things%23amazon-freertos%7Ccategory-internet-of-things%23aws-greengrass%7Ccategory-internet-of-things%23aws-iot-analytics%7Ccategory-internet-of-things%23aws-iot-button%7Ccategory-internet-of-things%23aws-iot-device-defender%7Ccategory-internet-of-things%23aws-iot-device-management%7Ccategory-internet-of-things%23aws-iot-platform)
95-
* Integration with AWS IoT Services such as
96-
[Device Shadow](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
97-
[Jobs](https://docs.aws.amazon.com/iot/latest/developerguide/iot-jobs.html)
98-
[Fleet Provisioning](https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html)
99-
is provided by code that been generated from a model of the service.
121+
* [Dev Blog](https://aws.amazon.com/blogs/iot/category/internet-of-things/)
122+
* [Migration Guide from the AWS IoT SDK for Java v1](./documents/MIGRATION_GUIDE.md)
100123
* [Contributions Guidelines](./documents/CONTRIBUTING.md)
101124
* [DEVELOPING](./documents/DEVELOPING.md)
102125

documents/DEVELOPING.md

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,64 @@
1-
# Developing Instructions
1+
# Development Guide
22

3-
Please first follow the instructions in the [main readme](../README.md)
3+
This guide covers building and developing with the AWS IoT Device SDK for Java v2.
44

5-
## Consuming Local IoT Device SDK from Maven in your application
6-
To build the SDK locally and test local changes do the following:
5+
**Prerequisites:** Follow the setup instructions in the [main README](../README.md) first.
76

8-
Modify [sdk/pom.xml](https://github.com/aws/aws-iot-device-sdk-java-v2/sdk/pom.xml)
9-
``` xml
7+
## Building from Source
8+
9+
### Basic Build
10+
11+
```bash
12+
# Create workspace directory
13+
mkdir sdk-workspace
14+
cd sdk-workspace
15+
16+
# Clone the repository
17+
git clone https://github.com/awslabs/aws-iot-device-sdk-java-v2.git
18+
cd aws-iot-device-sdk-java-v2
19+
20+
# Build and install
21+
mvn clean install
22+
```
23+
24+
### Using Latest CRT Version
25+
26+
To use the latest AWS CRT release instead of the tested version:
27+
28+
```bash
29+
# Update CRT version before building
30+
mvn versions:use-latest-versions -Dincludes="software.amazon.awssdk.crt*"
31+
mvn clean install
32+
```
33+
34+
## Using Local IoT SDK in Your Application
35+
36+
### Maven Dependency Configuration
37+
38+
To test local changes, update your application's `pom.xml`:
39+
40+
```xml
1041
<dependency>
1142
<groupId>software.amazon.awssdk.iotdevicesdk</groupId>
1243
<artifactId>aws-iot-device-sdk</artifactId>
1344
<version>1.0.0-SNAPSHOT</version>
1445
</dependency>
1546
```
16-
Note the version number matches the sdk version number in [aws-crt-java](https://github.com/awslabs/aws-crt-java/pom.xml)
17-
under
18-
```xml
19-
<version>1.0.0-SNAPSHOT</version>
20-
```
2147

22-
Please note: The default location for local builds with maven is
23-
Linux: /home/<User_Name>/.m2
24-
Windows: C:\Users\<User\_Name>\.m2
25-
Mac: /Users/<user_name>/.m2
48+
**Note:** Ensure the version matches the SDK version in [aws-crt-java pom.xml](https://github.com/awslabs/aws-crt-java/blob/main/pom.xml).
49+
50+
### Maven Local Repository
2651

27-
It is safe to delete the whole directory
28-
It is possible to pass this directory as an argument to the maven command
52+
**Default locations:**
53+
- **Linux:** `/home/<username>/.m2`
54+
- **Windows:** `C:\Users\<username>\.m2`
55+
- **macOS:** `/Users/<username>/.m2`
56+
57+
**Custom repository location:**
2958
```bash
30-
mvn -Dmaven.repo.local=/my/local/repository/path clean install
59+
mvn -Dmaven.repo.local=/path/to/custom/repo clean install
3160
```
32-
It is also possible to change it globally by modifying setting.xml in the maven
33-
configuration files
3461

35-
After that making your changes, follow the guide in the [main page](../README.md)
62+
**Global configuration:** Modify `settings.xml` in Maven configuration directory.
63+
64+
**Cleanup:** The `.m2` directory can be safely deleted to clear local builds.

0 commit comments

Comments
 (0)