2.4. Run the demo (mono-sandbox) from sources¶
To run the mono-sandbox demo from sources, in the workspace:
Build the application:
In
Run > Run Configurations > MicroEJ Application
, run the launcher matching your module:- for the EXS82,
[EXS82] Mono Emb - Step 1) Build Demo Application
- for the PLS63,
[PLS63] Mono Emb - Step 1) Build Demo Application
=============== [ 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 '{Application sources directory}\cinterion-demo-application-monosandbox\com.cinterion.vee.demo.app.mono.Main\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'. Execution of script '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\scripts\{target}\build.bat' started... [...] Linking application 1 file(s) copied. Execution of script '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\scripts\{target}\build.bat' done. =============== [ Completed Successfully ] =============== SUCCESS
- for the EXS82,
Run the application:
In
Run > Run Configurations > MicroEJ Tool
, run the launcher[ALL] Mono Emb - Step 2) Deploy Demo Application
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\{target}\run.bat' with executable file '{Application sources}\cinterion-demo-application-monosandbox\com.cinterion.vee.demo.app.mono.Main\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 398kB (77%) Building application binary Input File: {Application Sources}\cinterion-demo-application-monosandbox\com.cinterion.vee.demo.app.mono.Main\application.out [32-bit size: 985344 (0xf0900)] Output Binary Format: bin\cinterion.bin Bit Width: 8, Bank: 1 Uploading and starting the application Sent 0.0 % Sent [...] 100 % Done ! Execution of script '{Platform Sources}\cinterion-threadx-bsp\projects\cinterion\scripts\{target}\run.bat' done. SUCCESS
The application will connect to the broker and monitor the temperature:
DAM main MicroEJ START [demo-app][gnss-helper] Stopping the GNSS engine [demo-app][net-helper] Setting normal mode [demo-app][net-helper] Unlocking the SIM [demo-app][net-helper] Attaching the network (May take a while) [demo-app][net-helper] Configuring PDP context [demo-app][net-helper] Activating PDP session [demo-app][mqtt-client] Connecting to broker: mqtt://broker.hivemq.com:1883 [demo-app][notification] [hello] Hello World! I am running on EXS82 [demo-app][temperature] Enabling the temperature monitoring [demo-app][temperature] Getting the temperature [demo-app][temperature] Temperature available [demo-app][notification] [temperature] 28°C
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.The module will send notifications on temperature updates:
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 application:
{Cinterion SDK}/tools> python app.py stop cinterion-app
{Cinterion SDK}/tools> python app.py start cinterion-app