2.5. Run the demo (multi-sandbox) from sources [PLS63 ONLY]¶
To run the multi-sandbox demo from sources, in the workspace:
Build the kernel:
In
Run > Run Configurations > MicroEJ Application
, run the launcher matching your module:[PLS63] Multi Emb - Step 1) Build Demo Kernel
=============== [ Initialization Stage ] =============== Platform connected to BSP location '{Platform sources directory}/cinterion-threadx-bsp' using platform option 'root.dir' in 'bsp/bsp.properties'. [INFO ] Launching in Evaluation mode. Your UID is {Architecture UID}. =============== [ Launching SOAR (multi) ] =============== =============== [ Launching Link ] =============== =============== [ Deployment ] =============== MicroEJ files for the 3rd-party BSP project are generated to '{Kernel sources directory}\cinterion-demo-kernel\com.cinterion.vee.demo.kernel.DemoKernel\platform'. The MicroEJ application (microejapp.o) has been deployed to: '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\platform\lib'. The MicroEJ platform library files have been deployed to: '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\platform\lib'. The MicroEJ platform header files (*.h) have been deployed to: '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\platform\inc'. Execution of script '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\scripts\pls\build.bat' started... [...] Linking application 1 file(s) copied. Execution of script '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\scripts\pls\build.bat' done. =============== [ Completed Successfully ] =============== SUCCESS
Run the kernel:
In
Run > Run Configurations > MicroEJ Tool
, run the launcher[ALL] Multi Emb - Step 2) Deploy Demo Kernel
Platform connected to BSP location '{Platform sources}/cinterion-threadx-bsp' using platform option 'root.dir' in 'bsp/bsp.properties'. Execution of script {Platform sources}\cinterion-threadx-bsp\projects\cinterion\scripts\pls\run.bat' with executable file '{Kernel sources}\cinterion-demo-kernel\com.cinterion.vee.demo.kernel.DemoKernel\application.out' started... Load "{Platform sources}\cinterion-threadx-bsp\projects\cinterion\scripts\\set_local_env.bat" CINTERION_SDK={Cinterion SDK} PYTHON27_PATH=C:\Python27\python.exe CINTERION_APPNAME=cinterion-app CINTERION_MODEM_PORT={COM PORT} CINTERION_MODEM_BAUDRATE=115200 Checking application size Application footprint is 3926kB (23%) Building application binary Input File: {Kernel sources}\cinterion-demo-kernel\com.cinterion.vee.demo.kernel.DemoKernel\application.out [32-bit size: 3583232 (0x36ad00)]] Output Binary Format: bin\cinterion.bin Bit Width: 8, Bank: 1 Uploading and starting the application Sent 0.0 % Sent [...] %Sent 100 % Done ! Execution of script '{Platform sources}\cinterion-threadx-bsp\projects\cinterion\scripts\pls\run.bat' done. SUCCESS
The kernel will start and wait for an application:
DAM main MicroEJ START [kernel] Waiting for application file /app.fo
Build the application:
In
Run > Run Configurations > MicroEJ Application
, run the launcher matching your module:[PLS63] Multi Emb - Step 3) Build Demo Application V1
=============== [ Initialization Stage ] =============== =============== [ Launching SOAR ] =============== =============== [ Completed Successfully ] =============== SUCCESS
Run the application:
In
Run > Run Configurations > MicroEJ Tool
, configure the launcher[ALL] Multi Emb - Step 4) Deploy Demo Application V1
:- Set the path to the SDK.
- Set the serial port.
In
Run > Run Configurations > MicroEJ Tool
, run the launcher[ALL] Multi Emb - Step 4) Deploy Demo Application V1
============== [ UPLOAD ] ============== Sent 0.0 % Sent [...] %Sent 100 % SUCCESS
The application will be automatically installed, connect to the broker and monitor the temperature:
DAM main MicroEJ START [kernel] INFO: OTA SMS handling successfully started. [kernel] INFO: Waiting for application file /app.fo [kernel] INFO: Installing /app.fo [kernel] INFO: Installed cinteriondemo [kernel] INFO: Started cinteriondemo [kernel] INFO: Waiting for patch file /app.patch [demo-app][gnss-helper] INFO: Stopping the GNSS engine [demo-app][net-helper] INFO: Initializing network... [demo-app][net-helper] INFO: Checking functionality level... [demo-app][net-helper] INFO: Functionality level is: NORMAL [demo-app][net-helper] INFO: Checking SIM authentication... [demo-app][net-helper] INFO: SIM is ready. [demo-app][net-helper] INFO: Attaching the network... (May take a while) [demo-app][net-helper] INFO: Checking PDP configuration... [demo-app][net-helper] INFO: Found context [1] "orange" (IPV4) [demo-app][net-helper] INFO: Found context [2] "ims" (IPV4V6) [demo-app][net-helper] INFO: Activating PDP session... [demo-app][net-helper] INFO: PDP session activated. [demo-app][temperature] INFO: IMEI found: 359232710000692 [demo-app][mqtt-client] INFO: Connecting to broker: mqtt://broker.hivemq.com:1883 [demo-app][mqtt-client] INFO: MQTT subscribe topic: /cinterion/vee/demo/blink [demo-app][notification] INFO: Hello World! I am running on PLS63 [demo-app][temperature] INFO: Enabling the temperature monitoring [demo-app][temperature] INFO: Getting the temperature [demo-app][temperature] INFO: Temperature available: 22°C [demo-app][notification] INFO: {"value":22,"unit":"°C","sensor":"temperature","device":"359232710000692"}
Each time an MQTT message is sent, the
STATUS
LED of the LGA DevKit blinks.(optional) When button on
GPIO6
is pushed, the application sends an MQTT message to the broker.
Note
In evaluation mode, after the first internet connection, the application will stop. It is a known issue of the VEE Port. If this happens, restart the kernel.
{Cinterion SDK}/tools> python app.py stop cinterion-app {Cinterion SDK}/tools> python app.py start cinterion-app
The module will send notifications on temperature updates in
°C
:
Update the application:
In
cinterion-demo-application/src/main/java/com/cinterion/vee/demo/app/agent/TemperatureMonitor.java
, setUSE_FAHRENHEIT
totrue
(line21
).In
Run > Run Configurations > MicroEJ Application
, run the launcher matching your module:[PLS63] Multi Emb - Step 5) Build Demo Application V2
=============== [ Initialization Stage ] =============== =============== [ Launching SOAR ] =============== =============== [ Completed Successfully ] =============== SUCCESS
In
Run > External Tools > External Tools Configurations > Program
, run the External Tools launcher[ALL] Multi Emb - Step 6) Build Demo Patch (V1 to V2)
In
Run > Run Configurations > MicroEJ Tool
, configure the launcher[ALL] Multi Emb - Step 7) Deploy Demo Application Patch
:- Set the path to the SDK.
- Set the serial port.
In
Run > Run Configurations > MicroEJ Tool
, run the launcher[ALL] Multi Emb - Step 7) Deploy Demo Application Patch
============== [ UPLOAD ] ============== Sent 0.0 % Sent [...] Sent 100 % SUCCESS
The application will be automatically updated, reconnect to the broker and monitor the temperature again:
[kernel] INFO: Applying patch file /app.patch [kernel] INFO: Stopping feature cinteriondemo [kernel] INFO: Uninstalling feature cinteriondemo [kernel] INFO: Installing /app.fo [kernel] INFO: Installed cinteriondemo [kernel] INFO: Started cinteriondemo [kernel] INFO: Waiting for patch file /app.patch [demo-app][gnss-helper] INFO: Stopping the GNSS engine [demo-app][net-helper] INFO: Initializing network... [demo-app][net-helper] INFO: Checking functionality level... [demo-app][net-helper] INFO: Functionality level is: NORMAL [demo-app][net-helper] INFO: Checking SIM authentication... [demo-app][net-helper] INFO: SIM is ready. [demo-app][net-helper] INFO: Attaching the network... (May take a while) [demo-app][net-helper] INFO: Checking PDP configuration... [demo-app][net-helper] INFO: Found context [1] "orange" (IPV4) [demo-app][net-helper] INFO: Found context [2] "ims" (IPV4V6) [demo-app][net-helper] INFO: Activating PDP session... [demo-app][net-helper] INFO: PDP session activated. [demo-app][temperature] INFO: IMEI found: 359232710000692 [demo-app][mqtt-client] INFO: Connecting to broker: mqtt://broker.hivemq.com:1883 [demo-app][mqtt-client] INFO: MQTT subscribe topic: /cinterion/vee/demo/blink [demo-app][notification] INFO: Hello World! I am running on PLS63 [demo-app][temperature] INFO: Enabling the temperature monitoring [demo-app][temperature] INFO: Getting the temperature [demo-app][temperature] INFO: Temperature available: 73°F [demo-app][notification] INFO: {"value":73,"unit":"°F","sensor":"temperature","device":"359232710000692"}
The module will send notifications on temperature updates in
°F
: