Generic Pelion Device Management example for various Advantech modules.
This example is known to work great on the following platforms:
- WISE-1530 WiFi Module using DB-1505 carrier board and external SD card reader.
Example Functionality
This example showcases the following device functionality:
- On timer button increment, simulate Pelion LWM2M button resource change
Use this example with Mbed CLI
1. Import the application into your desktop:
mbed import https://os.mbed.com/teams/Advantech/code/pelion-example-common cd pelion-example-common
2. Download your developer certificate from pelion portal
3. Compile the program
mbed compile -t <toolchain> -m <TARGET_BOARD>
(supported toolchains : GCC_ARM / ARM / IAR)
4. Copy the binary file pelion-example-common.bin to your mbed device.
drivers/network/COMPONENT_WIFI_IDW04A1/SPWFSA01/spwfsa01_at_strings.h@0:43ff9e3bc244, 2019-03-12 (annotated)
- Committer:
- chuanga
- Date:
- Tue Mar 12 13:48:39 2019 +0800
- Revision:
- 0:43ff9e3bc244
copying sources from github repository
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chuanga | 0:43ff9e3bc244 | 1 | #ifndef SPWFSAXX_AT_STRINGS_H |
| chuanga | 0:43ff9e3bc244 | 2 | #define SPWFSAXX_AT_STRINGS_H |
| chuanga | 0:43ff9e3bc244 | 3 | |
| chuanga | 0:43ff9e3bc244 | 4 | #if defined(TARGET_FF_MORPHO) |
| chuanga | 0:43ff9e3bc244 | 5 | |
| chuanga | 0:43ff9e3bc244 | 6 | #if !defined(SPWFSAXX_WAKEUP_PIN) |
| chuanga | 0:43ff9e3bc244 | 7 | #define SPWFSAXX_WAKEUP_PIN PC_8 // A3 |
| chuanga | 0:43ff9e3bc244 | 8 | #endif // !defined(SPWFSAXX_WAKEUP_PIN) |
| chuanga | 0:43ff9e3bc244 | 9 | #if !defined(SPWFSAXX_RESET_PIN) |
| chuanga | 0:43ff9e3bc244 | 10 | #define SPWFSAXX_RESET_PIN PC_12 // D7 / NC |
| chuanga | 0:43ff9e3bc244 | 11 | #endif // !defined(SPWFSAXX_RESET_PIN) |
| chuanga | 0:43ff9e3bc244 | 12 | |
| chuanga | 0:43ff9e3bc244 | 13 | #else // !defined(TARGET_FF_MORPHO) |
| chuanga | 0:43ff9e3bc244 | 14 | |
| chuanga | 0:43ff9e3bc244 | 15 | #if !defined(SPWFSAXX_WAKEUP_PIN) |
| chuanga | 0:43ff9e3bc244 | 16 | #define SPWFSAXX_WAKEUP_PIN NC // A3 |
| chuanga | 0:43ff9e3bc244 | 17 | #endif // !defined(SPWFSAXX_WAKEUP_PIN) |
| chuanga | 0:43ff9e3bc244 | 18 | #if !defined(SPWFSAXX_RESET_PIN) |
| chuanga | 0:43ff9e3bc244 | 19 | #define SPWFSAXX_RESET_PIN NC // D7 / NC |
| chuanga | 0:43ff9e3bc244 | 20 | #endif // !defined(SPWFSAXX_RESET_PIN) |
| chuanga | 0:43ff9e3bc244 | 21 | |
| chuanga | 0:43ff9e3bc244 | 22 | #endif // !defined(TARGET_FF_MORPHO) |
| chuanga | 0:43ff9e3bc244 | 23 | |
| chuanga | 0:43ff9e3bc244 | 24 | #define SPWFXX_SEND_RECV_PKTSIZE (730) |
| chuanga | 0:43ff9e3bc244 | 25 | |
| chuanga | 0:43ff9e3bc244 | 26 | #define SPWFXX_OOB_ERROR "ERROR:" // "AT-S.ERROR:" |
| chuanga | 0:43ff9e3bc244 | 27 | |
| chuanga | 0:43ff9e3bc244 | 28 | #define SPWFXX_RECV_OK "OK\n" // "AT-S.OK\n" |
| chuanga | 0:43ff9e3bc244 | 29 | #define SPWFXX_RECV_WIFI_UP "+WIND:24:WiFi Up:%u.%u.%u.%u\n" // "+WIND:24:WiFi Up:%*u:%u.%u.%u.%u\n" |
| chuanga | 0:43ff9e3bc244 | 30 | #define SPWFXX_RECV_IP_ADDR "# ip_ipaddr = %u.%u.%u.%u\n" // "AT-S.Var:ip_ipaddr=%u.%u.%u.%u\n" |
| chuanga | 0:43ff9e3bc244 | 31 | #define SPWFXX_RECV_GATEWAY "# ip_gw = %u.%u.%u.%u\n" // "AT-S.Var:ip_gw=%u.%u.%u.%u\n" |
| chuanga | 0:43ff9e3bc244 | 32 | #define SPWFXX_RECV_NETMASK "# ip_netmask = %u.%u.%u.%u\n" // "AT-S.Var:ip_netmask=%u.%u.%u.%u\n" |
| chuanga | 0:43ff9e3bc244 | 33 | #define SPWFXX_RECV_RX_RSSI "# 0.rx_rssi = %d\n" // "AT-S.Var:0.rx_rssi=%d\n" |
| chuanga | 0:43ff9e3bc244 | 34 | #define SPWFXX_RECV_MAC_ADDR "# nv_wifi_macaddr = %x:%x:%x:%x:%x:%x\n" // "AT-S.Var:nv_wifi_macaddr=%x:%x:%x:%x:%x:%x\n" |
| chuanga | 0:43ff9e3bc244 | 35 | #define SPWFXX_RECV_DATALEN " DATALEN: %u\n" // "AT-S.Query:%u\n" |
| chuanga | 0:43ff9e3bc244 | 36 | #define SPWFXX_RECV_PENDING_DATA ":%d:%d\n" // "::%u:%*u:%u\n" |
| chuanga | 0:43ff9e3bc244 | 37 | #define SPWFXX_RECV_SOCKET_CLOSED ":%d\n" // ":%u:%*u\n" |
| chuanga | 0:43ff9e3bc244 | 38 | |
| chuanga | 0:43ff9e3bc244 | 39 | #define SPWFXX_SEND_FWCFG "AT&F" // "AT+S.FCFG" |
| chuanga | 0:43ff9e3bc244 | 40 | #define SPWFXX_SEND_DISABLE_LE "AT+S.SCFG=localecho1,0" // "AT+S.SCFG=console_echo,0" |
| chuanga | 0:43ff9e3bc244 | 41 | #define SPWFXX_SEND_DSPLY_CFGV "AT&V" // "AT+S.GCFG" |
| chuanga | 0:43ff9e3bc244 | 42 | #define SPWFXX_SEND_GET_CONS_STATE "AT+S.GCFG=console1_enabled" // "AT+S.GCFG=console_enabled" |
| chuanga | 0:43ff9e3bc244 | 43 | #define SPWFXX_SEND_GET_CONS_SPEED "AT+S.GCFG=console1_speed" // "AT+S.GCFG=console_speed" |
| chuanga | 0:43ff9e3bc244 | 44 | #define SPWFXX_SEND_GET_HWFC_STATE "AT+S.GCFG=console1_hwfc" // "AT+S.GCFG=console_hwfc" |
| chuanga | 0:43ff9e3bc244 | 45 | #define SPWFXX_SEND_GET_CONS_DELIM "AT+S.GCFG=console1_delimiter" // "AT+S.GCFG=console_delimiter" |
| chuanga | 0:43ff9e3bc244 | 46 | #define SPWFXX_SEND_GET_CONS_ERRS "AT+S.GCFG=console1_errs" // "AT+S.GCFG=console_errs" |
| chuanga | 0:43ff9e3bc244 | 47 | #define SPWFXX_SEND_DISABLE_FC "AT+S.SCFG=console1_hwfc,0" // "AT+S.SCFG=console_hwfc,0" |
| chuanga | 0:43ff9e3bc244 | 48 | #define SPWFXX_SEND_ENABLE_FC "AT+S.SCFG=console1_hwfc,1" // "AT+S.SCFG=console_hwfc,1" |
| chuanga | 0:43ff9e3bc244 | 49 | #define SPWFXX_SEND_SW_RESET "AT+CFUN=1" // "AT+S.RESET" |
| chuanga | 0:43ff9e3bc244 | 50 | #define SPWFXX_SEND_SAVE_SETTINGS "AT&W" // "AT+S.WCFG" |
| chuanga | 0:43ff9e3bc244 | 51 | #define SPWFXX_SEND_WIND_OFF_HIGH "AT+S.SCFG=wind_off_high," // "AT+S.SCFG=console_wind_off_high," |
| chuanga | 0:43ff9e3bc244 | 52 | #define SPWFXX_SEND_WIND_OFF_MEDIUM "AT+S.SCFG=wind_off_medium," // "AT+S.SCFG=console_wind_off_medium," |
| chuanga | 0:43ff9e3bc244 | 53 | #define SPWFXX_SEND_WIND_OFF_LOW "AT+S.SCFG=wind_off_low," // "AT+S.SCFG=console_wind_off_low," |
| chuanga | 0:43ff9e3bc244 | 54 | |
| chuanga | 0:43ff9e3bc244 | 55 | #define SPWFXX_WINDS_HIGH_ON "0x00000000" // "0x00100000" |
| chuanga | 0:43ff9e3bc244 | 56 | #define SPWFXX_WINDS_MEDIUM_ON "0x00000000" // "0x80000000" |
| chuanga | 0:43ff9e3bc244 | 57 | |
| chuanga | 0:43ff9e3bc244 | 58 | #endif // SPWFSAXX_AT_STRINGS_H |