You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: example/freertos/iot/lwm2m/lwm2m_client/main.c
+3-61Lines changed: 3 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -28,69 +28,10 @@
28
28
*
29
29
--------------------------------------------- */
30
30
31
-
/**
32
-
* \defgroup EMBARC_APP_FREERTOS_IOT_LWM2M_LWM2M_CLIENT embARC LwIP LwM2M Client Example
33
-
* \ingroup EMBARC_APPS_TOTAL
34
-
* \ingroup EMBARC_APPS_OS_FREERTOS
35
-
* \ingroup EMBARC_APPS_MID_LWIP
36
-
* \ingroup EMBARC_APPS_MID_LWM2M
37
-
* \ingroup EMBARC_APPS_MID_NTSHELL
38
-
* \ingroup EMBARC_APPS_MID_FATFS
39
-
* \brief embARC Example for LwM2M Client on LwIP and FreeRTOS
40
-
*
41
-
* \details
42
-
* ### Extra Required Tools
43
-
*
44
-
* ### Extra Required Peripherals
45
-
* * Digilent PMOD WIFI(MRF24WG0MA)
46
-
*
47
-
* ### Design Concept
48
-
* This example is designed to show how to use LwM2M client in FreeRTOS.
49
-
*
50
-
* ### Usage Manual
51
-
* The Pmod modules should be connected to \ref EMBARC_BOARD_CONNECTION "EMSK".
52
-
* This is an example running OMA LightweightM2M(LwM2M) client, provides core device management features(device, connectivity, etc). It provides a ntshell command called *lwm2m_client* to show this demo.
53
-
* - About LwM2M provided in embARC
54
-
* + LwM2M features supported by [eclipse wakaama project](https://projects.eclipse.org/projects/technology.wakaama)
55
-
* + We only support FreeRTOS+LwIP
56
-
* + LwM2M use UDP connections to exchange data
57
-
* - First, you need to provide a LwM2M Server, here we take [Eclipse Leshan server](https://github.com/eclipse/leshan) for example.
58
-
* + Eclipse provide a sandbox leshan server:http://leshan.eclipse.org/
59
-
* + You can download a standalone leshan server binary from leshan website, and java environment(version >= 1.7.0_75) is required to run this binary
60
-
* - When leshan server is running on your local PC(connected to the same wifi network which your board will connect), then download program to the board, and run *lwm2m_client* ntshell command.
61
-
* + If you local PC IP is 192.168.43.4, then you need to run command *lwm2m_client -s 192.168.43.4* to connect to local leshan server.
62
-
* + If connected to local leshan server, you will see the connected LwM2M client in http://127.0.0.1:8080/#/clients.
63
-
* + Click on the client, then you will see many objects which the connected client provided.
64
-
* + On this website, you can do many operations on this objects.
65
-
* + Here you can read onboard switch and button value, and control onboard led using Object 1024.
66
-
* * First read the Instance 0, then 4 resources will show. Resource 0 is button value, Resource 1 is switch value, Resource 2 is led control, Resource 3 is a float variable.
67
-
* * Read Instance 0/1 will return the value of this resources in DEC format, you can press buttons or pull on/up the switches to see value changes.
68
-
* * Write on Resource 2 in DEC format such as 34 will change the onboard led with value 34.
69
-
* * Write on Resource 3 with a float value such as 1.45, then the float value is changed, you can read back to check it.
70
-
*
71
-
* 
72
-
*
73
-
* ### Extra Comments
74
-
* - Sometimes the server may not respond to client, this may caused by the wifi connection is bad.
75
-
* - In the case above, you need to disconnect all the power of your board, reconnect PMOD WIFI module and wait for a while, then restart this application.
0 commit comments