Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Hackster is hosting Impact Spotlights: Smart Home. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Smart Home. Stream on Thursday!
Naresh krish
Published

Push OTA Updates to your RAK Wireless Ameba Devices

This project aims to build a software app to deploy OTA updates to your RAK wireless AMEBA-IoT boards (Dash button, RAK473, Creator pro).

AdvancedFull instructions provided3 hours1,433
Push OTA Updates to your RAK Wireless Ameba Devices

Things used in this project

Hardware components

RAKwireless RAK Wireless DASH Button
×1
RAKwireless RAK Wireless RAK 473
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
AWS S3
Amazon Web Services AWS S3

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

RAK 473 schematics

Code

OTA CLoud update

Arduino
#include "WiFi.h"
#include "OTA_r.h"


char ssid[] = "ssid";     // your network SSID (name)
char pass[] = "password";  // your network password (use for WPA, or use as key for WEP)
char REMOTE_ADDR[]="192.168.1.101";
int  REMOTE_PORT = 80;
int status = WL_IDLE_STATUS;

void setup() {
  // put your setup code here, to run once:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }
  String fv = WiFi.firmwareVersion();
  if (fv != "1.1.0") {
    Serial.println("Please upgrade the firmware");
  }
  // attempt to connect to Wifi network:
  while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid,pass);
    // wait 10 seconds for connection:
    delay(1000);
  }
  int checksum = OTA.gatherOTAinfo(REMOTE_ADDR,"/check.txt", REMOTE_PORT);
  if( checksum != -1) Serial.println("info_ok");
  if(OTA.beginRemote(REMOTE_ADDR,"/ota.bin",REMOTE_PORT, checksum) != -1) Serial.println("OK");
  else Serial.println("FAIL");
}

void loop() {
  // put your main code here, to run repeatedly:

}

Dashuploader app

Ameba SDK

Credits

Naresh krish
22 projects • 119 followers
Maker, Hacker, Guitarist, Full time Android and iOS Dev.
Contact

Comments

Please log in or sign up to comment.