Mbed Client sample for GR-LYCHEE where ZXing is incorporated.

Dependencies:   DisplayApp AsciiFont

Fork of GR-PEACH_mbed-os-client-ZXingSample by Renesas

Overview

This sample program shows how to use mbed Client together with ZXing which is an open-source, multi-format 1D/2D barcode image processing library. For more info on ZXing, please refer to https://github.com/zxing/zxing.

Required hardware

Application setup

  1. Select the connection type. For details, please refer to the following wiki:
    https://os.mbed.com/users/1050186/code/GR-LYCHEE_mbed-os-client-ZXingSample/wiki/Connection-type.
  2. Set the client credentials. For details, please refer to the following wiki:
    https://os.mbed.com/users/1050186/code/GR-LYCHEE_mbed-os-client-ZXingSample/wiki/Client-credentials.
  3. Change Wifi settings. For details, please refer to the following wiki:
    https://os.mbed.com/users/1050186/code/GR-LYCHEE_mbed-os-client-ZXingSample/wiki/Wifi-settings.

Building the example

To build this example:

  1. Import this example onto mbed Compiler.
  2. Configure the example in accordance with Application setup.
  3. Compile the example on mbed Compiler and download the resultant binary file.
  4. Plug the micro-USB cable into the OpenSDA port which lies on the next to the RESET button.
  5. Copy the binary previously downloaded to your PC to GR-LYCHEE to flash this example. When the copy is successfully completed, the board is ready to work.
  6. Press the RESET button on the board to run the example.
  7. For verification, please refer to the following wiki:
    https://os.mbed.com/users/1050186/code/GR-LYCHEE_mbed-os-client-ZXingSample/wiki/Monitoring-the-application.

Application resources

This example exposes four resources listed below:

  1. 3202/0/5700. Decode result of barcode data input from camera (GET).
  2. 3201/0/5850. Blink function, blinks LED when executed (POST).
  3. 3201/0/5853. Blink pattern, used by the blink function to determine how to blink. In the format of 1000:500:1000:500:1000:500 (PUT).
  4. 3201/0/5855. Blink color, used by the blink function. Any of green, yellow, orange and red is acceptable (PUT).
