Skip to content

Commit 39568be

Browse files
David CowdenDavid Cowden
authored andcommitted
Updating labels to be common with AWS IoT and Insight on Things app. Bumping version to 1.1.0. Updated Documentation.
1 parent 12fa201 commit 39568be

File tree

14 files changed

+416
-408
lines changed

14 files changed

+416
-408
lines changed

documents/images/merge-close.png

37.9 KB
Loading
21.7 KB
Loading

documents/iot-ethernet-firmware-compile-and-program.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ You will need the following Microchip development tools to program and develop w
1515
- Download the latest project for IoT Ethernet from here: [IoT Ethernet Project](https://github.com/MicrochipTech/aws-iot-firmware-pic32mz/releases/latest)
1616
- Download and install Microchip MPLAB<sup>&reg;</sup> Harmony Integrated Software Framework v1.07.01 for your OS from here: [Harmony](http://www.microchip.com/mplab/mplab-harmony)
1717
- Download and install Microchip MPLAB<sup>&reg;</sup> X IDE for your OS from here:
18-
[Microchip MPLAB<sup>&reg;</sup> X IDE](http://www.microchip.com/mplabx)
19-
- Download and install the latest XC32 compiler for your OS from here: [Microchip MPLAB<sup>&reg;</sup> XC32 Compiler](http://www.microchip.com/xc32)
18+
[Microchip MPLAB<sup>&reg;</sup> X IDE](http://www.microchip.com/mplabx) (3.26, 3.30 tested)
19+
- Download and install the latest XC32 compiler for your OS from here (Install both v1.40 and v1.40B - Part Patch): [Microchip MPLAB<sup>&reg;</sup> XC32 Compiler](http://www.microchip.com/xc32) (v1.40 with v1.40B part patch tested)
2020

2121
---
2222

2323
### Compiling and programming the IoT Ethernet Board
24+
Test platform is MAC OS X, these instructions may vary slightly on different OS.
2425

2526
#### Compiling the Firmware
2627
1. Extract the zip file downloaded from the git repository to a location of your choice
@@ -30,10 +31,13 @@ You will need the following Microchip development tools to program and develop w
3031
- Select the project __aws-iot-ethernet.X__
3132
- With your project opened, right click on the project __aws-iot-ethernet__ in the Projects tab and select __Set as Main Project__
3233
- Follow these directions to install the Microchip Harmony Configurator (MHC): [Steps to Install MHC](http://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB%20Harmony%20Configurator%20%28MHC%29%20and%20MPLAB%20Harmony%20Graphics%20Composer%20%28v1.07.01%29.pdf)
33-
- Open the MHC; The MHC will prompt asking to choose a Harmony framework to use, select "Yes" and select the location of your v1.07.01 Harmony install and click "OK"
34+
- Open the MHC by clicking __Tools -> Embedded -> MPLAB Harmony Configurator__
35+
- The MHC will prompt asking to choose a Harmony framework to use, select "Yes" and select the location of your v1.07.01 Harmony install and click "OK"
3436
- The MHC will then ask if you want to open the configuration file __IoT-Ethernet.mhc__ for the __aws-iot-ethernet__ project, select "Open" to proceed.
3537
- With the new Harmony framework selected for your project, you will need to regenerate code by clicking the generate code button. ![](images/generateCode.png)
36-
- The MHC merge tool will show differences between code sets. Ignore the differences and hit "Close" for each file
38+
- A settings window will pop up, check only the box "Create a backup...": ![](images/mhc-generate-code-settings.png)
39+
- The MHC merge tool will show differences between code sets. Ignore the differences and hit "Close" for each file ![](images/merge-close.png)
40+
- We can now try compiling and programming the code.
3741

3842
#### Programing the IoT Ethernet Board
3943
1. Connect the PICKit&trade; 3 to your computer using the provided USB cable.
@@ -50,3 +54,6 @@ If you are having trouble, check to make sure that each of the issues bellow are
5054

5155
#### Project won't compile due to missing files
5256
- Often times a project won't compile if you are on a Windows machine due to a limitation in the path length. Windows OS has a max path length of 260 characters, so file paths are sometimes truncated when attempting to compile which leads to files not being found by the compiler. Try putting the project in the topmost directory, usually "C:/". For more information please see [MSDN article from Microsoft](https://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath).
57+
58+
#### Project won't compile due to errors such as missing ADCxxx registers
59+
- As of the v1.1.0 release the latest compiler for XC32 is v1.40. This compiler must be updated with the v1.40B which is the "Part Patch". This installer will update your XC32 v1.40 comipler with the required files to compile for the part on the IoT Ethernet Kit. Again, this can be downloaded at [Microchip MPLAB<sup>&reg;</sup> XC32 Compiler](http://www.microchip.com/xc32).

documents/iot-ethernet-out-of-box-guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,26 +174,26 @@ To setup and run the demo follow these instructions:
174174
- Connect your computer to the same network that the IoT Ethernet Kit is connected
175175
- Your board will register a Multicast DNS (mDNS) name with the local network that will allow you to access a configuration webpage.
176176
- Use a bonjour or multicast DNS service to find your board's IP address and enter the IP address into a web browser. The kit will have a service name such as `xxxxxx_IoT-E` where `xxxxxx` is the last six characters of the kit's MAC address.
177-
- Alternatively you can try entering `xxxxxx_iot-e.local` into a web browser to navigate to the webpage where `xxxxxx` is the last six bytes of the MAC address on the board
177+
- Alternatively you can try entering `xxxxxx_iot-e.local` into a web browser to navigate to the webpage where `xxxxxx` is the last six characters of the MAC address on the board
178178
- Once the web browser finds and displays the IoT Ethernet Kit configuration webpage
179-
- Enter your AWS IoT Endpoint that you received from the previous AWS IoT Service Setup section. The endpoint will have the form `<random-string>.iot.us-east-1.amazonaws.com`
180-
- Copy and paste your client certificate into the box labeled Client Public Cert.
179+
- Enter your AWS IoT Endpoint Address that you received from the previous AWS IoT Service Setup section. The endpoint will have the form `<random-string>.iot.us-east-1.amazonaws.com`
180+
- Copy and paste your AWS Certificate into the box labeled AWS Certificate.
181181
- The cert should look like
182182
183183
```
184184
-----BEGIN CERTIFICATE-----
185185
<cert data>
186186
-----END CERTIFICATE-----
187187
```
188-
- Copy and paste your private key into the box labeled Client Private Key.
188+
- Copy and paste your AWS Certificate Private Key into the box labeled AWS Certificate Private Key.
189189
- The key should look like
190190
191191
```
192192
-----BEGIN RSA PRIVATE KEY----
193193
<key data>
194194
-----END RSA PRIVATE KEY-----
195195
```
196-
- Click the __Join__ button and a _Connecting to server_ page will appear showing the endpoint that the IoT Ethernet board will connect to along with the full UUID
196+
- Click the __Join__ button and a _Connecting to server_ page will appear showing the endpoint that the IoT Ethernet board will connect to along with the AWS Thing Name (MAC Address).
197197
> NOTE: The information you enter above will be sent in the clear and is not secured as if you where using https; this is an option that you can add to your code later
198198
- You will see a LEDs D1-D6 light up while the board gets initial data from the server.
199199
- If not, please see the [Status and Error Code Table](Status and Error Code Table) table below for more information
@@ -223,7 +223,7 @@ If you are having trouble connecting with the starter kit, check to make sure th
223223
- Check that your access point is not blocking MAC addresses.
224224
225225
#### DNS Resolved Failed
226-
- Check that the AWS Endpoint you configured your starter kit with is correct.
226+
- Check that the AWS IoT Endpoint Address you configured your starter kit with is correct.
227227
- Check that you have a valid internet connection on your network
228228
229229
#### Status and Error Code Table

software/aws-iot-ethernet/firmware/aws-iot-ethernet.X/nbproject/configurations.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@
649649
<property key="enable-unroll-loops" value="false"/>
650650
<property key="exclude-floating-point" value="false"/>
651651
<property key="extra-include-directories"
652-
value="../src;../src/IoT-Ethernet;../src/system_config/IoT-Ethernet/framework;../src/wolfmqttsdk/;../../../microchip/harmony/v1_07_01_SUBSET;../src/system_config/IoT-Ethernet;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/framework;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/include;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/tcpip/wolfssl"/>
652+
value="../src;../src/IoT-Ethernet;../src/system_config/IoT-Ethernet/framework;../src/wolfmqttsdk/;../../../microchip/harmony/v1_07_01_SUBSET;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/framework;../src/system_config/IoT-Ethernet;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/include;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/tcpip/wolfssl"/>
653653
<property key="generate-16-bit-code" value="false"/>
654654
<property key="generate-micro-compressed-code" value="false"/>
655655
<property key="isolate-each-function" value="true"/>
@@ -669,7 +669,7 @@
669669
<property key="additional-options-chop-files" value="false"/>
670670
</C32-AR>
671671
<C32-AS>
672-
<property key="extra-include-directories-for-assembler" value=""/>
672+
<property key="extra-include-directories-for-assembler" value=";"/>
673673
<property key="extra-include-directories-for-preprocessor"
674674
value="../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/portable/MPLAB/PIC32MZ;../../../../../../../microchip/harmony/v1_07_01_ORIGINAL/third_party/rtos/FreeRTOS/Source/include;../src/system_config/IoT-Ethernet;"/>
675675
</C32-AS>

software/aws-iot-ethernet/firmware/src/app.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
8484
APP_DATA appData;
8585
extern APP1_DATA app1Data;
8686

87+
#define APP_HARDWARE "iot_ethernet_dm990004"
88+
#define APP_FIRMWARE_VERSION "1.1.0"
89+
8790
char topic_awsUpdate[128];
8891
char topic_awsUpdateDelta[128];
8992

@@ -107,7 +110,6 @@ static int mPacketIdLast;
107110
// WolfMQTT Callbacks for network connectivity
108111
int APP_tcpipConnect_cb(void *context, const char* host, word16 port, int timeout_ms)
109112
{
110-
111113
uint32_t timeout = 0;
112114
timeout = SYS_TMR_TickCountGet();
113115
SYS_CONSOLE_PRINT("App: DNS: Resolving host '%s'\r\n", &appData.host);
@@ -548,7 +550,7 @@ void APP_Tasks ( void )
548550
break;
549551
}
550552

551-
// If user presses switch 2 and 3 on powerup, the configuration will be erased
553+
// If user presses switch 2 and 3 on power up, the configuration will be erased
552554
case APP_NVM_ERASE_CONFIGURATION:
553555
{
554556
if((BSP_SWITCH_StateGet(BSP_SWITCH_3_CHANNEL, BSP_SWITCH_3_PORT) == BSP_SWITCH_STATE_ASSERTED)
@@ -558,9 +560,9 @@ void APP_Tasks ( void )
558560
APP_NVM_Write(NVM_HOST_ADDRESS_SPACE, appData.host);
559561
APP_NVM_Erase(NVM_CLIENT_CERTIFICATE_SPACE);
560562
APP_NVM_Erase(NVM_CLIENT_KEY_SPACE);
561-
SYS_CONSOLE_MESSAGE("************************************\r\n"
562-
"App: Erasing host and certificates!\r\n"
563-
"************************************\r\n");
563+
SYS_CONSOLE_MESSAGE("***************************************\r\n"
564+
"App: Erasing configuration!\r\n"
565+
"***************************************\r\n");
564566
appData.state = APP_TCPIP_WAIT_INIT;
565567
break;
566568
}
@@ -571,7 +573,7 @@ void APP_Tasks ( void )
571573
// Load the configuration stored in NVM on powerup
572574
case APP_NVM_LOAD_CONFIGURATION:
573575
{
574-
SYS_CONSOLE_MESSAGE("App: Loading host and certificates from NVM\r\n");
576+
SYS_CONSOLE_MESSAGE("App: Loading AWS IoT Endpoint Address and AWS Certificate/Certificate Private Key\r\n");
575577
APP_NVM_Read(NVM_HOST_ADDRESS_SPACE, appData.host, sizeof(appData.host));
576578
APP_NVM_Read(NVM_CLIENT_CERTIFICATE_SPACE, appData.clientCert, sizeof(appData.clientCert));
577579
APP_NVM_Read(NVM_CLIENT_KEY_SPACE, appData.clientKey, sizeof(appData.clientKey));
@@ -678,7 +680,7 @@ void APP_Tasks ( void )
678680
xQueueSendToFront(app1Data.lightShowQueue, &lightShowVal, 1);
679681
SYS_CONSOLE_PRINT("App: Board online. mDNS online. IP addr %d.%d.%d.%d online. All systems nominal.\r\n",
680682
ipAddr.v[0],ipAddr.v[1],ipAddr.v[2],ipAddr.v[3]);
681-
SYS_CONSOLE_PRINT("App: MAC Address '%s'\r\n", appData.uuid);
683+
SYS_CONSOLE_PRINT("App: AWS Thing Name (MAC Address) '%s'\r\n", appData.uuid);
682684
SYS_CONSOLE_MESSAGE("App: Waiting for configuration...\r\n");
683685
appData.state = APP_TCPIP_WAIT_CONFIGURATION;
684686
}
@@ -710,11 +712,11 @@ void APP_Tasks ( void )
710712
SYS_CONSOLE_MESSAGE("App: Writing configuration to NVM - failed\r\n");
711713
while(1);
712714
}
713-
SYS_CONSOLE_PRINT("App: Configured host '%s'\r\n", appData.host);
715+
SYS_CONSOLE_PRINT("App: Configured AWS IoT Endpoint Address '%s'\r\n", appData.host);
714716
}
715717
else if(validConfig)
716718
{
717-
SYS_CONSOLE_PRINT("App: Found configuration - host '%s'\r\n", appData.host);
719+
SYS_CONSOLE_PRINT("App: Found configuration - AWS IoT Endpoint Address '%s'\r\n", appData.host);
718720
}
719721
appData.lightShowVal = BSP_LED_INTIAL_CONNECT;
720722
xQueueSendToFront(app1Data.lightShowQueue, &appData.lightShowVal, 1);
@@ -851,8 +853,8 @@ void APP_Tasks ( void )
851853
publish.topic_name = topic_awsUpdate;
852854
publish.packet_id = mqttclient_get_packetid();
853855
char publishPayload [MAX_BUFFER_SIZE];
854-
sprintf(publishPayload, "{\"state\":{\"reported\":{\"led1\":\"%s\",\"led2\":\"%s\",\"led4\":\"%s\",\"led3\":\"%s\"}}}",
855-
appData.led1val ? "on" : "off", appData.led2val ? "on" : "off", appData.led3val ? "on" : "off", appData.led4val ? "on" : "off");
856+
sprintf(publishPayload, "{\"state\":{\"reported\":{\"led1\":\"%s\",\"led2\":\"%s\",\"led4\":\"%s\",\"led3\":\"%s\",\"hardware\":{\"type\":\"%s\",\"firmware_version\":\"%s\"}}}}",
857+
appData.led1val ? "on" : "off", appData.led2val ? "on" : "off", appData.led3val ? "on" : "off", appData.led4val ? "on" : "off", APP_HARDWARE, APP_FIRMWARE_VERSION);
856858
publish.buffer = (byte *)publishPayload;
857859
appData.led1val ? BSP_LEDOn(BSP_LED_1_CHANNEL, BSP_LED_1_PORT) : BSP_LEDOff(BSP_LED_1_CHANNEL, BSP_LED_1_PORT);
858860
appData.led2val ? BSP_LEDOn(BSP_LED_2_CHANNEL, BSP_LED_2_PORT) : BSP_LEDOff(BSP_LED_2_CHANNEL, BSP_LED_2_PORT);
Binary file not shown.

software/aws-iot-ethernet/firmware/src/configuration_webpage/css/mchp-min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

software/aws-iot-ethernet/firmware/src/configuration_webpage/css/mchp.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ fieldset textarea {
104104
padding-right: 10px;
105105
padding-top: 10px;
106106
padding-bottom: 5px;
107-
user-select: none;
108-
-webkit-user-select: none;
109-
-moz-user-select: none;
110107
font-size: 12pt;
111108
-webkit-transition: height .5s;
112109
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="footer">Copyright &copy; 2015 Microchip Technology, Inc. Ver 1.0.0</div>
1+
<div id="footer">Copyright &copy; 2016 Microchip Technology, Inc. Ver 1.1.0</div>
22
</div>
33
</body>
44
</html>

0 commit comments

Comments
 (0)