Orange-OpenSource / its-client

This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility (connected and autonomous vehicles, road side units, vulnerable road users,...). Let's connect your device or application to our Intelligent Transport Systems (ITS) platform!
MIT License
7 stars 8 forks source link

java: add bootstrap #208

Closed mathieu1fb closed 6 days ago

mathieu1fb commented 1 week ago

Features;

Bootstrap has been added to the IoT3 Core SDK and can also be used by the IoT3 Mobility SDK.

Closes #187 and closes #189


How to test

  1. Clone the its-client project on your IDE.
  2. Ensure that you have Gradle to be able to build the java/iot3 modules (core, mobility and examples).
  3. Find the Iot3MobilityBootstrapExample class in the examples module, and set appropriate values for the following fields:
    private static final String EXAMPLE_UUID = "uuid";
    private static final String EXAMPLE_CONTEXT = "context";
    // Bootstrap parameters
    private static final String BOOTSTRAP_ID = "bootstrap_id";
    private static final String BOOTSTRAP_LOGIN = "boostrap_login";
    private static final String BOOTSTRAP_PASSWORD = "bootstrap_password";
    private static final BootstrapHelper.Role BOOTSTRAP_ROLE = BootstrapHelper.Role.EXTERNAL_APP;
    private static final String BOOTSTRAP_URI = "bootstrap.uri.com";
  4. Run Iot3MobilityBootstrapExample.

Expected results:

  1. On the console, you should see the following:
    Bootstrap success
    IoT3 ID: <id>
    LOGIN: <login>
    PASSWORD: <password>
    MQTT URI: <mqtt_uri>
    TELEMETRY URI: <open_telemetry_uri>
  2. On the console, you should then see that the MQTT connection has been established successfully and that mobility messages are being published and received periodically (CAM, CPM and DENM).
fredOG-2A1 commented 1 week ago

Was annoying by a ClassNotFoundException during the test of the IoT3CoreBootstrapExample class. Explanation: I choose to download the zip from the github branch. In Windows 10 I double clic on the zip then move the content to my directory. Best way is to unzip with an adequat program or to clone from the branch.

Test is OK. 'Bootstrap success' is seen. All needed variables are OK.

Subscriptions for DENM, CAM and CPM (nine tiles). The app sends messages. Mqtt Server receives those messages. The app receives those messages.