IoT Merchandise Cart on MDM9206

Skill LevelArea of FocusOperating SystemCloud Services/PlatformPlatform/Hardware
IntermediateEmbedded, IoT, Sensors, Smart CitiesThreadXAmazon AWS IoTMDM920x LTE for IoT

This project is designed to use the LTE for IoT SDK and supported modems such as the MDM9206 modem to track a Merchant Cart in an outdoor event venue. GPIOs on the board will interface with ThinForce 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 event organizers visibility and ability to re-deploy vendors if needed to optimize selling opportunities. This project is similar to the one posted here, but runs entirely on the MDM9206 and does not require the DragonBoard™ 410c from Arrow Electronics.

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 modem utilize tried-and-tested cellular deployments designed to deliver global coverage and comprehensive security. The main objective for this project is to use the MDM9206 modem on the Quectel EVB to track the merchant cart and sync the inventory levels to an AWS IoT cloud instance.

Download the source from GitHub

Download the zip file from GitHub and copy the files at the following location:
 https://github.com/globaledgesoft/merchant-cart-aws-iot

Setting up the Quectel EVB

Getting started

The board comes with a firmware pre-installed. The firmware version can be 2.0 or 3.0. This firmware invokes application entry point on boot. This entry point is quectel_task_entry in case of 2.0 firmware. Application developers can develop applications for BG96 using the SDK (2.0/3.0). The current version of this application only supports Quectel SDK 2.0.

Application development can be done on Windows 7 host machine. Applications can be cross-compiled for BG96 using ARM DS5 license.

Please download SDK from https://www.quectel.com/product/bg96.htm

Compiler installation

Please refer to docs\Quectel_BG96-QuecOpen_Application_Note_V1.0_Preliminary_20180502.pdf (section 3) for information regarding DS5 ARM compiler download and installation. Based on duration needed to complete your project you can choose to use 1-month free trial version. This setup is for working with Quectel SDK 2.0.

Driver installation

Please refer to the document docs\Quectel_BG96_Windows_USB_Driver_Installation_Guide_V1.0.pdf for information on downloading and installing USB drivers on Windows 7 machines.

Please carefully follow the instructions given in the document. You will need Quectel BG96 SOM to begin USB driver installation.

You should be able to see DM, AT, Modem ports in the 'Windows Device Manager' once USB drivers are successfully installed.

Building and flashing application program

Building and flashing applications is straight-forward. All the examples/applications are available under src\example folder

Building:

  1. Open command prompt.
  2. Navigate to folder with SDK 2.0 (Quectel_BG96_QuecOpen_SDK_Package_V2.1.0). You'll find the makefile build_oem_example.bat
  3. Replace build_oem_example.bat with build_oem_example.bat. Before application building, you must set a correct path for the compiler tools in the build_oem_example.bat:
    set TOOL_PATH_ROOT=C:\compile_tools
    set TOOLCHAIN_PATH=%TOOL_PATH_ROOT%\ARM_Compiler_5\bin
    set LM_LICENSE_FILE=%TOOL_PATH_ROOT%\license.dat
  4. run build_oem_example.bat sub_pub

This command will automatically build all the .c files in the directory src/example/sub_pub and generate a .bin file called example_sub_pub.bin. In addition, it also generates a file called oem_app_path.ini. These files are generated under main SDK folder Quectel_BG96_QuecOpen_SDK_Package_V2.1.0\bin.

Flashing:

  1. Connect the board to host machine
  2. Open QEFS_Explorer.exe under main SDK folder Quectel_BG96_QuecOpen_SDK_Package_V2.1.0\tools
  3. Choose the board displayed under File->Device and click on the 'search' button
  4. From among the directories listed click on /datatx folder
  5. Copy example_sub_pub.bin, oem_app_path.ini into this (/datatx) folder
  6. The /datatx/ folder should contain the following files
    • .bin -> binary file
    • .ini -> path of binay file
    • .cert.pem -> AWS IoT certificate file
    • .private.key -> AWS IoT Private key
    • demo3.cfg -> Configuration file

You can specify apn, username and password to connect to your network in .cfg file (in the format apn|username|password). If apn, username and password are not applicable you need not copy the .cfg file.

apn – Access Point Name of the carrier used
username – Username for the APN if any
password – Password for the APN if any

Make GPIO connections

  • We have created a sensor mat using the ThinForce sensors that can be placed on the shelf of a merch cart.
    Sensor mat for the IOT Project with the Quectel LTE OPEN EVB paired with Qualcomm MDM9206 modem
    Sensor mat for the IOT Project with the Quectel LTE OPEN EVB paired with Qualcomm MDM9206 modem
  • Place the sensor mat on the merch cart
  • Route the wiring through the hole in the merch cart
  • Connect the wires to the Quectel EVB board to following GPIO pins:
Sensor No.GPIO Pin NameGPIO Unit no.
Sensor_1GPIO_79J0202
Sensor_2GPIO_78J0202
Sensor_3GPIO_77J0202
Sensor_4GPIO_76J0202
Sensor_5GPIO2J0203

Note: Connect sensor mat GND to Quectel EVB board GND (J0202 GND) and VCC to VDD_1V8 (J0202 pin2)

Setup the Quectel EVB connections:

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

    Quectel LTE OPEN EVB switch in off position.
  • Connect the serial to USB cable to “Com Debug” to see Quectel EVB logs.
Power on the Quectel EVB board This is a two-step process,
  • Flip the switch to ON position.

1. Press the power button next to the Micro USB connector

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

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

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

  • Place bottles on top of sensors to simulate smart shelf.

  • Remove a bottle from the shelf and notice the inventory drop by 1.

  • Remove a second bottle, the inventory drops by 1, and a Sales Opportunity appears. 

  • Screen displays festival map with prompt to move a cart to Center Stage.

  • Drag and drop one of the beer carts to center stage.
  • Success (or failure) notification appears.
  • Tap on Dashboard button (bottom left) to see metrics from AWS IoT for inventory levels. Merch cart sales chart is static data.

  • 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
NameCompany
Shamlee C GlobalEdge Software
PN RamyaGlobalEdge Software
Abhinesh SGlobalEdge Software
Steven PGlobalEdge Software