Committer:
1050186
Date:
Thu Dec 13 03:34:18 2018 +0000
Revision:
19:03e8d4d608f0
Parent:
18:0ab91e767950
Delete unnecessary codes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkato 2:6ec5c1c1d41c 1 {
dkato 2:6ec5c1c1d41c 2 "config": {
dkato 2:6ec5c1c1d41c 3 "network-interface":{
1050186 12:7a199eff6988 4 "help": "Options are ETHERNET, WIFI_IDW0XX1, WIFI_ESP8266, WIFI_BP3595, WIFI_ESP32, WIFI_ISM43362, WIFI_ODIN, WIFI_WIZFI310, MESH_LOWPAN_ND, MESH_THREAD, CELLULAR_ONBOARD, NO_CONNECT",
1050186 19:03e8d4d608f0 5 "value": "NO_CONNECT"
dkato 2:6ec5c1c1d41c 6 },
1050186 12:7a199eff6988 7 "mesh_radio_type": {
1050186 12:7a199eff6988 8 "help": "options are ATMEL, MCR20, SPIRIT1, EFR32",
1050186 12:7a199eff6988 9 "value": "ATMEL"
1050186 12:7a199eff6988 10 },
dkato 2:6ec5c1c1d41c 11 "wifi-ssid": {
dkato 2:6ec5c1c1d41c 12 "help": "WiFi SSID",
1050186 19:03e8d4d608f0 13 "value": "\"SSID\""
dkato 2:6ec5c1c1d41c 14 },
dkato 2:6ec5c1c1d41c 15 "wifi-password": {
dkato 2:6ec5c1c1d41c 16 "help": "WiFi Password",
1050186 19:03e8d4d608f0 17 "value": "\"Password\""
dkato 2:6ec5c1c1d41c 18 },
dkato 2:6ec5c1c1d41c 19 "wifi-security":{
dkato 2:6ec5c1c1d41c 20 "help": "Options are NSAPI_SECURITY_WEP, NSAPI_SECURITY_WPA, NSAPI_SECURITY_WPA2, NSAPI_SECURITY_WPA_WPA2",
dkato 2:6ec5c1c1d41c 21 "value": "NSAPI_SECURITY_WPA_WPA2"
dkato 2:6ec5c1c1d41c 22 },
dkato 2:6ec5c1c1d41c 23 "wifi-tx": {
dkato 2:6ec5c1c1d41c 24 "help": "TX pin for serial connection to external device",
dkato 2:6ec5c1c1d41c 25 "value": "D1"
dkato 2:6ec5c1c1d41c 26 },
dkato 2:6ec5c1c1d41c 27 "wifi-rx": {
dkato 2:6ec5c1c1d41c 28 "help": "RX pin for serial connection to external device",
dkato 2:6ec5c1c1d41c 29 "value": "D0"
1050186 6:4e43b6f8f772 30 },
1050186 6:4e43b6f8f772 31 "camera":{
1050186 6:4e43b6f8f772 32 "help": "0:disable 1:enable",
1050186 6:4e43b6f8f772 33 "value": "1"
1050186 6:4e43b6f8f772 34 },
1050186 6:4e43b6f8f772 35 "camera-type":{
1050186 6:4e43b6f8f772 36 "help": "Options are CAMERA_CVBS, CAMERA_MT9V111, CAMERA_OV7725",
1050186 6:4e43b6f8f772 37 "value": "CAMERA_OV7725"
1050186 6:4e43b6f8f772 38 },
1050186 6:4e43b6f8f772 39 "lcd":{
1050186 6:4e43b6f8f772 40 "help": "0:disable 1:enable",
1050186 6:4e43b6f8f772 41 "value": "0"
1050186 6:4e43b6f8f772 42 },
1050186 6:4e43b6f8f772 43 "lcd-type":{
1050186 6:4e43b6f8f772 44 "help": "Options are GR_PEACH_4_3INCH_SHIELD, GR_PEACH_7_1INCH_SHIELD, GR_PEACH_RSK_TFT, GR_PEACH_DISPLAY_SHIELD, GR_LYCHEE_LCD",
1050186 6:4e43b6f8f772 45 "value": "GR_LYCHEE_LCD"
dkato 2:6ec5c1c1d41c 46 }
dkato 2:6ec5c1c1d41c 47 },
dkato 2:6ec5c1c1d41c 48 "macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
dkato 2:6ec5c1c1d41c 49 "target_overrides": {
dkato 2:6ec5c1c1d41c 50 "*": {
1050186 12:7a199eff6988 51 "target.features_add": ["NANOSTACK", "COMMON_PAL"],
1050186 12:7a199eff6988 52 "nanostack.configuration": "lowpan_router",
dkato 2:6ec5c1c1d41c 53 "platform.stdio-baud-rate": 115200,
dkato 2:6ec5c1c1d41c 54 "platform.stdio-convert-newlines": true,
1050186 12:7a199eff6988 55 "mbed-mesh-api.6lowpan-nd-channel-page": 0,
1050186 12:7a199eff6988 56 "mbed-mesh-api.6lowpan-nd-channel": 12,
dkato 2:6ec5c1c1d41c 57 "mbed-trace.enable": 0
dkato 2:6ec5c1c1d41c 58 },
1050186 12:7a199eff6988 59 "DISCO_F413ZH": {
1050186 12:7a199eff6988 60 "network-interface": "WIFI_ISM43362"
1050186 12:7a199eff6988 61 },
1050186 12:7a199eff6988 62 "DISCO_L475VG_IOT01A": {
1050186 12:7a199eff6988 63 "network-interface": "WIFI_ISM43362"
1050186 12:7a199eff6988 64 },
dkato 2:6ec5c1c1d41c 65 "NUCLEO_F401RE": {
dkato 2:6ec5c1c1d41c 66 "wifi-tx": "PA_11",
dkato 2:6ec5c1c1d41c 67 "wifi-rx": "PA_12"
dkato 2:6ec5c1c1d41c 68 },
dkato 2:6ec5c1c1d41c 69 "NUCLEO_F411RE": {
dkato 2:6ec5c1c1d41c 70 "wifi-tx": "PA_11",
dkato 2:6ec5c1c1d41c 71 "wifi-rx": "PA_12"
dkato 2:6ec5c1c1d41c 72 },
dkato 2:6ec5c1c1d41c 73 "UBLOX_EVK_ODIN_W2": {
1050186 12:7a199eff6988 74 "target.network-default-interface-type": "ETHERNET"
1050186 12:7a199eff6988 75 },
1050186 12:7a199eff6988 76 "UBLOX_C030_U201": {
1050186 12:7a199eff6988 77 "lwip.ppp-enabled": true,
1050186 12:7a199eff6988 78 "ppp-cell-iface.apn-lookup": true
dkato 2:6ec5c1c1d41c 79 }
dkato 2:6ec5c1c1d41c 80 }
dkato 2:6ec5c1c1d41c 81 }