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 Feb 15 04:29:52 2018 +0000
Revision:
6:4e43b6f8f772
Parent:
2:6ec5c1c1d41c
Child:
7:91dc4153efe5
First commit

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 6:4e43b6f8f772 4 "help": "Options are ETHERNET, WIFI_ESP8266, WIFI_BP3595, WIFI_ESP32, NO_CONNECT",
1050186 6:4e43b6f8f772 5 "value": "WIFI_ESP32"
dkato 2:6ec5c1c1d41c 6 },
dkato 2:6ec5c1c1d41c 7 "wifi-ssid": {
dkato 2:6ec5c1c1d41c 8 "help": "WiFi SSID",
dkato 2:6ec5c1c1d41c 9 "value": "\"SSID\""
dkato 2:6ec5c1c1d41c 10 },
dkato 2:6ec5c1c1d41c 11 "wifi-password": {
dkato 2:6ec5c1c1d41c 12 "help": "WiFi Password",
dkato 2:6ec5c1c1d41c 13 "value": "\"Password\""
dkato 2:6ec5c1c1d41c 14 },
dkato 2:6ec5c1c1d41c 15 "wifi-security":{
dkato 2:6ec5c1c1d41c 16 "help": "Options are NSAPI_SECURITY_WEP, NSAPI_SECURITY_WPA, NSAPI_SECURITY_WPA2, NSAPI_SECURITY_WPA_WPA2",
dkato 2:6ec5c1c1d41c 17 "value": "NSAPI_SECURITY_WPA_WPA2"
dkato 2:6ec5c1c1d41c 18 },
dkato 2:6ec5c1c1d41c 19 "wifi-tx": {
dkato 2:6ec5c1c1d41c 20 "help": "TX pin for serial connection to external device",
dkato 2:6ec5c1c1d41c 21 "value": "D1"
dkato 2:6ec5c1c1d41c 22 },
dkato 2:6ec5c1c1d41c 23 "wifi-rx": {
dkato 2:6ec5c1c1d41c 24 "help": "RX pin for serial connection to external device",
dkato 2:6ec5c1c1d41c 25 "value": "D0"
1050186 6:4e43b6f8f772 26 },
1050186 6:4e43b6f8f772 27 "camera":{
1050186 6:4e43b6f8f772 28 "help": "0:disable 1:enable",
1050186 6:4e43b6f8f772 29 "value": "1"
1050186 6:4e43b6f8f772 30 },
1050186 6:4e43b6f8f772 31 "camera-type":{
1050186 6:4e43b6f8f772 32 "help": "Options are CAMERA_CVBS, CAMERA_MT9V111, CAMERA_OV7725",
1050186 6:4e43b6f8f772 33 "value": "CAMERA_OV7725"
1050186 6:4e43b6f8f772 34 },
1050186 6:4e43b6f8f772 35 "lcd":{
1050186 6:4e43b6f8f772 36 "help": "0:disable 1:enable",
1050186 6:4e43b6f8f772 37 "value": "0"
1050186 6:4e43b6f8f772 38 },
1050186 6:4e43b6f8f772 39 "lcd-type":{
1050186 6:4e43b6f8f772 40 "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 41 "value": "GR_LYCHEE_LCD"
dkato 2:6ec5c1c1d41c 42 }
dkato 2:6ec5c1c1d41c 43 },
dkato 2:6ec5c1c1d41c 44 "macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
dkato 2:6ec5c1c1d41c 45 "target_overrides": {
dkato 2:6ec5c1c1d41c 46 "*": {
dkato 2:6ec5c1c1d41c 47 "target.features_add": ["COMMON_PAL"],
dkato 2:6ec5c1c1d41c 48 "platform.stdio-baud-rate": 115200,
dkato 2:6ec5c1c1d41c 49 "platform.stdio-convert-newlines": true,
dkato 2:6ec5c1c1d41c 50 "mbed-trace.enable": 0
dkato 2:6ec5c1c1d41c 51 },
dkato 2:6ec5c1c1d41c 52 "NUCLEO_F401RE": {
dkato 2:6ec5c1c1d41c 53 "wifi-tx": "PA_11",
dkato 2:6ec5c1c1d41c 54 "wifi-rx": "PA_12"
dkato 2:6ec5c1c1d41c 55 },
dkato 2:6ec5c1c1d41c 56 "NUCLEO_F411RE": {
dkato 2:6ec5c1c1d41c 57 "wifi-tx": "PA_11",
dkato 2:6ec5c1c1d41c 58 "wifi-rx": "PA_12"
dkato 2:6ec5c1c1d41c 59 },
dkato 2:6ec5c1c1d41c 60 "RZ_A1H": {
dkato 2:6ec5c1c1d41c 61 "target.macros_add": ["MBEDTLS_TEST_NULL_ENTROPY", "MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES"]
dkato 2:6ec5c1c1d41c 62 },
dkato 2:6ec5c1c1d41c 63 "UBLOX_EVK_ODIN_W2": {
dkato 2:6ec5c1c1d41c 64 "target.device_has_remove": ["EMAC"]
dkato 2:6ec5c1c1d41c 65 }
dkato 2:6ec5c1c1d41c 66 }
dkato 2:6ec5c1c1d41c 67 }
dkato 2:6ec5c1c1d41c 68
dkato 2:6ec5c1c1d41c 69