2.4. Run the demo (mono-sandbox) from sources

To run the mono-sandbox demo from sources, in the workspace:

  1. 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\exs_tx\build.bat' started...
      
      [...]
      
      Linking  application
              1 file(s) copied.
      Execution of script '{Platform sources directory}\cinterion-threadx-bsp\projects\cinterion\scripts\exs_tx\build.bat' done.
      =============== [ Completed Successfully ] ===============
      
      SUCCESS
      
  2. 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\exs_tx\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
      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 1.0 %Sent 2.0 %Sent 3.0 %Sent 4.0 %Sent 5.0 %Sent 6.0 %Sent 7.1 %Sent 8.1 %Sent 9.1 %Sent 10.1 %Sent 11.1 %Sent 12.1 %Sent 13.1 %Sent 14.1 %Sent 15.1 %Sent 16.1 %Sent 17.1 %Sent 18.1 %Sent 19.2 %Sent 20.2 %Sent 21.2 %Sent 22.2 %Sent 23.2 %Sent 24.2 %Sent 25.2 %Sent 26.2 %Sent 27.2 %Sent 28.2 %Sent 29.2 %Sent 30.2 %Sent 31.3 %Sent 32.3 %Sent 33.3 %Sent 34.3 %Sent 35.3 %Sent 36.3 %Sent 37.3 %Sent 38.3 %Sent 39.3 %Sent 40.3 %Sent 41.3 %Sent 42.3 %Sent 43.3 %Sent 44.4 %Sent 45.4 %Sent 46.4 %Sent 47.4 %Sent 48.4 %Sent 49.4 %Sent 50.4 %Sent 51.4 %Sent 52.4 %Sent 53.4 %Sent 54.4 %Sent 55.4 %Sent 56.5 %Sent 57.5 %Sent 58.5 %Sent 59.5 %Sent 60.5 %Sent 61.5 %Sent 62.5 %Sent 63.5 %Sent 64.5 %Sent 65.5 %Sent 66.5 %Sent 67.5 %Sent 68.6 %Sent 69.6 %Sent 70.6 %Sent 71.6 %Sent 72.6 %Sent 73.6 %Sent 74.6 %Sent 75.6 %Sent 76.6 %Sent 77.6 %Sent 78.6 %Sent 79.6 %Sent 80.6 %Sent 81.7 %Sent 82.7 %Sent 83.7 %Sent 84.7 %Sent 85.7 %Sent 86.7 %Sent 87.7 %Sent 88.7 %Sent 89.7 %Sent 90.7 %Sent 91.7 %Sent 92.7 %Sent 93.8 %Sent 94.8 %Sent 95.8 %Sent 96.8 %Sent 97.8 %Sent 98.8 %Sent 99.8 %Sent 100 %    Done !
      Execution of script '{Platform Sources}\cinterion-threadx-bsp\projects\cinterion\scripts\exs_tx\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:

      ../../_images/demo-embedded-celsius.jpg

Note

In evaluation mode, after the first internet connection, the application will stop. It is a known issue of the platform. If this happens, restart the application:

{Cinterion SDK}/tools> python app.py stop cinterion-app
{Cinterion SDK}/tools> python app.py start cinterion-app