Skip to content

crmulliner/fluxnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluxn0de

Fluxn0de is:

  • a tool to explore and prototype LoRa and LoRaWAN applications
  • designed to run on battery powered devices
  • designed to run on ESP32 based boards
  • running JavaScript application (Fluxn0de uses the Duktape runtime)
  • designed with web application in mind as the main interface (http server + websocket server implementation)
  • BLE service that (kind of) emulates a websocket connection
  • BLE battery level service

JavaScript API

  • Platform Control Wifi, BLE, LEDs, JavaScript runtime,...
  • LoRa LoRa modem API
  • Crypto Crypto API (tailored towards LoRaWAN)
  • FileSystem Access files on the flash filesystem

HTTP API

  • WebService HTTP API to interact with the webserver (if Wifi is enabled)

BLE

  • BLE Fluxn0de BLE services

JavaScript Libraries

  • Timer Timer library that provides basic timer functionality
  • LoRaWan Basic LoRaWAN library
  • Util Utility library

Boards

- Getting Started -

Ideally you have build ESP32 software before and are familiar with the ESP32 SDK and tools such as idf.py.

Config

Before you flash your Fluxn0de configure the wifi parameters in recovery.js and test.js. If you forget to do that you can always connect to the Wifi network that is automatically created by Fluxn0de. The recovery SSID is fluxn0de and the password is fluxn0de. Recovery is indicated by a blinking red LED. 192.168.4.1 is the default IP for Fluxn0de in Wifi AP mode.

Building & Flashing

Setup:

Build:

  • make

Flash (and connect serial console):

  • make flash

Connect serial console (and reboot):

  • make monitor

Examples

All examples use the HTTP API to control the Fluxn0de from a computer. Make sure to take a look. Check that you have curl installed (all examples rely on curl)

There are a number of examples applications that are installed by default. From easiest to hardest:

Advanced

The two JavaScript applications main.js and recovery.js have special meaning for Fluxn0de. main.js is always loaded on startup / reset of the JavaScript runtime. The idea behind this is that you can load a different application from main.js or overwrite main.js with your application to have it start on reset. recovery.js is a fallback for when an error crashes the current application. recovery.js will be executed and you will have a chance to use the HTTP API to fix your error without flashing. Recovery will enable wifi if it was not already enabled.

Only modify recovery.js if you really think you know what you are doing (otherwise you will be flashing).