Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

intel-iot-devkit/transportation-in-a-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoT Reference Implementation: How to Build a Transportation in a Box Solution

What it Does

This project simulates the following parts of a Transportation monitoring solution:

  • Door The driver is notified of a change in door position (open or closed).
  • Temperature The inside temperature of the truck’s cargo area is monitored and that temperature data recorded.
  • Alarm For temperatures above a specified threshold, the user interface plays an audible alarm. The alarm is cancelled by pressing the push button or when the temperature returns to normal (temperature below the specified threshold).
  • Cooling fan The fan cools the truck’s cargo area. The cooling fan is connected to the door and when the door is open, the fan shuts off (allowing the temperature to rise). Similarly, when the door is closed, the fan is on (in order to keep the cargo area of the truck below the specified temperature threshold).
  • Display Displays the status of the system, temperature and door status.

How it Works

This transporation application operates based on the following sensor data:

  • magnetic contact switch Open/closed status of the truck door
  • temperature sensor Temperature of the truck interior
  • Events: open/close door, change temperature, set temperature threshold, trigger/stop alarm

All data is forwarded to a web interface designed to monitor the status of the truck.

Set up the Dell Wyse 3290*

This section gives instructions for installing the Intel® IoT Gateway Software Suite on the Dell Wyse 3290*.

Note: If you are on Intel's network, you need to set up a proxy server.

  1. Create an account on the Intel® IoT Platform Marketplace if you do not already have one.

  2. Order the Intel® IoT Gateway Software Suite, and then follow the instructions you will receive by email to download the image file.

  3. Unzip the archive, and then write the .img file to a 4 GB USB drive:

  4. On Microsoft Windows*, you can use a tool like Win32 Disk Imager*: https://sourceforge.net/projects/win32diskimager

  5. On Linux*, use sudo dd if=GatewayOS.img of=/dev/ sdX bs=4M; sync, where sdX is your USB drive.

  6. Unplug the USB drive from your system, and then plug it into the Dell Wyse 3290* along with a monitor, keyboard, and power cable.

  7. Turn on the Dell Wyse 3290*, and then enter the BIOS by pressing F2 at boot time.

  8. Boot from the USB drive: a. On the Advanced tab, make sure Boot from USB is enabled. b. On the Boot tab, put the USB drive first in the order of the boot devices. c. Save the changes, and then reboot the system.

  9. Log in to the system with root:root.

  10. Install Wind River Linux* on local storage: ~# deploytool -d /dev/mmcblk0 --lvm 0 --reset-media -F

  11. Use the poweroff command to shut down your gateway, unplug the USB drive, and then turn your gateway back on to boot from the local storage device.

  12. Plug in an Ethernet cable, and then use the ifconfig eth0 command to find the IP address assigned to your gateway (assuming you have a proper network setup).

  13. Use the Intel® IoT Gateway Developer Hub to update the MRAA* and UPM* repositories to the latest versions from the official repository (https://01.org). You can achieve the same result by entering the following commands:

 ~# smart update
 ~# smart upgrade
 ~# smart install upm
  1. Connect the Arduino 101* (branded Genuino 101* outside the U.S.) board using the USB cable.
  2. Connect the Omega* RH-USB Temperature sensor to a USB port.

Connect other Components

This section covers making the connections from the Dell Wyse 3290* to the rest of the hardware components. The bill of materials for the prototype is summarized in Table 1.

Table 1. Transportation In-a-Box components.

Component Details Connection
Base System Dell Wyse 3290* Gateway
Arduino 101* Sensor Hub USB
USB Type A to Type B Cable For connecting Arduino/Genuino 101 board to Gateway
Sensors Omega* RH-USB Temperature sensor USB
Grove* - Relay Fan control D8
Grove* - LCD RGB Backlight Display stats I2C
Magnetic Switch Door sensor D3
Peltier Thermo-Electric Cooler Cooling fan
Round Push Button Acknowledge alarm D4

How to set up

To begin, clone the Path to Product repository with Git* on your computer as follows:

$ git clone https://github.com/intel-iot-devkit/reference-implementations.git

To download a .zip file, in your web browser go to and click the Download ZIP button at the lower right. Once the .zip file is downloaded, uncompress it, and then use the files in the directory for this example.

Adding the program to Intel® System Studio IoT Edition

** The following screenshots are from the Alarm clock sample, however the technique for adding the program is the same, just with different source files and jars.

Open Intel® System Studio IoT Edition, it will start by asking for a workspace directory. Choose one and then click OK.

In Intel® System Studio IoT Edition , select File -> new -> Intel(R) IoT Java* Project:

![](img/new project.png)

Name the project "Transportation Demo" and click Next.

![](img/project name.png)

You now need to connect to your Dell Wyse Gateway* from your computer to send code to it. Choose a name for the connection and enter IP address of the Dell Wyse Gateway in the "Target Name" field. You can also try to Search for it using the "Search Target" button. Click finish when you are done.

![](img/Target connection.png)

You have successfully created an empty project. You now need to copy the source files and the config file to the project. Drag all of the files from your git repository's "src" folder into the new project's src folder in Intel® System Studio IoT Edition. Make sure previously auto-generated main class is overridden.

The project uses the following external jars: commons-cli-1.3.1.jar, tomcat-embed-core.jar, tomcat-embed-logging-juli. These can be found in the Maven Central Repository. Create a "jars" folder in the project's root directory, and copy all needed jars in this folder. In Intel® System Studio IoT Edition, select all jar files in "jars" folder and right click -> Build path -> Add to build path

![](img/add to build path.png)

Now you need to add the UPM* jar files relevant to this specific sample. right click on the project's root -> Build path -> Configure build path. Java Build Path -> 'Libraries' tab -> click on "add external JARs..."

for this sample you will need the following jars:

  1. upm_grove.jar
  2. upm_i2clcd.jar
  3. upm_rhusb.jar
  4. mraa.jar

The jars can be found at the IOT Devkit installation root path\iss-iot-win\devkit-x86\sysroots\i586-poky-linux\usr\lib\java

![](img/add external jars to build path.png)

Afterwards, copy the www folder to the home directory on the target platform using scp or WinSCP*. Create a new Run configuration in Eclipse* for the project for the Java* Application. Set the Main Class as: com.intel.pathtoproduct.JavaONEDemoMulti in the Main tab. Then, in the arguments tab enter: -webapp <path/to/www/folder>.

Running without an IDE

Download the repo directly to the target plaform and run the start.sh script.

Automatic startup

To have the demo start automatically when the OS finishes loading use the included in-a-box.service file as follows:

  1. Copy the file to the /lib/systemd/system folder on the Dell* Wyse Gateway.
  2. Register the service by typing systemctl enable in-a-box.service.
  3. Reboot the gateway or start the service manually with systemctl start in-a-box.service.

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published