Back to All
Project

LTE for IoT Merch Cart

 

Skill Level Area of Focus Operating System Cloud Services/Platform Platform/Hardware
Intermediate Embedded, IoT, Sensors, Smart Cities Linux Amazon AWS IoT DragonBoard 410c, MDM920x LTE for IoT

This project is designed to use the LTE for IoT SDK and supported modems like the Qualcomm® MDM9206 modem to track a Merchandise Cart in an outdoor event venue, as well as track the cart’s inventory levels . A DragonBoard™ 410c from Arrow Electronics is also used and designed to interface with Thin force sensors that keep track of inventory that is flying off the shelf. Or maybe the inventory is not moving at all! Either way, the setup can give the event organizer insights and ability to re-deploy vendor carts as needed to optimize selling opportunities.

Objective

Some applications need the ability to deploy wide-area IoT cellular-based solutions that can reach into both indoor and outdoor locations, allowing reliable access to application services. Development platforms like the Quectel LTE OPEN EVB paired with the MDM9206 modems utilize tried-and-tested cellular deployments that deliver global coverage and comprehensive security. The main objective for this project is to use the Qualcomm MDM9206 modem on the Quectel EVB to track the merchandise cart and sync the inventory levels to an AWS IoT instance.

Materials Required / Parts List / Tools

Source Code / Source Examples / Application Executable

Build / Assembly Instructions

Download the source from GitHub

Download the source from the GitHub repository. The downloaded files have the following structure

/Inventory_management

This folder has the python scripts that need to be copied to the DragonBoard 410c.

/webapp

This folder has the web application that needs to be copied to the EC2 instance.

Setting up the EC2 instance in the AWS Console

Create EC2 instance and enable port 8655 in security group to run your application in EC2.

Install NodeJS :

$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash –
$ sudo apt-get install nodejs

To install Postgres :

$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib

Install NodeJS process Manager

$ npm install pm2 -g

Adding application to EC2 instance:

Copy **webapp** folder to your EC2 instance.

$ scp -i <pem file> -r webapp <EC2-instance-url>

Run the application

Run the server in EC2 instance with:

$ pm2 start

Setting up the DragonBoard 410c

Execute the following command to install pyserial

$> pip install pyserial

DragonBoard 410c download contains 2 files.

  • config.json
  • main.py

Please, change the following configuration


{
    "usb_setting" : "/dev/ttyUSB0",
    "sensor_count": "5",
    "url_connect" : "http://ip address of AWS Instance:8655/api/updateItem",
    "response_time": "60",
    "apn": "Network_Provider_APN",
    "username": " ",
    "password": " ",
    "auth_id":"0"
}

usb_setting – Mention the USB port where the Quectel board is connected.
sensor_count – Mention number of thin force sensor connected.
apn – Access Point Name of the carrier used
username – Username for the APN if any
password – Password for the APN if any
auth_id – Authentication for the APN if any and below are the accepted values.

  • 0 – NONE
  • 1 – PAP
  • 2 – CHAP
  • 3 – PAP or CHAP

Make hardware connections

  • We have created a sensor mat using the Thin Force sensors that can be placed on the shelf of a Merch Cart.
Sensor
Sensor
  • Place the sensor mat on the shelf of the Merch Cart
  • Connect the sensor wires to the DragonBoard 410c as seen below:
  • Pin

    Setup DragonBoard 410c connections:

    • Plug in USB 4-port hub to the DragonBoard 410c USB port at the far edge of the board
    • Connect to the Touch Screen HDMI cable and plug in the USB touch screen cable into the 4-port hub (the 7” display is powered by the DragonBoard 410c)
    • Plug in wireless keyboard USB dongle and power on the keyboard
    • Connect the USB extension hub to the DragonBoard 410c.
    • Connect the DragonBoard 410c to HDMI monitor. Connect the USB from the HDMI monitor to the USB extension hub.
    • Connect keyboard to the USB extension hub.

    Setup the Quectel EVB connections:

    • Connect the power cable to the Quectel EVB. Make sure the power switch is in OFF position.
    Quectel

    Connect the Serial to USB cable between “Com Main” on the Quectel EVB and USB port closest to the High Speed Expansion header on Quectel Board as seen below:

    Quectel

    Connect the USB end of the Serial cable to the DragonBoard 410c USB port closest to the High Speed expansion header, as seen below:

    Quectel

    Power on the DragonBoard 410c and wait until you see the Desktop.

    Power on the Quectel EVG board This is a two-step process,

    1. Flip the switch to ON position.
    2. Press the power button next to the Micro USB connector
    Steps

    You will see Green LED turn ON. This means that the Board is ON

    • POWER – Red (Constant)
    • STATUS – Green (Constant)
    • NET_STATUS – Blue (Blinking)

    Quectel

    On the DragonBoard 410c, open a terminal window: Left click on the icon in the lower left status bar, then System Tools -> UXTerm:

    DragonBoard

    Launch the demo with the command:

    sudo python main.py

    You will see the following logs in the terminal window.

    Output

    Launch Chrome Browser on any host PC and navigate to the following link: http://ip_address_of_AWS_instance:8655

    Usage Instructions

    • Place bottles on top of sensors to simulate smart shelf.
    Inventory
  • Remove a bottle from the shelf and notice the inventory drop by 1.
  • Drop
  • Remove a second bottle, the inventory drops by 1, and a Sales Opportunity appears.
  • Alert
  • Screen displays festival map with prompt to move a cart to Center Stage.
  • Re-deploy
    • Drag and drop one of the beer carts to center stage.
    • Success (or failure) notification appears.
    Alert
  • Tap on Dashboard button (bottom left) to see metrics from AWS IoT for inventory levels. Merch cart sales chart is static data.
  • Dashboard
  • Tap Restock (bottom right) to reset inventory level to 60 bottles
  • Remember to place beer bottles on sensor pads on sensor shelf mat in order to re-trigger when removed for next iteration
  • Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

    Project Authors
    GlobalEdge Software
    Steven PProject Manager
    PN Ramya
    Shamlee C
    Abhinesh S
    Rakesh S

    Sign up for the Developer Newsletter.

    Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.

    Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

    Stay connected

    Get the latest Qualcomm and industry information delivered to your inbox.

    Subscribe
    Manage your subscription

    © Qualcomm Technologies, Inc. and/or its affiliated companies.

    Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

    Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

    References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

    Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

    Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

    Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.