Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jbobotek esp new sample location #1444

Merged
merged 13 commits into from
Feb 28, 2020
23 changes: 12 additions & 11 deletions build/arduino-esp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
git submodule update --init --recursive
. build_all/arduino/setup_arduino_libraries.sh
#copy example and platform.local.txts to their correct locations
echo $NEWTIN | sudo -S cp -r $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/iothub_ll_telemetry_sample $ARDUINO_LIBRARY_DIR/../
echo $NEWTIN | sudo -S cp $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/iothub_ll_telemetry_sample/esp8266/platform.local.txt ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/
echo $NEWTIN | sudo -S cp -r $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/. $ARDUINO_LIBRARY_DIR/../
echo $NEWTIN | sudo -S cp $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/esp8266/iothub_ll_telemetry_sample/platform.local.txt ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/
displayName: 'setup libraries'
env:
IOTHUB_CONNECTION_DEVICE_STRING: $(MXCHIP_NIGHTLY_DEVICE_STRING)
Expand All @@ -25,13 +25,10 @@ jobs:
cd $(Agent.WorkFolder)
echo "work folder"
ls
cd libraries/AzureIoTUtility/src
echo "util folder"
ls
cd $(Agent.WorkFolder)/iothub_ll_telemetry_sample
cd $(Agent.WorkFolder)/esp8266/iothub_ll_telemetry_sample
echo "telem folder"
ls
arduino --upload --board esp8266:esp8266:huzzah --pref sketchbook.path=../ --port $(ESP8266_PORT) --verbose-build iothub_ll_telemetry_sample.ino
arduino --upload --board esp8266:esp8266:huzzah --pref sketchbook.path=../../ --port $(ESP8266_PORT) --verbose-build iothub_ll_telemetry_sample.ino
# should fail job if build/upload fails
displayName: 'build and upload'
env:
Expand Down Expand Up @@ -68,8 +65,8 @@ jobs:
git submodule update --init --recursive
. build_all/arduino/setup_arduino_libraries.sh
#copy example and platform.local.txts to their correct locations
echo $NEWTIN | sudo -S cp -r $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/iothub_ll_telemetry_sample $ARDUINO_LIBRARY_DIR/../
echo $NEWTIN | sudo -S cp $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/iothub_ll_telemetry_sample/esp32/platform.local.txt ~/.arduino15/packages/esp32/hardware/esp32/1.0.2/
echo $NEWTIN | sudo -S cp -r $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/. $ARDUINO_LIBRARY_DIR/../
echo $NEWTIN | sudo -S cp $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/esp32/iothub_ll_telemetry_sample/platform.local.txt ~/.arduino15/packages/esp32/hardware/esp32/1.0.2/
displayName: 'setup libraries'
env:
IOTHUB_CONNECTION_DEVICE_STRING: $(MXCHIP_NIGHTLY_DEVICE_STRING)
Expand All @@ -81,9 +78,13 @@ jobs:
NEWTIN: $(NEWTIN)

- script: |
cd $(Agent.WorkFolder)
echo "work folder"
ls
cd $(Agent.WorkFolder)/esp8266/iothub_ll_telemetry_sample
echo "telem folder"
ls
cd $(Agent.WorkFolder)/iothub_ll_telemetry_sample/
arduino --upload --board esp32:esp32:esp32 --port $(ESP32_PORT) --pref sketchbook.path=../ --verbose-build iothub_ll_telemetry_sample.ino
arduino --upload --board esp32:esp32:esp32 --port $(ESP32_PORT) --pref sketchbook.path=../../ --verbose-build iothub_ll_telemetry_sample.ino
# should fail job if build/upload fails
displayName: 'build and upload'
env:
Expand Down
9 changes: 7 additions & 2 deletions build_all/arduino/setup_arduino_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
cd $STAGING_DIR
echo $NEWTIN | sudo -S rm -r azure-iot-pal-arduino
git clone https://github.com/Azure/azure-iot-pal-arduino.git
git clone -b update-sample-tree https://github.com/Azure/azure-iot-pal-arduino.git

cd azure-iot-pal-arduino
echo "copying sdk sources path to pal layer now"
Expand All @@ -15,7 +15,12 @@ python3 make_sdk.py -o $ARDUINO_LIBRARY_DIR

# input WIFI_SSID, WIFI_PWD, and IOTHUB_CONNECTION_DEVICE_STRING into iot_config.h

cd $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/iothub_ll_telemetry_sample/
cd $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/esp8266/iothub_ll_telemetry_sample/
echo $NEWTIN | sudo -S sed -i 's/your-wifi-name/'$WIFI_SSID'/g' iot_configs.h
echo $NEWTIN | sudo -S sed -i 's/your-wifi-pwd/'$WIFI_PWD'/g' iot_configs.h
echo $NEWTIN | sudo -S sed -i 's@your-iothub-DEVICE-connection-string@'$IOTHUB_CONNECTION_DEVICE_STRING'@g' iot_configs.h

cd $ARDUINO_LIBRARY_DIR/AzureIoTHub/examples/esp32/iothub_ll_telemetry_sample/
echo $NEWTIN | sudo -S sed -i 's/your-wifi-name/'$WIFI_SSID'/g' iot_configs.h
echo $NEWTIN | sudo -S sed -i 's/your-wifi-pwd/'$WIFI_PWD'/g' iot_configs.h
echo $NEWTIN | sudo -S sed -i 's@your-iothub-DEVICE-connection-string@'$IOTHUB_CONNECTION_DEVICE_STRING'@g' iot_configs.h
2 changes: 1 addition & 1 deletion testtools/UART_interface/esp_arduino_uart_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class esp_uart_interface(uart_interface):
messages_sent = 5

def check_sample_errors(self, line):
if "Confirm Callback" in line:
if "Confirmation callback" in line:
self.message_callbacks += 1

# If there is a sudden disconnect, program should report line in input script reached, and close files.
Expand Down