├── firmware ├── web │ ├── build │ │ ├── forbidden.html │ │ ├── jquery.js.gz │ │ ├── bootstrap.css.gz │ │ ├── wifi-sprites.png │ │ ├── settings.html │ │ ├── status.html │ │ ├── style.css │ │ └── networks.html │ └── dev │ │ ├── wifi-sprites.png │ │ ├── settings.html │ │ ├── style.css │ │ └── index.html ├── include │ ├── ota_update.h │ ├── web_config.h │ ├── uptime.h │ ├── long_millis.h │ ├── web_ipconfig.h │ ├── user_config.h │ ├── AppSettings.h │ └── PowerManager.h ├── prebuilt-binaries │ ├── rboot.bin │ ├── rom0.bin │ ├── spiff_rom.bin │ ├── flash.sh │ └── README.md ├── versions.md ├── update-binaries.sh ├── app │ ├── application.cpp │ ├── uptime.cpp │ ├── ota_update.cpp │ ├── PowerManager.cpp │ ├── app_settings.cpp │ ├── web_config.cpp │ └── web_ipconfig.cpp ├── Makefile ├── Makefile-user.mk └── rom0.ld ├── hardware ├── kicad-ESP8266 │ ├── ESP8266.3dshapes │ │ ├── .gitignore │ │ ├── ESP-07v2.wings │ │ ├── ESP-12.wings │ │ ├── ESP-07v2_4wings.stl │ │ ├── ESP-12_4wings.stl │ │ ├── ESP-13-wroom-02.wings │ │ ├── ESP-13-wroom-02_4wings.stl │ │ ├── ESP-13-wroom-02.scad │ │ ├── ESP-12.scad │ │ └── ESP-07v2.scad │ ├── .gitignore │ ├── ESP8266.dcm │ ├── LICENSE.md │ ├── ESP8266.pretty │ │ ├── ESP-01.kicad_mod │ │ ├── ESP-13-WROOM-02.kicad_mod │ │ ├── ESP-12E.kicad_mod │ │ ├── ESP-07v2.kicad_mod │ │ ├── ESP-12.kicad_mod │ │ └── ESP-201.kicad_mod │ ├── README.md │ └── ESP8266.lib ├── esp-power-control.kicad_pcb ├── esp-power-control.pdf ├── README.md ├── esp-power-control.pro └── esp-power-control.sch ├── .gitignore ├── img └── screenshot-0.png ├── LICENSE.md └── README.md /firmware/web/build/forbidden.html: -------------------------------------------------------------------------------- 1 | 403 Forbidden 2 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/.gitignore: -------------------------------------------------------------------------------- 1 | *.wings~ 2 | -------------------------------------------------------------------------------- /firmware/include/ota_update.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void ota_update(); 4 | -------------------------------------------------------------------------------- /firmware/include/web_config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void webserver_init(void); 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | firmware/out 2 | firmware/.ropeproject 3 | *.bak 4 | *-cache.lib 5 | 6 | -------------------------------------------------------------------------------- /hardware/esp-power-control.kicad_pcb: -------------------------------------------------------------------------------- 1 | (kicad_pcb (version 4) (host kicad "dummy file") ) 2 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *-bak 3 | *.bak 4 | *.bck 5 | github-cache/ 6 | -------------------------------------------------------------------------------- /img/screenshot-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/img/screenshot-0.png -------------------------------------------------------------------------------- /firmware/web/build/jquery.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/web/build/jquery.js.gz -------------------------------------------------------------------------------- /hardware/esp-power-control.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/esp-power-control.pdf -------------------------------------------------------------------------------- /firmware/web/dev/wifi-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/web/dev/wifi-sprites.png -------------------------------------------------------------------------------- /firmware/prebuilt-binaries/rboot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/prebuilt-binaries/rboot.bin -------------------------------------------------------------------------------- /firmware/prebuilt-binaries/rom0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/prebuilt-binaries/rom0.bin -------------------------------------------------------------------------------- /firmware/versions.md: -------------------------------------------------------------------------------- 1 | Sming version: 2 | https://github.com/festlv/Sming/tree/bugfix_tcpclient 3 | 4 | ESP SDK version: 1.5.2 5 | -------------------------------------------------------------------------------- /firmware/web/build/bootstrap.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/web/build/bootstrap.css.gz -------------------------------------------------------------------------------- /firmware/web/build/wifi-sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/web/build/wifi-sprites.png -------------------------------------------------------------------------------- /hardware/README.md: -------------------------------------------------------------------------------- 1 | Requirements 2 | ----------------- 3 | 4 | * ESP8266 based devboard with at least 4 free GPIOs (tested on ESP12). 5 | -------------------------------------------------------------------------------- /firmware/prebuilt-binaries/spiff_rom.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/firmware/prebuilt-binaries/spiff_rom.bin -------------------------------------------------------------------------------- /firmware/include/uptime.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | void uptime_init(); 6 | uint64_t uptime_seconds(); 7 | 8 | String uptime_string(); 9 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-07v2.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-07v2.wings -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-12.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-12.wings -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-07v2_4wings.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-07v2_4wings.stl -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-12_4wings.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-12_4wings.stl -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-13-wroom-02.wings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-13-wroom-02.wings -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-13-wroom-02_4wings.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/festlv/esp-power-control/HEAD/hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-13-wroom-02_4wings.stl -------------------------------------------------------------------------------- /firmware/update-binaries.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | cp $DIR/out/firmware/* $DIR/prebuilt-binaries/ && echo "Binaries in prebuilt-binaries updated" 6 | -------------------------------------------------------------------------------- /firmware/prebuilt-binaries/flash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | PORT=$1 5 | BAUD=115200 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 7 | 8 | if [[ -z "$PORT" ]] 9 | then 10 | echo "Usage: ./flash.sh " 11 | echo "Example: ./flash.sh /dev/ttyUSB0" 12 | exit 1 13 | fi 14 | 15 | esptool.py -p "$PORT" -b $BAUD write_flash -ff 40m -fm qio -fs 32m 0x00000 rboot.bin 0x02000 rom0.bin 0x100000 spiff_rom.bin 16 | -------------------------------------------------------------------------------- /firmware/include/long_millis.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | static uint64_t millis_offset = 0; 8 | static uint64_t micros_extra = 0; 9 | static uint32_t last_us = 0; 10 | 11 | 12 | uint64_t long_millis() { 13 | uint32_t us = micros(); 14 | if (us < last_us) { 15 | millis_offset += 4294967; 16 | micros_extra += 296; 17 | } 18 | last_us = us; 19 | return millis_offset + us / 1000 + ((us % 1000) + micros_extra) / 1000; 20 | } 21 | -------------------------------------------------------------------------------- /firmware/include/web_ipconfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | bool check_auth(HttpRequest &request, HttpResponse &response); 6 | 7 | void onFile(HttpRequest &request, HttpResponse &response); 8 | 9 | void onSettings(HttpRequest &request, HttpResponse &response); 10 | void onIpConfig(HttpRequest &request, HttpResponse &response); 11 | 12 | void onAjaxNetworkList(HttpRequest &request, HttpResponse &response); 13 | 14 | void onAjaxConnect(HttpRequest &request, HttpResponse &response); 15 | 16 | void networkScanCompleted(bool succeeded, BssList list); 17 | -------------------------------------------------------------------------------- /firmware/app/application.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "web_config.h" 5 | #include "AppSettings.h" 6 | 7 | Timer ten_hz_timer; 8 | 9 | void init() 10 | { 11 | //disable debug output while we're mounting spiffs 12 | //this has to be done because we can't access settings before mounting 13 | // system_set_os_print(0); 14 | // 15 | Serial.begin(115200); 16 | Serial.systemDebugOutput(true); 17 | system_set_os_print(1); 18 | 19 | 20 | spiffs_mount(); 21 | 22 | AppSettings.load(); 23 | 24 | webserver_init(); 25 | 26 | pinMode(RESTORE_PARAMETERS_PIN, INPUT_PULLUP); 27 | 28 | ten_hz_timer.initializeMs(100, app_settings_tick_10hz).start(); 29 | } 30 | -------------------------------------------------------------------------------- /firmware/Makefile: -------------------------------------------------------------------------------- 1 | ##################################################################### 2 | #### Please don't change this file. Use Makefile-user.mk instead #### 3 | ##################################################################### 4 | # Including user Makefile. 5 | # Should be used to set project-specific parameters 6 | include ./Makefile-user.mk 7 | 8 | # Important parameters check. 9 | # We need to make sure SMING_HOME and ESP_HOME variables are set. 10 | # You can use Makefile-user.mk in each project or use enviromental variables to set it globally. 11 | 12 | ifndef SMING_HOME 13 | $(error SMING_HOME is not set. Please configure it in Makefile-user.mk) 14 | endif 15 | ifndef ESP_HOME 16 | $(error ESP_HOME is not set. Please configure it in Makefile-user.mk) 17 | endif 18 | 19 | # Include main Sming Makefile 20 | ifeq ($(RBOOT_ENABLED), 1) 21 | include $(SMING_HOME)/Makefile-rboot.mk 22 | else 23 | include $(SMING_HOME)/Makefile-project.mk 24 | endif 25 | -------------------------------------------------------------------------------- /firmware/include/user_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_CONFIG_H__ 2 | #define __USER_CONFIG_H__ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | // UART config 9 | #define SERIAL_BAUD_RATE 115200 10 | 11 | // ESP SDK config 12 | #define LWIP_OPEN_SRC 13 | #define USE_US_TIMER 14 | 15 | // Default types 16 | #define __CORRECT_ISO_CPP_STDLIB_H_PROTO 17 | #include 18 | #include 19 | 20 | // Override c_types.h include and remove buggy espconn 21 | #define _C_TYPES_H_ 22 | #define _NO_ESPCON_ 23 | 24 | // Updated, compatible version of c_types.h 25 | // Just removed types declared in 26 | #include 27 | 28 | // System API declarations 29 | #include 30 | 31 | // C++ Support 32 | #include 33 | // Extended string conversion for compatibility 34 | #include 35 | // Network base API 36 | #include 37 | 38 | // Beta boards 39 | #define BOARD_ESP01 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2016 Reinis Veips 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | SOFTWARE. 21 | -------------------------------------------------------------------------------- /firmware/include/AppSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | #define APP_SETTINGS_FILE ".settings.conf" // leading point for security reasons :) 8 | 9 | #define DEFAULT_OTA_LINK FW_UPDATE_LINK 10 | 11 | //empty means autogenerated 12 | #define DEFAULT_AP_SSID "" 13 | 14 | //empty- open network 15 | #define DEFAULT_AP_PASSWORD "" 16 | 17 | #define RESTORE_PARAMETERS_PIN 0 18 | 19 | #define UART_LED_PIN 13 20 | #define NET_LED_PIN 12 21 | 22 | #ifndef DEFAULT_AUTH_PASSWORD 23 | #define DEFAULT_AUTH_PASSWORD "authpasskey" 24 | #endif 25 | 26 | class ApplicationSettingsStorage 27 | { 28 | 29 | public: 30 | 31 | String auth_password; 32 | 33 | String ssid; 34 | String password; 35 | 36 | String ap_password; 37 | String ap_ssid; 38 | 39 | bool dhcp = true; 40 | 41 | IPAddress ip; 42 | IPAddress netmask; 43 | IPAddress gateway; 44 | 45 | String ota_link; 46 | 47 | void restore(); 48 | 49 | void load(); 50 | 51 | void save(); 52 | 53 | bool exist(); 54 | }; 55 | 56 | extern ApplicationSettingsStorage AppSettings; 57 | 58 | void app_settings_tick_10hz(); 59 | -------------------------------------------------------------------------------- /firmware/app/uptime.cpp: -------------------------------------------------------------------------------- 1 | #include "user_config.h" 2 | #include 3 | 4 | Timer uptime_timer; 5 | 6 | static uint64_t uptime_counter = 0; 7 | 8 | static void uptime_callback() { 9 | uptime_counter++; 10 | } 11 | 12 | void uptime_init() { 13 | uptime_timer.initializeMs(1000, uptime_callback).start(); 14 | } 15 | 16 | uint64_t uptime_seconds() { 17 | return uptime_counter; 18 | } 19 | 20 | String uptime_string() { 21 | char buf[64]; 22 | 23 | uint32_t days = uptime_counter / (3600 * 24); 24 | uint32_t hours = (uptime_counter - days * 3600 * 24) / 3600; 25 | uint32_t minutes = ((uptime_counter - days * 3600 * 24) - hours * 3600) / 60; 26 | 27 | uint32_t seconds = uptime_counter - days * 3600 * 24 - hours * 3600 - minutes * 60; 28 | 29 | if (days > 0) 30 | sprintf(buf, "%dd %dh %dm %ds", days, hours, minutes, seconds); 31 | else if (hours > 0) 32 | sprintf(buf, "%dh %dm %ds",hours, minutes, seconds); 33 | else if (minutes > 0) 34 | sprintf(buf, "%dm %ds", minutes, seconds); 35 | else 36 | sprintf(buf, "%ds", seconds); 37 | 38 | return String(buf); 39 | } 40 | -------------------------------------------------------------------------------- /firmware/include/PowerManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #define POWER_OUT_PIN 14 6 | #define RESET_OUT_PIN 16 7 | 8 | #define POWER_IN_PIN 4 9 | #define ACT_IN_PIN 5 10 | 11 | 12 | class PowerManager 13 | { 14 | public: 15 | PowerManager(uint8_t _power_out_pin, uint8_t _reset_out_pin, 16 | uint8_t _power_in_pin, uint8_t _act_in_pin); 17 | 18 | //should be called at 100Hz, does the housekeeping 19 | void update(void); 20 | 21 | void power_on(void); 22 | 23 | void power_off(void); 24 | 25 | void reset(void); 26 | 27 | bool get_power_state(void) 28 | { 29 | return power_high; 30 | } 31 | 32 | //system activity in percent 33 | uint8_t get_activity(void) 34 | { 35 | return prev_act_high_events / 2; 36 | } 37 | 38 | private: 39 | uint8_t power_out_pin; 40 | uint8_t reset_out_pin; 41 | 42 | uint8_t power_in_pin; 43 | uint8_t act_in_pin; 44 | 45 | uint64_t cycle_counter; 46 | 47 | uint64_t clear_power_output; 48 | uint64_t clear_reset_output; 49 | 50 | uint16_t act_high_events; 51 | uint16_t prev_act_high_events; 52 | bool power_high; 53 | }; 54 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.dcm: -------------------------------------------------------------------------------- 1 | EESchema-DOCLIB Version 2.0 2 | # 3 | $CMP ESP-01v090 4 | D ESP8622 ESP-01 module, v090 5 | K MODULE ESP8266 ESP-8266 6 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 7 | $ENDCMP 8 | # 9 | $CMP ESP-07v2 10 | D ESP8266, ESP-07v2 module, 16 pin, 2mm, ceramic antenna 11 | K MODULE ESP8266 ESP-8266 12 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 13 | $ENDCMP 14 | # 15 | $CMP ESP-12 16 | D ESP8622 ESP-12 module, 16 pins, 2mm, PCB antenna 17 | K MODULE ESP8266 ESP-8266 18 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 19 | $ENDCMP 20 | # 21 | $CMP ESP-12E 22 | D ESP8622 ESP-12E module, 22 pins, 2mm, PCB antenna 23 | K MODULE ESP8266 ESP-8266 24 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 25 | $ENDCMP 26 | # 27 | $CMP ESP-13-WROOM-02 28 | D ESP8622 ESP-13-WROOM-02 module, 18 pins, 2mm, PCB antenna 29 | K MODULE ESP8266 ESP-8266 30 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 31 | $ENDCMP 32 | # 33 | $CMP ESP-201 34 | D ESP8622 ESP-201 module, 26 pins, 0.1 inch 35 | K MODULE ESP8266 ESP-8266 36 | F http://l0l.org.uk/2014/12/esp8266-modules-hardware-guide-gotta-catch-em-all/ 37 | $ENDCMP 38 | # 39 | #End Doc Library 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Wireless remote control for PC power 2 | ----------------------------------------- 3 | 4 | This project is based on ESP8266 and provides web interface controlling PC 5 | power supply. 6 | 7 | The hardware is connected to standard ATX power/reset buttons and 8 | power/activity LEDs in parallel (the existing functionality of switches and 9 | LEDs is retained). 10 | 11 | See `hardware/` for schematics and hardware connections. 12 | See `firmware/` for the firmware and web interface which runs on ESP8266. 13 | 14 | Pre-built binaries and flashing instructions are available in 15 | `firmware/prebuilt-binaries`. 16 | 17 | Web interface 18 | ----------------- 19 | 20 | Web interface can be accessed on both AP and station interfaces. Default IP 21 | address for AP mode is 192.168.4.1. 22 | 23 | Password is sent as GET parameter (yes, I know, that's not how it should be 24 | done): 25 | 26 | http://192.168.4.1/?auth=authpasskey 27 | 28 | ![Screenshot of web interface](img/screenshot-0.png?raw=true "Screenshot of web 29 | interface") 30 | 31 | Known limitations 32 | ------------------------- 33 | 34 | This project is in `works-for-me` stage of prototype. More likely than not, it 35 | will reset your computer in the least-convenient time. Consider yourself 36 | warned! 37 | 38 | * PC is reset when ESP is rebooted (including firmware update!) 39 | * OTA firmware update support is work-in-progress, 40 | * Authentication is really dumb (password provided by GET parameter). 41 | 42 | 43 | -------------------------------------------------------------------------------- /hardware/esp-power-control.pro: -------------------------------------------------------------------------------- 1 | update=Sun 17 Apr 2016 09:15:13 PM EEST 2 | version=1 3 | last_client=kicad 4 | [pcbnew] 5 | version=1 6 | LastNetListRead= 7 | UseCmpFile=1 8 | PadDrill=0.600000000000 9 | PadDrillOvalY=0.600000000000 10 | PadSizeH=1.500000000000 11 | PadSizeV=1.500000000000 12 | PcbTextSizeV=1.500000000000 13 | PcbTextSizeH=1.500000000000 14 | PcbTextThickness=0.300000000000 15 | ModuleTextSizeV=1.000000000000 16 | ModuleTextSizeH=1.000000000000 17 | ModuleTextSizeThickness=0.150000000000 18 | SolderMaskClearance=0.000000000000 19 | SolderMaskMinWidth=0.000000000000 20 | DrawSegmentWidth=0.200000000000 21 | BoardOutlineThickness=0.100000000000 22 | ModuleOutlineThickness=0.150000000000 23 | [cvpcb] 24 | version=1 25 | NetIExt=net 26 | [general] 27 | version=1 28 | [eeschema] 29 | version=1 30 | LibDir= 31 | [eeschema/libraries] 32 | LibName1=power 33 | LibName2=device 34 | LibName3=transistors 35 | LibName4=conn 36 | LibName5=linear 37 | LibName6=regul 38 | LibName7=74xx 39 | LibName8=cmos4000 40 | LibName9=adc-dac 41 | LibName10=memory 42 | LibName11=xilinx 43 | LibName12=microcontrollers 44 | LibName13=dsp 45 | LibName14=microchip 46 | LibName15=analog_switches 47 | LibName16=motorola 48 | LibName17=texas 49 | LibName18=intel 50 | LibName19=audio 51 | LibName20=interface 52 | LibName21=digital-audio 53 | LibName22=philips 54 | LibName23=display 55 | LibName24=cypress 56 | LibName25=siliconi 57 | LibName26=opto 58 | LibName27=atmel 59 | LibName28=contrib 60 | LibName29=valves 61 | LibName30=kicad-ESP8266/ESP8266 62 | -------------------------------------------------------------------------------- /firmware/prebuilt-binaries/README.md: -------------------------------------------------------------------------------- 1 | Flashing pre-built binaries 2 | ---------------------------------- 3 | 4 | Prebuilt binaries can be flashed to ESP8266 boards via serial port. 5 | 6 | Required hardware: 7 | * ESP8266-based board, 8 | * USB-TTL adapter (TTL-level, not RS232!) 9 | 10 | Required software: 11 | * esptool (https://github.com/themadinventor/esptool) 12 | * OR, on Windows: http://www.electrodragon.com/w/ESP8266_firmware_flasher 13 | (untested but should work) 14 | 15 | For Linux and MacOS, there is a script, `flash.sh` which can be used to 16 | automate the flashing procedure. 17 | 18 | Flashing process 19 | ------------------------ 20 | 21 | 1. Connect ESP to your serial port (RX to TX, TX to RX, GND to GND, VIN to 22 | +5V). Do not plug the serial port in USB port of your computer yet. 23 | 2. Start the ESP in bootloader mode. See 24 | https://github.com/themadinventor/esptool#entering-the-bootloader for 25 | how-to. 26 | 3. Launch the flashing script with serial port device or name as argument. 27 | 28 | On success, you should see something like this: 29 | 30 | $ ./flash.sh /dev/ttyUSB0 31 | Connecting... 32 | Erasing flash... 33 | Wrote 2048 bytes at 0x00000000 in 0.2 seconds (82.7 kbit/s)... 34 | Erasing flash... 35 | Wrote 309248 bytes at 0x00002000 in 29.9 seconds (82.8 kbit/s)... 36 | Erasing flash... 37 | Wrote 524288 bytes at 0x00100000 in 49.1 seconds (85.4 kbit/s)... 38 | 39 | Leaving... 40 | 41 | If using GUI to do the flashing you can look up settings in the flashing script 42 | (which .bin file goes to what memory location). 43 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/LICENSE.md: -------------------------------------------------------------------------------- 1 | kicad-ESP8266 is licensed under the Creative Commons Attribution-ShareAlike 2 | 4.0 International License. To view a copy of this license visit 3 | http://creativecommons.org/licenses/by-sa/4.0/. 4 | 5 | Summary of (not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode). 6 | ------------------------- 7 | 8 | ### You are free to: 9 | 10 | * Share - copy and redistribute the material in any medium or format 11 | 12 | * Adapt - remix, transform, and build upon the material for any purpose, even commercially. 13 | 14 | The licensor cannot revoke these freedoms as long as you follow the 15 | license terms. 16 | 17 | 18 | ### Under the following terms: 19 | 20 | * Attribution - You must give appropriate credit, provide a link to 21 | the license, and indicate if changes were made. You 22 | may do so in any reasonable manner, but not in any way 23 | that suggests the licensor endorses you or your use. 24 | 25 | * ShareAlike - If you remix, transform, or build upon the 26 | material, you must distribute your contributions under 27 | the same license as the original. 28 | 29 | No additional restrictions — You may not apply legal terms or 30 | technological measures that legally restrict others from doing anything 31 | the license permits. 32 | 33 | 34 | ### Notices: 35 | 36 | You do not have to comply with the license for elements of the material 37 | in the public domain or where your use is permitted by an applicable 38 | exception or limitation. 39 | 40 | No warranties are given. The license may not give you all of the 41 | permissions necessary for your intended use. For example, other rights 42 | such as publicity, privacy, or moral rights may limit how you use the 43 | material. 44 | 45 | 46 | -------------------------------------------------------------------------------- /firmware/Makefile-user.mk: -------------------------------------------------------------------------------- 1 | ## Local build configuration 2 | ## Parameters configured here will override default and ENV values. 3 | ## Uncomment and change examples: 4 | 5 | #Add your source directories here separated by space 6 | MODULES = app 7 | 8 | ## ESP_HOME sets the path where ESP tools and SDK are located. 9 | ## Windows: 10 | # ESP_HOME = c:/Espressif 11 | 12 | ## MacOS / Linux: 13 | #ESP_HOME = /opt/esp-open-sdk 14 | 15 | ## SMING_HOME sets the path where Sming framework is located. 16 | ## Windows: 17 | # SMING_HOME = c:/tools/sming/Sming 18 | 19 | # MacOS / Linux 20 | # SMING_HOME = /opt/sming/Sming 21 | 22 | ## COM port parameter is reqruied to flash firmware correctly. 23 | ## Windows: 24 | # COM_PORT = COM3 25 | 26 | # MacOS / Linux: 27 | #COM_PORT = /dev/ttyUSB1 28 | 29 | # Com port speed 30 | COM_SPEED = 115200 31 | COM_SPEED_ESPTOOL = 115200 32 | SPIFF_FILES = web/build 33 | 34 | HW_VER ?= 1 35 | SW_VER ?= 1 36 | 37 | FW_UPDATE_LINK := "http://192.168.142.100/latest" 38 | 39 | USER_CFLAGS = -DHW_VER=$(HW_VER) -DSW_VER=$(SW_VER) -DFW_UPDATE_LINK=\"$(FW_UPDATE_LINK)\" 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | #### overridable rBoot options #### 49 | ## use rboot build mode 50 | RBOOT_ENABLED ?= 0 51 | ## enable big flash support (for multiple roms, each in separate 1mb block of flash) 52 | RBOOT_BIG_FLASH ?= 1 53 | ## two rom mode (where two roms sit in the same 1mb block of flash) 54 | RBOOT_TWO_ROMS ?= 0 55 | ## size of the flash chip 56 | SPI_SIZE ?= 4M 57 | ## output file for first rom (.bin will be appended) 58 | #RBOOT_ROM_0 ?= rom0 59 | ## input linker file for first rom 60 | #RBOOT_LD_0 ?= rom0.ld 61 | ## size of the spiffs to create 62 | SPIFF_SIZE ?= 128000 63 | ## option to completely disable spiffs 64 | DISABLE_SPIFFS = 0 65 | ## flash offsets for spiffs, set if using two rom mode or not on a 4mb flash 66 | ## (spiffs location defaults to the mb after the rom slot on 4mb flash) 67 | # RBOOT_SPIFFS_0 ?= 0x100000 68 | # RBOOT_SPIFFS_1 ?= 0x300000 69 | ## esptool2 path 70 | #ESPTOOL2 ?= esptool2 71 | -------------------------------------------------------------------------------- /firmware/app/ota_update.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "ota_update.h" 5 | 6 | 7 | rBootHttpUpdate* otaUpdater = 0; 8 | 9 | void ota_update_callback(rBootHttpUpdate&, bool result) { 10 | if (result == true) { 11 | // success 12 | uint8 slot; 13 | slot = rboot_get_current_rom(); 14 | if (slot == 0) slot = 1; else slot = 0; 15 | // set to boot new rom and then reboot 16 | debugf("Firmware updated, rebooting to rom %d...\r\n", slot); 17 | rboot_set_current_rom(slot); 18 | System.restart(); 19 | } else { 20 | // fail 21 | debugf("Firmware update failed!"); 22 | } 23 | } 24 | 25 | void ota_update() { 26 | /* 27 | uint8 slot; 28 | rboot_config bootconf; 29 | 30 | // need a clean object, otherwise if run before and failed will not run again 31 | if (otaUpdater) delete otaUpdater; 32 | otaUpdater = new rBootHttpUpdate(); 33 | 34 | // select rom slot to flash 35 | bootconf = rboot_get_config(); 36 | slot = bootconf.current_rom; 37 | if (slot == 0) slot = 1; else slot = 0; 38 | 39 | char update_rom0[256]; 40 | char update_spiffs[256]; 41 | 42 | sprintf(update_rom0, "%s%s", AppSettings.ota_link.c_str(), "rom0.bin"); 43 | sprintf(update_spiffs, "%s%s", AppSettings.ota_link.c_str(), "spiff_rom.bin"); 44 | 45 | debugf("rom0 -> %s\n", update_rom0); 46 | debugf("spiffs -> %s\n", update_spiffs); 47 | 48 | // flash rom to position indicated in the rBoot config rom table 49 | otaUpdater->addItem(bootconf.roms[slot], update_rom0); 50 | 51 | // use user supplied values (defaults for 4mb flash in makefile) 52 | if (slot == 0) { 53 | otaUpdater->addItem(RBOOT_SPIFFS_0, update_spiffs); 54 | } else { 55 | otaUpdater->addItem(RBOOT_SPIFFS_1, update_spiffs); 56 | } 57 | 58 | // set a callback 59 | otaUpdater->setCallback(ota_update_callback); 60 | debugf("Starting update\n"); 61 | // start update 62 | otaUpdater->start(); 63 | */ 64 | } 65 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-13-wroom-02.scad: -------------------------------------------------------------------------------- 1 | fragments=20; 2 | module halfPad() { 3 | color("Gold", a=1) { 4 | difference() { 5 | translate([0, 0, 0.5]) { 6 | cube(size=[0.85,0.90,1], center=true); 7 | }; 8 | }; 9 | }; 10 | }; 11 | 12 | module padHoles(x, y, zRot = 0) { 13 | rotate([0, 0, zRot]) { 14 | translate([x, y, 0.5]) { 15 | cylinder(h=2,d=0.6,center=true,$fn=fragments); 16 | }; 17 | }; 18 | }; 19 | 20 | module pad(x, y, zRot = 0) { 21 | rotate([0, 0, zRot]) { 22 | translate([x, y, 0]) { 23 | halfPad(); 24 | }; 25 | }; 26 | }; 27 | 28 | module pads() { 29 | 30 | pad(17.58,-12); 31 | pad(17.58,-10.5); 32 | pad(17.58,-9); 33 | pad(17.58,-7.5); 34 | pad(17.58,-6); 35 | pad(17.58,-4.5); 36 | pad(17.58,-3); 37 | pad(17.58,-1.5); 38 | pad(17.58,0); 39 | 40 | pad(-0.42,0,180); 41 | pad(-0.42,1.5,180); 42 | pad(-0.42,3,180); 43 | pad(-0.42,4.5,180); 44 | pad(-0.42,6,180); 45 | pad(-0.42,7.5,180); 46 | pad(-0.42,9,180); 47 | pad(-0.42,10.5,180); 48 | pad(-0.42,12,180); 49 | 50 | }; 51 | 52 | module holes() { 53 | 54 | padHoles(18,-12); 55 | padHoles(18,-10.5); 56 | padHoles(18,-9); 57 | padHoles(18,-7.5); 58 | padHoles(18,-6); 59 | padHoles(18,-4.5); 60 | padHoles(18,-3); 61 | padHoles(18,-1.5); 62 | padHoles(18,0); 63 | 64 | padHoles(0,0,180); 65 | padHoles(0,1.5,180); 66 | padHoles(0,3,180); 67 | padHoles(0,4.5,180); 68 | padHoles(0,6,180); 69 | padHoles(0,7.5,180); 70 | padHoles(0,9,180); 71 | padHoles(0,10.5,180); 72 | padHoles(0,12,180); 73 | }; 74 | 75 | // Translate so that pin 1 and the bottom of the board 76 | // is the reference point (0,0,0) 77 | translate([0,0,0]) { 78 | // pcb 79 | difference() { 80 | union() { 81 | color("Blue", a=1) { 82 | translate([0, -13, 0]) { 83 | cube(size=[18, 20, .98], center = false); 84 | }; 85 | }; 86 | pads(); 87 | }; 88 | holes(); 89 | }; 90 | 91 | //shield 92 | translate([1.5, -12, 1]) { 93 | color("Silver", a=1) { 94 | cube(size=[15, 12, 1.5], center = false); 95 | }; 96 | }; 97 | }; -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-01.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-01 (layer F.Cu) (tedit 553C10FF) 2 | (descr "Module, ESP-8266, ESP-01, 8 pin") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference REF** (at 0.254 -4.572) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-01_2x04 (at 12.192 3.556) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -1.778 -3.302) (end 22.86 -3.302) (layer F.Fab) (width 0.1524)) 11 | (fp_line (start 22.86 -3.302) (end 22.86 10.922) (layer F.Fab) (width 0.1524)) 12 | (fp_line (start 22.86 10.922) (end -1.778 10.922) (layer F.Fab) (width 0.1524)) 13 | (fp_line (start -1.778 10.922) (end -1.778 -3.302) (layer F.Fab) (width 0.1524)) 14 | (fp_line (start 1.27 -1.27) (end -1.27 -1.27) (layer F.SilkS) (width 0.1524)) 15 | (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) 16 | (fp_line (start -1.75 -1.75) (end -1.75 9.4) (layer F.CrtYd) (width 0.05)) 17 | (fp_line (start 4.3 -1.75) (end 4.3 9.4) (layer F.CrtYd) (width 0.05)) 18 | (fp_line (start -1.75 -1.75) (end 4.3 -1.75) (layer F.CrtYd) (width 0.05)) 19 | (fp_line (start -1.75 9.4) (end 4.3 9.4) (layer F.CrtYd) (width 0.05)) 20 | (fp_line (start -1.27 1.27) (end -1.27 8.89) (layer F.SilkS) (width 0.1524)) 21 | (fp_line (start -1.27 8.89) (end 3.81 8.89) (layer F.SilkS) (width 0.1524)) 22 | (fp_line (start 3.81 8.89) (end 3.81 -1.27) (layer F.SilkS) (width 0.1524)) 23 | (fp_line (start 3.81 -1.27) (end 1.27 -1.27) (layer F.SilkS) (width 0.1524)) 24 | (pad 1 thru_hole rect (at 0 0) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 25 | (pad 2 thru_hole oval (at 2.54 0) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 26 | (pad 3 thru_hole oval (at 0 2.54) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 27 | (pad 4 thru_hole oval (at 2.54 2.54) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 28 | (pad 5 thru_hole oval (at 0 5.08) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 29 | (pad 6 thru_hole oval (at 2.54 5.08) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 30 | (pad 7 thru_hole oval (at 0 7.62) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 31 | (pad 8 thru_hole oval (at 2.54 7.62) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 32 | (model Pin_Headers.3dshapes/Pin_Header_Straight_2x04.wrl 33 | (at (xyz 0.05 -0.15 0)) 34 | (scale (xyz 1 1 1)) 35 | (rotate (xyz 0 0 90)) 36 | ) 37 | ) 38 | -------------------------------------------------------------------------------- /firmware/app/PowerManager.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "AppSettings.h" 3 | #include "PowerManager.h" 4 | 5 | PowerManager::PowerManager(uint8_t _power_out_pin, uint8_t _reset_out_pin, 6 | uint8_t _power_in_pin, uint8_t _act_in_pin) : 7 | power_out_pin(_power_out_pin), 8 | reset_out_pin(_reset_out_pin), 9 | power_in_pin(_power_in_pin), 10 | act_in_pin(_act_in_pin), 11 | cycle_counter(0), 12 | clear_power_output(0), 13 | clear_reset_output(0), 14 | act_high_events(0), 15 | prev_act_high_events(0), 16 | power_high(false) 17 | { 18 | pinMode(power_out_pin, OUTPUT); 19 | digitalWrite(power_out_pin, LOW); 20 | 21 | pinMode(reset_out_pin, OUTPUT); 22 | digitalWrite(reset_out_pin, LOW); 23 | 24 | pinMode(act_in_pin, INPUT); 25 | pinMode(power_in_pin, INPUT); 26 | 27 | pinMode(NET_LED_PIN, OUTPUT); 28 | pinMode(UART_LED_PIN, OUTPUT); 29 | 30 | digitalWrite(NET_LED_PIN, HIGH); 31 | digitalWrite(UART_LED_PIN, HIGH); 32 | 33 | delay(100); 34 | 35 | digitalWrite(NET_LED_PIN, LOW); 36 | digitalWrite(UART_LED_PIN, LOW); 37 | } 38 | 39 | void PowerManager::update(void) 40 | { 41 | cycle_counter++; 42 | 43 | if (clear_power_output == cycle_counter) 44 | { 45 | digitalWrite(power_out_pin, LOW); 46 | clear_power_output = 0; 47 | debugf("PM: clearing power output\n"); 48 | } 49 | 50 | if (clear_reset_output == cycle_counter) 51 | { 52 | digitalWrite(reset_out_pin, LOW); 53 | clear_reset_output = 0; 54 | debugf("PM: clearing reset output\n"); 55 | } 56 | 57 | power_high = digitalRead(power_in_pin) == HIGH ? true : false; 58 | 59 | if (digitalRead(act_in_pin) == HIGH) 60 | { 61 | act_high_events++; 62 | } 63 | 64 | //copy the activity level into another variable, reset act_high 65 | if (cycle_counter % 200 == 0) 66 | { 67 | prev_act_high_events = act_high_events; 68 | act_high_events = 0; 69 | } 70 | 71 | digitalWrite(NET_LED_PIN, digitalRead(reset_out_pin)); 72 | digitalWrite(UART_LED_PIN, digitalRead(power_out_pin)); 73 | } 74 | 75 | void PowerManager::power_on(void) 76 | { 77 | debugf("PM: powering on\n"); 78 | digitalWrite(power_out_pin, HIGH); 79 | clear_power_output = cycle_counter + 30; 80 | } 81 | void PowerManager::power_off(void) 82 | { 83 | debugf("PM: powering off\n"); 84 | digitalWrite(power_out_pin, HIGH); 85 | clear_power_output = cycle_counter + 500; 86 | } 87 | 88 | void PowerManager::reset(void) 89 | { 90 | debugf("PM: restarting\n"); 91 | digitalWrite(reset_out_pin, HIGH); 92 | clear_reset_output = cycle_counter + 30; 93 | } 94 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-13-WROOM-02.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-13-WROOM-02 (layer F.Cu) (tedit 5613A4CC) 2 | (descr "Module, ESP-8266, ESP-13-WROOM-02, 18 pad, SMD") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference REF** (at -3 -5) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-13-WROOM-02 (at 9 0) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 18 -7) (end 0 -1.2) (layer F.CrtYd) (width 0.1524)) 11 | (fp_line (start 0 -7) (end 18 -1.2) (layer F.CrtYd) (width 0.1524)) 12 | (fp_text user "No Copper" (at 9 -4) (layer F.CrtYd) 13 | (effects (font (size 1 1) (thickness 0.15))) 14 | ) 15 | (fp_line (start 0 -7) (end 0 -1.2) (layer F.CrtYd) (width 0.1524)) 16 | (fp_line (start 0 -1.2) (end 18 -1.2) (layer F.CrtYd) (width 0.1524)) 17 | (fp_line (start 18 -1.2) (end 18 -7) (layer F.CrtYd) (width 0.1524)) 18 | (fp_line (start 18 -7) (end 0 -7) (layer F.CrtYd) (width 0.1524)) 19 | (fp_line (start 18 -7) (end 18 13) (layer F.Fab) (width 0.1524)) 20 | (fp_line (start 0 13) (end 18 13) (layer F.Fab) (width 0.1524)) 21 | (fp_line (start 0 13) (end 0 -7) (layer F.Fab) (width 0.1524)) 22 | (fp_line (start 0 -7) (end 18 -7) (layer F.Fab) (width 0.1524)) 23 | (pad 10 smd oval (at 18 12) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 24 | (pad 9 smd oval (at 0 12) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 25 | (pad 1 smd rect (at 0 0) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 26 | (pad 2 smd oval (at 0 1.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 27 | (pad 3 smd oval (at 0 3) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 28 | (pad 4 smd oval (at 0 4.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 29 | (pad 5 smd oval (at 0 6) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 30 | (pad 6 smd oval (at 0 7.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 31 | (pad 7 smd oval (at 0 9) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 32 | (pad 8 smd oval (at 0 10.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 33 | (pad 11 smd oval (at 18 10.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 34 | (pad 12 smd oval (at 18 9) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 35 | (pad 13 smd oval (at 18 7.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 36 | (pad 14 smd oval (at 18 6) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 37 | (pad 15 smd oval (at 18 4.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 38 | (pad 16 smd oval (at 18 3) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 39 | (pad 17 smd oval (at 18 1.5) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 40 | (pad 18 smd oval (at 18 0) (size 2 0.9) (layers F.Cu F.Paste F.Mask)) 41 | (model ${ESPLIB}/ESP8266.3dshapes/ESP-13-wroom-02.wrl 42 | (at (xyz 0 0 0)) 43 | (scale (xyz 0.3937 0.3937 0.3937)) 44 | (rotate (xyz 0 0 0)) 45 | ) 46 | ) 47 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-12.scad: -------------------------------------------------------------------------------- 1 | fragments=20; 2 | module halfPad() { 3 | color("Gold", a=1) { 4 | difference() { 5 | cube(size=[1,1,1], center=true); 6 | cylinder(h=2,d=0.6,center = true, $fn=fragments); 7 | }; 8 | }; 9 | }; 10 | 11 | module padHoles(x, y, zRot = 0) { 12 | rotate([0, 0, zRot]) { 13 | translate([x, y, 0]) { 14 | cylinder(h=2,d=0.6,center=true,$fn=fragments); 15 | translate([1,0,0]) { 16 | cylinder(h=2,d=0.6,center=true,$fn=fragments); 17 | }; 18 | }; 19 | }; 20 | }; 21 | 22 | module pad(x, y, zRot = 0) { 23 | rotate([0, 0, zRot]) { 24 | translate([x, y, 0]) { 25 | halfPad(); 26 | difference() { 27 | translate([1,0,0]) { 28 | halfPad(); 29 | }; 30 | translate([1.25,0,0]) { 31 | cube(size=[0.5,1.1,1.1], center=true); 32 | }; 33 | }; 34 | }; 35 | }; 36 | }; 37 | 38 | module pads() { 39 | pad(0,0); 40 | pad(0,2); 41 | pad(0,4); 42 | pad(0,6); 43 | pad(0,8); 44 | pad(0,10); 45 | pad(0,12); 46 | pad(0,14); 47 | pad(14,0,180); 48 | pad(14,-2,180); 49 | pad(14,-4,180); 50 | pad(14,-6,180); 51 | pad(14,-8,180); 52 | pad(14,-10,180); 53 | pad(14,-12,180); 54 | pad(14,-14,180); 55 | }; 56 | 57 | module holes() { 58 | padHoles(0,0); 59 | padHoles(0,2); 60 | padHoles(0,4); 61 | padHoles(0,6); 62 | padHoles(0,8); 63 | padHoles(0,10); 64 | padHoles(0,12); 65 | padHoles(0,14); 66 | padHoles(14,0,180); 67 | padHoles(14,-2,180); 68 | padHoles(14,-4,180); 69 | padHoles(14,-6,180); 70 | padHoles(14,-8,180); 71 | padHoles(14,-10,180); 72 | padHoles(14,-12,180); 73 | padHoles(14,-14,180); 74 | }; 75 | 76 | // Translate so that pin 1 and the bottom of the board 77 | // is the reference point (0,0,0) 78 | translate([14,-14,0.50]) { 79 | // pcb 80 | difference() { 81 | union() { 82 | color("Blue", a=1) { 83 | translate([-15, -1.6, -0.49]) { 84 | cube(size=[16, 24, .98], center = false); 85 | }; 86 | }; 87 | pads(); 88 | }; 89 | holes(); 90 | }; 91 | 92 | //shield 93 | translate([-15 + 1.98, 0, 0.5]) { 94 | color("Silver", a=1) { 95 | cube(size=[12.1, 15.2, 2.3], center = false); 96 | }; 97 | }; 98 | 99 | //led 100 | translate([-2.5,15.5,0.5]){ 101 | color("White", a=1) { 102 | cube(size=[2,1,0.4], center=false); 103 | }; 104 | }; 105 | }; 106 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-12E.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-12E (layer F.Cu) (tedit 559F8D21) 2 | (descr "Module, ESP-8266, ESP-12, 16 pad, SMD") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference REF** (at -2 -2) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-12E (at 8 1) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 16 -8.4) (end 0 -2.6) (layer F.CrtYd) (width 0.1524)) 11 | (fp_line (start 0 -8.4) (end 16 -2.6) (layer F.CrtYd) (width 0.1524)) 12 | (fp_text user "No Copper" (at 7.9 -5.4) (layer F.CrtYd) 13 | (effects (font (size 1 1) (thickness 0.15))) 14 | ) 15 | (fp_line (start 0 -8.4) (end 0 -2.6) (layer F.CrtYd) (width 0.1524)) 16 | (fp_line (start 0 -2.6) (end 16 -2.6) (layer F.CrtYd) (width 0.1524)) 17 | (fp_line (start 16 -2.6) (end 16 -8.4) (layer F.CrtYd) (width 0.1524)) 18 | (fp_line (start 16 -8.4) (end 0 -8.4) (layer F.CrtYd) (width 0.1524)) 19 | (fp_line (start 16 -8.4) (end 16 15.6) (layer F.Fab) (width 0.1524)) 20 | (fp_line (start 16 15.6) (end 0 15.6) (layer F.Fab) (width 0.1524)) 21 | (fp_line (start 0 15.6) (end 0 -8.4) (layer F.Fab) (width 0.1524)) 22 | (fp_line (start 0 -8.4) (end 16 -8.4) (layer F.Fab) (width 0.1524)) 23 | (pad 9 smd oval (at 2.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 24 | (pad 10 smd oval (at 4.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 25 | (pad 11 smd oval (at 6.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 26 | (pad 12 smd oval (at 8.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 27 | (pad 13 smd oval (at 10.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 28 | (pad 14 smd oval (at 12.99 15.75 90) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 29 | (pad 1 smd rect (at 0 0) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 30 | (pad 2 smd oval (at 0 2) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 31 | (pad 3 smd oval (at 0 4) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 32 | (pad 4 smd oval (at 0 6) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 33 | (pad 5 smd oval (at 0 8) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 34 | (pad 6 smd oval (at 0 10) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 35 | (pad 7 smd oval (at 0 12) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 36 | (pad 8 smd oval (at 0 14) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 37 | (pad 15 smd oval (at 16 14) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 38 | (pad 16 smd oval (at 16 12) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 39 | (pad 17 smd oval (at 16 10) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 40 | (pad 18 smd oval (at 16 8) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 41 | (pad 19 smd oval (at 16 6) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 42 | (pad 20 smd oval (at 16 4) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 43 | (pad 21 smd oval (at 16 2) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 44 | (pad 22 smd oval (at 16 0) (size 2.4 1.1) (layers F.Cu F.Paste F.Mask)) 45 | ) 46 | -------------------------------------------------------------------------------- /firmware/web/build/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Configuration 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 26 | 27 | 28 | 29 |
30 |
31 | 38 |

Power Control

39 |
40 | 41 |
42 |
43 | 44 |

Settings

45 |
46 |
47 | Auth 48 |
49 |
50 | 51 | 52 |
53 |
54 |
55 | 56 |
57 | Firmware settings 58 |
59 |
60 | 61 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |
69 | 70 | 71 |
72 | 73 | 74 |
75 |
76 |
77 |
78 |
79 | 80 |
81 | 82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.3dshapes/ESP-07v2.scad: -------------------------------------------------------------------------------- 1 | fragments=20; 2 | module halfPad() { 3 | color("Gold", a=1) { 4 | difference() { 5 | cube(size=[1,1,1], center=true); 6 | cylinder(h=2,d=0.6,center = true, $fn=fragments); 7 | }; 8 | }; 9 | }; 10 | 11 | module padHoles(x, y, zRot = 0) { 12 | rotate([0, 0, zRot]) { 13 | translate([x, y, 0]) { 14 | cylinder(h=2,d=0.6,center=true,$fn=fragments); 15 | translate([1,0,0]) { 16 | cylinder(h=2,d=0.6,center=true,$fn=fragments); 17 | }; 18 | }; 19 | }; 20 | }; 21 | 22 | module pad(x, y, zRot = 0) { 23 | rotate([0, 0, zRot]) { 24 | translate([x, y, 0]) { 25 | halfPad(); 26 | difference() { 27 | translate([1,0,0]) { 28 | halfPad(); 29 | }; 30 | translate([1.25,0,0]) { 31 | cube(size=[0.5,1.1,1.1], center=true); 32 | }; 33 | }; 34 | }; 35 | }; 36 | }; 37 | module pads() { 38 | pad(0,0); 39 | pad(0,2); 40 | pad(0,4); 41 | pad(0,6); 42 | pad(0,8); 43 | pad(0,10); 44 | pad(0,12); 45 | pad(0,14); 46 | pad(14,0,180); 47 | pad(14,-2,180); 48 | pad(14,-4,180); 49 | pad(14,-6,180); 50 | pad(14,-8,180); 51 | pad(14,-10,180); 52 | pad(14,-12,180); 53 | pad(14,-14,180); 54 | }; 55 | 56 | module holes() { 57 | padHoles(0,0); 58 | padHoles(0,2); 59 | padHoles(0,4); 60 | padHoles(0,6); 61 | padHoles(0,8); 62 | padHoles(0,10); 63 | padHoles(0,12); 64 | padHoles(0,14); 65 | padHoles(14,0,180); 66 | padHoles(14,-2,180); 67 | padHoles(14,-4,180); 68 | padHoles(14,-6,180); 69 | padHoles(14,-8,180); 70 | padHoles(14,-10,180); 71 | padHoles(14,-12,180); 72 | padHoles(14,-14,180); 73 | }; 74 | 75 | // Translate so that pin 1 and the bottom of the board 76 | // is the reference point (0,0,0) 77 | translate([14,-14,0.50]) { 78 | // pcb 79 | difference() { 80 | union() { 81 | color("Blue", a=1) { 82 | translate([-15, -1.6, -0.49]) { 83 | cube(size=[16, 22, 0.98], center = false); 84 | }; 85 | }; 86 | pads(); 87 | }; 88 | holes(); 89 | }; 90 | 91 | //shield 92 | translate([-15 + 1.98, 0, 0.5]) { 93 | color("Silver", a=1) { 94 | cube(size=[12.1, 15.2, 2.3], center = false); 95 | }; 96 | }; 97 | 98 | //antenna 99 | translate([-9.63, 17, 0.5]) { 100 | color("AntiqueWhite", a=1) { 101 | cube(size=[9.63, 1.98, 1], center = false); 102 | }; 103 | }; 104 | 105 | //antenna connector 106 | translate([-14,16,0.5]) { 107 | color("White", a=1) { 108 | cube(size=[2.58, 2.58, 0.4], center = false); 109 | }; 110 | translate([2.58/2, 2.58/2, 0.5]) { 111 | color("Gold", a=1) { 112 | difference() { 113 | cylinder(h=1.3, d=1.98, center=true, $fn=fragments); 114 | cylinder(h=1.5, d=1.70, center=true, $fn=fragments); 115 | }; 116 | 117 | cylinder(h=0.5, d=0.5, $fn=fragments); 118 | }; 119 | }; 120 | }; 121 | 122 | //leds 123 | translate([-2.5,15.5,0.5]){ 124 | color("White", a=1) { 125 | cube(size=[2,1,0.4], center=false); 126 | }; 127 | }; 128 | translate([-8.5,15.5,0.5]){ 129 | color("White", a=1) { 130 | cube(size=[2,1,0.4], center=false); 131 | }; 132 | }; 133 | }; 134 | -------------------------------------------------------------------------------- /firmware/app/app_settings.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "user_config.h" 3 | 4 | #include "AppSettings.h" 5 | 6 | ApplicationSettingsStorage AppSettings; 7 | 8 | void app_settings_tick_10hz() { 9 | 10 | //counts number of ticks when button was pressed, initiates parameter 11 | //restore. Blinks both three times, and then reboots after pin is released 12 | 13 | static unsigned int ticks_pressed = 0; 14 | static bool wait_release = false; 15 | 16 | if (digitalRead(RESTORE_PARAMETERS_PIN) == LOW) { 17 | ticks_pressed++; 18 | if (ticks_pressed >= 30 && !wait_release) { 19 | AppSettings.restore(); 20 | AppSettings.save(); 21 | digitalWrite(UART_LED_PIN, HIGH); 22 | delay(100); 23 | digitalWrite(NET_LED_PIN, HIGH); 24 | delay(100); 25 | digitalWrite(NET_LED_PIN, LOW); 26 | delay(100); 27 | digitalWrite(UART_LED_PIN, LOW); 28 | wait_release = true; 29 | } 30 | } else { 31 | ticks_pressed = 0; 32 | if (wait_release) { 33 | delay(1000); 34 | System.restart(); 35 | } 36 | } 37 | 38 | } 39 | 40 | void ApplicationSettingsStorage::restore() { 41 | auth_password = DEFAULT_AUTH_PASSWORD; 42 | ota_link = DEFAULT_OTA_LINK; 43 | ap_password = DEFAULT_AP_PASSWORD; 44 | ap_ssid = DEFAULT_AP_SSID; 45 | ssid = ""; 46 | password =""; 47 | dhcp = true; 48 | } 49 | 50 | void ApplicationSettingsStorage::load() 51 | { 52 | DynamicJsonBuffer jsonBuffer; 53 | ap_password = DEFAULT_AP_PASSWORD; 54 | ap_ssid = DEFAULT_AP_SSID; 55 | auth_password = DEFAULT_AUTH_PASSWORD; 56 | 57 | if (exist()) 58 | { 59 | int size = fileGetSize(APP_SETTINGS_FILE); 60 | char* jsonString = new char[size + 1]; 61 | fileGetContent(APP_SETTINGS_FILE, jsonString, size + 1); 62 | JsonObject& root = jsonBuffer.parseObject(jsonString); 63 | 64 | JsonObject& network = root["network"]; 65 | ssid = network["ssid"].asString(); 66 | password = network["password"].asString(); 67 | 68 | dhcp = network["dhcp"]; 69 | 70 | ip = network["ip"].asString(); 71 | netmask = network["netmask"].asString(); 72 | gateway = network["gateway"].asString(); 73 | 74 | ap_password = network["ap_password"].asString(); 75 | ap_ssid = network["ap_ssid"].asString(); 76 | 77 | auth_password = root["auth_password"].asString(); 78 | 79 | delete[] jsonString; 80 | } 81 | } 82 | 83 | void ApplicationSettingsStorage::save() 84 | { 85 | DynamicJsonBuffer jsonBuffer; 86 | JsonObject& root = jsonBuffer.createObject(); 87 | 88 | JsonObject& network = jsonBuffer.createObject(); 89 | 90 | root["network"] = network; 91 | 92 | root["auth_password"] = auth_password.c_str(); 93 | 94 | network["ssid"] = ssid.c_str(); 95 | network["password"] = password.c_str(); 96 | 97 | network["dhcp"] = dhcp; 98 | 99 | // Make copy by value for temporary string objects 100 | network["ip"] = ip.toString(); 101 | network["netmask"] = netmask.toString(); 102 | network["gateway"] = gateway.toString(); 103 | 104 | network["ap_ssid"] = ap_ssid.c_str(); 105 | network["ap_password"] = ap_password.c_str(); 106 | 107 | //TODO: add direct file stream writing 108 | String rootString; 109 | root.printTo(rootString); 110 | fileSetContent(APP_SETTINGS_FILE, rootString); 111 | } 112 | 113 | bool ApplicationSettingsStorage::exist() 114 | { 115 | return fileExist(APP_SETTINGS_FILE); 116 | } 117 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-07v2.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-07v2 (layer F.Cu) (tedit 556A0367) 2 | (descr "Module, ESP-8266, ESP-07v2, 16 pad, SMD") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference REF** (at -3.5 -1.5) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-07v2 (at 7.25 2.25) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -2.25 -0.5) (end -2.25 -6.65) (layer F.CrtYd) (width 0.05)) 11 | (fp_line (start -2.25 -6.65) (end 16.25 -6.65) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start 16.25 -6.65) (end 16.25 16) (layer F.CrtYd) (width 0.05)) 13 | (fp_line (start 16.25 16) (end -2.25 16) (layer F.CrtYd) (width 0.05)) 14 | (fp_line (start -2.25 16) (end -2.25 -0.5) (layer F.CrtYd) (width 0.05)) 15 | (fp_line (start -1 -6.4) (end 15 -6.4) (layer F.SilkS) (width 0.1524)) 16 | (fp_line (start 15 -6.4) (end 15 -1) (layer F.SilkS) (width 0.1524)) 17 | (fp_line (start -1 -6.4) (end -1 -1) (layer F.SilkS) (width 0.1524)) 18 | (fp_line (start -1 14.8) (end -1 15.6) (layer F.SilkS) (width 0.1524)) 19 | (fp_line (start -1 15.6) (end 15 15.6) (layer F.SilkS) (width 0.1524)) 20 | (fp_line (start 15 15.6) (end 15 14.8) (layer F.SilkS) (width 0.1524)) 21 | (fp_line (start 15 -6.4) (end -1 -2.6) (layer F.SilkS) (width 0.1524)) 22 | (fp_line (start -1 -6.4) (end 15 -2.6) (layer F.SilkS) (width 0.1524)) 23 | (fp_text user "No Copper" (at 6.892 -5.4) (layer F.SilkS) 24 | (effects (font (size 1 1) (thickness 0.15))) 25 | ) 26 | (fp_line (start -1.008 -2.6) (end 14.992 -2.6) (layer F.SilkS) (width 0.1524)) 27 | (fp_line (start 15 -6.4) (end 15 15.6) (layer F.Fab) (width 0.05)) 28 | (fp_line (start 15 15.6) (end -1 15.6) (layer F.Fab) (width 0.05)) 29 | (fp_line (start -1.008 15.6) (end -1.008 -6.4) (layer F.Fab) (width 0.05)) 30 | (fp_line (start -1 -6.4) (end 15 -6.4) (layer F.Fab) (width 0.05)) 31 | (pad 1 thru_hole rect (at 0 0) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 32 | (pad 2 thru_hole oval (at 0 2) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 3 thru_hole oval (at 0 4) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 4 thru_hole oval (at 0 6) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 5 thru_hole oval (at 0 8) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 6 thru_hole oval (at 0 10) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 37 | (pad 7 thru_hole oval (at 0 12) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 38 | (pad 8 thru_hole oval (at 0 14) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 39 | (pad 9 thru_hole oval (at 14 14) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 40 | (pad 10 thru_hole oval (at 14 12) (size 2.5 1.1) (drill 0.65 (offset 0.6 0)) (layers *.Cu *.Mask F.SilkS)) 41 | (pad 11 thru_hole oval (at 14 10) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 42 | (pad 12 thru_hole oval (at 14 8) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 43 | (pad 13 thru_hole oval (at 14 6) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 44 | (pad 14 thru_hole oval (at 14 4) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 45 | (pad 15 thru_hole oval (at 14 2) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 46 | (pad 16 thru_hole oval (at 14 0) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 47 | (model ${ESPLIB}/ESP8266.3dshapes/ESP-07v2.wrl 48 | (at (xyz 0 0 0)) 49 | (scale (xyz 0.3937 0.3937 0.3937)) 50 | (rotate (xyz 0 0 0)) 51 | ) 52 | ) 53 | -------------------------------------------------------------------------------- /firmware/web/build/status.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Status 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 27 | 28 | 29 | 31 | 32 | 33 | 34 |
35 |
36 | 43 | 44 |

Power Control

45 |
46 | 47 |
48 |
49 |

Status

50 | {message} 51 |
52 |
Current status
53 | 54 |
55 | Activity: {activity}%
56 | Power state: {power_state}

57 | Uptime: {uptime}
58 |
59 |

60 |

61 |
62 |

63 |
64 |
65 | 66 |
67 |
WiFi AP status
68 |
69 | SSID: {ap_ssid}
70 | IP: {ap_ip}
71 | Password: {ap_password}
72 | 73 |
74 |
75 | 76 |
77 |
WiFi client status
78 |
79 | SSID: {client_ssid}
80 | IP: {client_ip}
81 | Status: {client_status}
82 |
83 |
84 | 85 | 86 |
87 |
Versions
88 |
89 | Software version: v{sw_ver}
90 | Hardware version: rev{hw_ver}
91 |
92 |
93 | 94 |
95 |
96 |
97 | 98 |
99 | 100 |
101 | 102 | 103 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-12.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-12 locked (layer F.Cu) (tedit 55BE5912) 2 | (descr "Module, ESP-8266, ESP-12, 16 pad, SMD") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference U1 (at 1.5 16.6) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-12 (at 6.992 1) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start -2.25 -0.5) (end -2.25 -8.75) (layer F.CrtYd) (width 0.05)) 11 | (fp_line (start -2.25 -8.75) (end 15.25 -8.75) (layer F.CrtYd) (width 0.05)) 12 | (fp_line (start 15.25 -8.75) (end 16.25 -8.75) (layer F.CrtYd) (width 0.05)) 13 | (fp_line (start 16.25 -8.75) (end 16.25 16) (layer F.CrtYd) (width 0.05)) 14 | (fp_line (start 16.25 16) (end -2.25 16) (layer F.CrtYd) (width 0.05)) 15 | (fp_line (start -2.25 16) (end -2.25 -0.5) (layer F.CrtYd) (width 0.05)) 16 | (fp_line (start -1.016 -8.382) (end 14.986 -8.382) (layer F.CrtYd) (width 0.1524)) 17 | (fp_line (start 14.986 -8.382) (end 14.986 -0.889) (layer F.CrtYd) (width 0.1524)) 18 | (fp_line (start -1.016 -8.382) (end -1.016 -1.016) (layer F.CrtYd) (width 0.1524)) 19 | (fp_line (start -1.016 14.859) (end -1.016 15.621) (layer F.SilkS) (width 0.1524)) 20 | (fp_line (start -1.016 15.621) (end 14.986 15.621) (layer F.SilkS) (width 0.1524)) 21 | (fp_line (start 14.986 15.621) (end 14.986 14.859) (layer F.SilkS) (width 0.1524)) 22 | (fp_line (start 14.992 -8.4) (end -1.008 -2.6) (layer F.CrtYd) (width 0.1524)) 23 | (fp_line (start -1.008 -8.4) (end 14.992 -2.6) (layer F.CrtYd) (width 0.1524)) 24 | (fp_text user "No Copper" (at 6.892 -5.4) (layer F.CrtYd) 25 | (effects (font (size 1 1) (thickness 0.15))) 26 | ) 27 | (fp_line (start -1.008 -2.6) (end 14.992 -2.6) (layer F.CrtYd) (width 0.1524)) 28 | (fp_line (start 15 -8.4) (end 15 15.6) (layer F.Fab) (width 0.05)) 29 | (fp_line (start 14.992 15.6) (end -1.008 15.6) (layer F.Fab) (width 0.05)) 30 | (fp_line (start -1.008 15.6) (end -1.008 -8.4) (layer F.Fab) (width 0.05)) 31 | (fp_line (start -1.008 -8.4) (end 14.992 -8.4) (layer F.Fab) (width 0.05)) 32 | (pad 1 thru_hole rect (at 0 0) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 2 thru_hole oval (at 0 2) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 3 thru_hole oval (at 0 4) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 4 thru_hole oval (at 0 6) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 5 thru_hole oval (at 0 8) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 37 | (pad 6 thru_hole oval (at 0 10) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 38 | (pad 7 thru_hole oval (at 0 12) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 39 | (pad 8 thru_hole oval (at 0 14) (size 2.5 1.1) (drill 0.65 (offset -0.7 0)) (layers *.Cu *.Mask F.SilkS)) 40 | (pad 9 thru_hole oval (at 14 14) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 41 | (pad 10 thru_hole oval (at 14 12) (size 2.5 1.1) (drill 0.65 (offset 0.6 0)) (layers *.Cu *.Mask F.SilkS)) 42 | (pad 11 thru_hole oval (at 14 10) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 43 | (pad 12 thru_hole oval (at 14 8) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 44 | (pad 13 thru_hole oval (at 14 6) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 45 | (pad 14 thru_hole oval (at 14 4) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 46 | (pad 15 thru_hole oval (at 14 2) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 47 | (pad 16 thru_hole oval (at 14 0) (size 2.5 1.1) (drill 0.65 (offset 0.7 0)) (layers *.Cu *.Mask F.SilkS)) 48 | (model ${ESPLIB}/ESP8266.3dshapes/ESP-12.wrl 49 | (at (xyz 0 0 0)) 50 | (scale (xyz 0.3937 0.3937 0.3937)) 51 | (rotate (xyz 0 0 0)) 52 | ) 53 | ) 54 | -------------------------------------------------------------------------------- /firmware/web/dev/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Sming Framework WiFi Network configuration 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 50 | 51 | 52 | 53 |
54 |
55 | 61 |

Sming Based

62 |
63 | 64 |
65 |

Network Settings

66 |

Wireless network connection 67 |

68 |
69 |
70 |
71 | 72 |

Settings

73 |
74 |
75 | IP Address 76 |
77 |
78 | 79 |
80 | 83 | 86 |
87 |
88 |
89 | 90 | 91 |
92 |
93 | 94 | 95 |
96 |
97 | 98 | 99 |
100 |
101 |
102 |
103 | 104 |
105 |
106 |
107 |
108 |
109 | 110 |
111 | 112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.pretty/ESP-201.kicad_mod: -------------------------------------------------------------------------------- 1 | (module ESP-201 (layer F.Cu) (tedit 553C10CA) 2 | (descr "Module, ESP-8266, ESP-201, 26 pin, through hole, 0.1 inch") 3 | (tags "Module ESP-8266 ESP8266") 4 | (fp_text reference REF** (at 20.574 -7.366) (layer F.SilkS) 5 | (effects (font (size 1 1) (thickness 0.15))) 6 | ) 7 | (fp_text value ESP-201 (at 11.43 1.27) (layer F.Fab) 8 | (effects (font (size 1 1) (thickness 0.15))) 9 | ) 10 | (fp_line (start 5.842 -3.81) (end 16.002 -3.81) (layer F.CrtYd) (width 0.1524)) 11 | (fp_line (start 16.002 -3.81) (end 16.002 -1.27) (layer F.CrtYd) (width 0.1524)) 12 | (fp_line (start 16.002 -1.27) (end 5.842 -1.27) (layer F.CrtYd) (width 0.1524)) 13 | (fp_line (start 5.842 -1.27) (end 5.842 -3.81) (layer F.CrtYd) (width 0.1524)) 14 | (fp_line (start 24.13 26.67) (end 21.59 26.67) (layer F.CrtYd) (width 0.1524)) 15 | (fp_line (start 21.59 26.67) (end 21.59 -1.27) (layer F.CrtYd) (width 0.1524)) 16 | (fp_line (start 21.59 -1.27) (end 24.13 -1.27) (layer F.CrtYd) (width 0.1524)) 17 | (fp_line (start 24.13 -1.27) (end 24.13 26.67) (layer F.CrtYd) (width 0.1524)) 18 | (fp_line (start -1.27 26.67) (end 1.27 26.67) (layer F.CrtYd) (width 0.1524)) 19 | (fp_line (start 1.27 26.67) (end 1.27 -1.27) (layer F.CrtYd) (width 0.1524)) 20 | (fp_line (start 1.27 -1.27) (end -1.27 -1.27) (layer F.CrtYd) (width 0.1524)) 21 | (fp_line (start -1.27 -1.27) (end -1.27 26.67) (layer F.CrtYd) (width 0.1524)) 22 | (fp_line (start -1.27 -6.35) (end 24.13 -6.35) (layer F.Fab) (width 0.1524)) 23 | (fp_line (start 24.13 -6.35) (end 24.13 27.432) (layer F.Fab) (width 0.1524)) 24 | (fp_line (start 24.13 27.432) (end -1.27 27.432) (layer F.Fab) (width 0.1524)) 25 | (fp_line (start -1.27 27.432) (end -1.27 -6.35) (layer F.Fab) (width 0.1524)) 26 | (pad 1 thru_hole rect (at 0 0 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 27 | (pad 2 thru_hole circle (at 0 2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 28 | (pad 3 thru_hole circle (at 0 5.08 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 29 | (pad 4 thru_hole circle (at 0 7.62 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 30 | (pad 5 thru_hole circle (at 0 10.16 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 31 | (pad 6 thru_hole circle (at 0 12.7 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 32 | (pad 7 thru_hole circle (at 0 15.24 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 33 | (pad 8 thru_hole circle (at 0 17.78 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 34 | (pad 9 thru_hole circle (at 0 20.32 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 35 | (pad 10 thru_hole circle (at 0 22.86 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 36 | (pad 11 thru_hole circle (at 0 25.4 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 37 | (pad 12 thru_hole circle (at 22.86 25.4 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 38 | (pad 13 thru_hole circle (at 22.86 22.86 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 39 | (pad 14 thru_hole circle (at 22.86 20.32 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 40 | (pad 15 thru_hole circle (at 22.86 17.78 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 41 | (pad 16 thru_hole circle (at 22.86 15.24 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 42 | (pad 17 thru_hole circle (at 22.86 12.7 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 43 | (pad 18 thru_hole circle (at 22.86 10.16 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 44 | (pad 19 thru_hole circle (at 22.86 7.62 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 45 | (pad 20 thru_hole circle (at 22.86 5.08 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 46 | (pad 21 thru_hole circle (at 22.86 2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 47 | (pad 22 thru_hole circle (at 22.86 0 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 48 | (pad 23 thru_hole circle (at 14.732 -2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 49 | (pad 24 thru_hole circle (at 12.192 -2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 50 | (pad 25 thru_hole circle (at 9.652 -2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 51 | (pad 26 thru_hole circle (at 7.112 -2.54 90) (size 1.7272 1.7272) (drill 1.016) (layers *.Cu *.Mask F.SilkS)) 52 | ) 53 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/README.md: -------------------------------------------------------------------------------- 1 | kicad-ESP8266 - a library for KiCAD 2 | ===================================== 3 | This project has both schematic symbols, footprints, and 3d models for 4 | ESP8266 based modules. It is a work-in-progress. Additions and 5 | corrections are welcome. Enter a pull request or file an issue on 6 | GitHub. 7 | 8 | The present modules are: 9 | 10 | * ESP-01 - Note that there are two versions of this module available on 11 | open market. The schematic symbol is for the `v090` version 12 | which is probably the same as the `v080`. There is an older 13 | version that does not include any GPIO signals. The footprint 14 | is the same for all of the ESP-01 modules. 15 | 16 | * ESP-12 - This is includes an alias part, ESP-07v2, that is suitable 17 | for the 16 pin variant of the ESP-07. Note that there is a 14 18 | pin version of the ESP-07 that has different signals and 19 | pinout. The footprint for the ESP-12 (and ESP-07v2) 20 | elongated through-hole pads to match those modules. 21 | 22 | * ESP-201 - This is a 26 pin module with pins on 0.1 inch spacing. I 23 | could not find any official measurements for the pin 24 | locations so the footprint was created from empirical 25 | measurements on the unit I have. 26 | 27 | * ESP-12E - This is for the 22 pin variant of the ESP-12. Though all the 28 | esp-12 signals are in the same place on ESP-12E, pin numbers 29 | have changed. 30 | 31 | There are 3d models for the ESP-12 and the ESP-07v2. 32 | 33 | WARNINGS 34 | --------- 35 | 1. The symbols, footprints, and 3d models have not been tested. They are 36 | based on published images and measurements on individual samples. 37 | 38 | 2. The `.dcm` file contains HTML links to information on sites I used 39 | when creating this library, however I do not have any control over 40 | the sites themselves. Follow the links with caution. 41 | 42 | 3. This library distributed in the hope that it will be useful, 43 | but __WITHOUT ANY WARRANTY; without even the implied warranty of__ 44 | __MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE__. 45 | 46 | 47 | Use 48 | --- 49 | 1. Clone this archive to a convenient location on your computer. These are 50 | the commands I use on Linux to create a copy in 51 | `~/kicad/libraries/kicad-ESP8266`: 52 | 53 | mkdir -p ~/kicad/libraries/ 54 | cd ~/kicad/libraries/ 55 | git clone 56 | 57 | 2. Add `ESP8266.lib` to the Component Libraries: 58 | 59 | eeschema:Preferences->Component Libraries->Add 60 | 61 | 3. Add `ESP8266.pretty` to the Footprint Libraries: 62 | 63 | pcbnew:Preferences->Footprint Libraries Wizard 64 | 65 | 4. To make the 3d models usable, add the location from step #1 to list 66 | of configured paths as `ESPLIB`. Use a full path. Continuing with 67 | the example step #1: 68 | 69 | kicad:Preferences->Configure Paths->Add 70 | 71 | Name: ESPLIB 72 | Path: /home//kicad/libraries/kicad-ESP8266 73 | 74 | 75 | 3D Models 76 | --------- 77 | The 3D models were built using [OpenSCAD](http://www.openscad.org/) and 78 | then colored in [Wings3D](http://www.wings3d.com/) to produce the VRML 79 | (`.wrl`) format for KiCAD. Wings3D requires a binary STEP format, but 80 | OpenSCAD writes an ASCII version. 81 | [meshconv](http://www.cs.princeton.edu/~min/meshconv/) will convert the 82 | ASCII format to a binary format. 83 | 84 | Here is the workflow I used: 85 | 86 | 1. Use OpenScad to build the model. Export the model as STL. 87 | * Build using F6 88 | * File->Export...->Export as STL... 89 | 90 | 2. Use `meshconv` to translate the file to binary. 91 | 92 | $ meshconv -c stl -o 93 | 94 | 3. Now open Wings3d and import the the `FILENAME.stl` as a 95 | _StereoLithography Binary File (*.stl)_. 96 | 97 | 4. Assign colors. 98 | 99 | 5. Export as _VRML 2.0 File (*.wrl)_ 100 | 101 | 6. The 3D model probably needs to be scaled to match the footprint. Use 102 | the `kicad:Footprint Editor:Edit->Edit Properties->3D Settings` 103 | dialog. For the ESP-12, the `Shape Scale` X, Y, and Z values are 104 | 0.393700. 105 | 106 | This repository includes all the intermediate files: 107 | 108 | * `.scad` - OpenSCAD model 109 | * `.stl` - OpenSCAD STL 110 | * `_4wings.stl` - STL file converted by `meshconv` 111 | * `.wings` - Wings3D model 112 | * `.wrl` - VRML model for KiCAD 113 | 114 | 115 | License 116 | ------- 117 | Copyright 2015 J.Dunmire 118 | 119 | Contact: jedunmire PLUS kicad-ESP8266 AT gmail DOT com 120 | 121 | This file is part of kicad-ESP8266. 122 | 123 | kicad-ESP8266 is licensed under the Creative Commons Attribution-ShareAlike 124 | 4.0 International License. To view a copy of this license visit 125 | http://creativecommons.org/licenses/by-sa/4.0/. 126 | -------------------------------------------------------------------------------- /firmware/app/web_config.cpp: -------------------------------------------------------------------------------- 1 | #include "user_config.h" 2 | #include 3 | #include "AppSettings.h" 4 | #include "ota_update.h" 5 | #include "web_ipconfig.h" 6 | #include "uptime.h" 7 | #include "PowerManager.h" 8 | 9 | HttpServer server; 10 | FTPServer ftp; 11 | 12 | //Buttons: Power (14), Reset (16), 13 | //LEDs: HDD (4), Power (5) 14 | PowerManager pm(14, 16, 5, 4); 15 | Timer pm_timer; 16 | 17 | const char* alert_tmpl = "
%s
"; 18 | char buf[255]; 19 | 20 | void onIndex(HttpRequest &request, HttpResponse &response) 21 | { 22 | 23 | if (!check_auth(request, response)) 24 | return; 25 | 26 | TemplateFileStream *tmpl = new TemplateFileStream("status.html"); 27 | auto &vars = tmpl->variables(); 28 | vars["message"] = ""; 29 | vars["auth"] = request.getQueryParameter("auth", ""); 30 | vars["sw_ver"] = SW_VER; 31 | vars["hw_ver"] = HW_VER; 32 | 33 | vars["activity"] = pm.get_activity(); 34 | 35 | vars["power_state"] = pm.get_power_state() ? "On" : "Off"; 36 | 37 | if (WifiAccessPoint.isEnabled()) { 38 | vars["ap_ssid"] = AppSettings.ap_ssid; 39 | vars["ap_ip"] = WifiAccessPoint.getIP().toString(); 40 | } else { 41 | vars["ap_ssid"] = "N/A"; 42 | vars["ap_ip"] = "0.0.0.0"; 43 | } 44 | if (AppSettings.ap_password.length() == 0) 45 | vars["ap_password"] = "(none)"; 46 | else 47 | vars["ap_password"] = AppSettings.ap_password; 48 | 49 | vars["uptime"] = uptime_string(); 50 | 51 | if (WifiStation.isEnabled()) { 52 | vars["client_ssid"] = WifiStation.getSSID(); 53 | vars["client_ip"] = WifiStation.getIP().toString(); 54 | vars["client_gw_ip"] = WifiStation.getNetworkGateway().toString(); 55 | if (WifiStation.isConnected()) 56 | vars["client_status"] = "Connected"; 57 | else 58 | vars["client_status"] = "Not connected"; 59 | 60 | } else { 61 | vars["client_ssid"] = "N/A"; 62 | vars["client_ip"] = "0.0.0.0"; 63 | vars["client_status"] = "Not connected"; 64 | } 65 | 66 | if (request.getRequestMethod() == RequestMethod::POST) 67 | { 68 | if (request.getPostParameter("power_on").length() > 0) 69 | { 70 | sprintf(buf, alert_tmpl, "Powering on"); 71 | vars["message"] = buf; 72 | pm.power_on(); 73 | } 74 | else if (request.getPostParameter("power_off").length() > 0) 75 | { 76 | sprintf(buf, alert_tmpl, "Powering off"); 77 | vars["message"] = buf; 78 | pm.power_off(); 79 | } 80 | else if (request.getPostParameter("reset").length() > 0) 81 | { 82 | sprintf(buf, alert_tmpl, "Restarting"); 83 | vars["message"] = buf; 84 | pm.reset(); 85 | } 86 | } 87 | 88 | response.sendTemplate(tmpl); // will be automatically deleted 89 | } 90 | 91 | void startWebServer() 92 | { 93 | server.listen(80); 94 | server.addPath("/", onIndex); 95 | 96 | server.addPath("/networks", onIpConfig); 97 | server.addPath("/settings", onSettings); 98 | 99 | server.addPath("/ajax/get-networks", onAjaxNetworkList); 100 | server.addPath("/ajax/connect", onAjaxConnect); 101 | server.setDefaultHandler(onFile); 102 | } 103 | 104 | void startFTP() 105 | { 106 | if (!fileExist("status.html")) 107 | fileSetContent("status.html", "

Please connect to FTP and upload files from folder 'web/build' (details in code)

"); 108 | 109 | // Start FTP server 110 | ftp.listen(21); 111 | ftp.addUser("me", "123"); // FTP account 112 | } 113 | 114 | // Will be called when system initialization was completed 115 | void startServers() 116 | { 117 | startFTP(); 118 | startWebServer(); 119 | } 120 | 121 | void timer_callback() 122 | { 123 | pm.update(); 124 | } 125 | 126 | void webserver_init() 127 | { 128 | 129 | uptime_init(); 130 | 131 | WifiStation.enable(true); 132 | 133 | if (AppSettings.exist() && AppSettings.ssid.length() != 0 && \ 134 | AppSettings.password.length() >= 8) 135 | { 136 | WifiStation.config(AppSettings.ssid, AppSettings.password); 137 | if (!AppSettings.dhcp && !AppSettings.ip.isNull()) 138 | WifiStation.setIP(AppSettings.ip, AppSettings.netmask, AppSettings.gateway); 139 | } 140 | 141 | 142 | WifiStation.startScan(networkScanCompleted); 143 | 144 | if (AppSettings.ap_ssid.length() == 0) { 145 | //autogenerated SSID 146 | AppSettings.ap_ssid = "ESP-Power-" + WifiAccessPoint.getMAC(); 147 | AppSettings.save(); 148 | } 149 | 150 | // Start AP for configuration 151 | 152 | WifiAccessPoint.enable(true); 153 | AUTH_MODE mode = AUTH_OPEN; 154 | String password = ""; 155 | 156 | if (AppSettings.ap_password.length() >= 8) { 157 | mode = AUTH_WPA2_PSK; 158 | password = AppSettings.ap_password; 159 | } 160 | 161 | WifiAccessPoint.config(AppSettings.ap_ssid, password, mode); 162 | 163 | // Run WEB server on system ready 164 | System.onReady(startServers); 165 | pm_timer.initializeMs(10, timer_callback).start(); 166 | } 167 | 168 | 169 | -------------------------------------------------------------------------------- /hardware/kicad-ESP8266/ESP8266.lib: -------------------------------------------------------------------------------- 1 | EESchema-LIBRARY Version 2.3 2 | #encoding utf-8 3 | # 4 | # ESP-01v090 5 | # 6 | DEF ESP-01v090 U 0 40 Y Y 1 F N 7 | F0 "U" 0 -100 50 H V C CNN 8 | F1 "ESP-01v090" 0 100 50 H V C CNN 9 | F2 "" 0 0 50 H I C CNN 10 | F3 "" 0 0 50 H I C CNN 11 | $FPLIST 12 | ESP-01* 13 | $ENDFPLIST 14 | DRAW 15 | S -650 -350 650 350 1 0 0 N 16 | X UTXD 1 -950 150 300 R 50 50 1 1 O 17 | X GND 2 950 150 300 L 50 50 1 1 W 18 | X CH_PD 3 -950 50 300 R 50 50 1 1 I 19 | X GPIO2 4 950 50 300 L 50 50 1 1 T 20 | X RST 5 -950 -50 300 R 50 50 1 1 I 21 | X GPIO0 6 950 -50 300 L 50 50 1 1 T 22 | X VCC 7 -950 -150 300 R 50 50 1 1 W 23 | X URXD 8 950 -150 300 L 50 50 1 1 I 24 | ENDDRAW 25 | ENDDEF 26 | # 27 | # ESP-12 28 | # 29 | DEF ESP-12 U 0 40 Y Y 1 F N 30 | F0 "U" 0 -100 50 H V C CNN 31 | F1 "ESP-12" 0 100 50 H V C CNN 32 | F2 "" 0 0 50 H I C CNN 33 | F3 "" 0 0 50 H I C CNN 34 | ALIAS ESP-07v2 35 | $FPLIST 36 | ESP-07* 37 | ESP-12* 38 | $ENDFPLIST 39 | DRAW 40 | S -600 -600 600 600 1 0 0 N 41 | X REST 1 -900 300 300 R 50 50 1 1 I 42 | X ADC 2 -900 200 300 R 50 50 1 1 P 43 | X CH_PD 3 -900 100 300 R 50 50 1 1 I 44 | X GPIO16 4 -900 0 300 R 50 50 1 1 B 45 | X GPIO14 5 -900 -100 300 R 50 50 1 1 B 46 | X GPIO12 6 -900 -200 300 R 50 50 1 1 B 47 | X GPIO13 7 -900 -300 300 R 50 50 1 1 B 48 | X VCC 8 0 900 300 D 50 50 1 1 W 49 | X GND 9 0 -900 300 U 50 50 1 1 W 50 | X GPIO15 10 900 -300 300 L 50 50 1 1 B 51 | X GPIO2 11 900 -200 300 L 50 50 1 1 B 52 | X GPIO0 12 900 -100 300 L 50 50 1 1 B 53 | X GPIO5 13 900 0 300 L 50 50 1 1 B 54 | X GPIO4 14 900 100 300 L 50 50 1 1 B 55 | X RXD 15 900 200 300 L 50 50 1 1 I 56 | X TXD 16 900 300 300 L 50 50 1 1 O 57 | ENDDRAW 58 | ENDDEF 59 | # 60 | # ESP-12E 61 | # 62 | DEF ESP-12E U 0 40 Y Y 1 F N 63 | F0 "U" 0 -100 50 H V C CNN 64 | F1 "ESP-12E" 0 100 50 H V C CNN 65 | F2 "" 0 0 50 H I C CNN 66 | F3 "" 0 0 50 H I C CNN 67 | $FPLIST 68 | ESP-12E 69 | $ENDFPLIST 70 | DRAW 71 | S -600 -600 600 600 1 0 0 N 72 | X REST 1 -900 300 300 R 50 50 1 1 I 73 | X ADC 2 -900 200 300 R 50 50 1 1 P 74 | X CH_PD 3 -900 100 300 R 50 50 1 1 I 75 | X GPIO16 4 -900 0 300 R 50 50 1 1 B 76 | X GPIO14 5 -900 -100 300 R 50 50 1 1 B 77 | X GPIO12 6 -900 -200 300 R 50 50 1 1 B 78 | X GPIO13 7 -900 -300 300 R 50 50 1 1 B 79 | X VCC 8 -900 -400 300 R 50 50 1 1 W 80 | X CS0 9 -250 -900 300 U 50 50 1 1 B 81 | X MISO 10 -150 -900 300 U 50 50 1 1 B 82 | X GPIO5 20 900 100 300 L 50 50 1 1 B 83 | X GPIO9 11 -50 -900 300 U 50 50 1 1 B 84 | X RXD 21 900 200 300 L 50 50 1 1 I 85 | X GPIO10 12 50 -900 300 U 50 50 1 1 B 86 | X TXD 22 900 300 300 L 50 50 1 1 O 87 | X MOSI 13 150 -900 300 U 50 50 1 1 B 88 | X SCLK 14 250 -900 300 U 50 50 1 1 B 89 | X GND 15 900 -400 300 L 50 50 1 1 W 90 | X GPIO15 16 900 -300 300 L 50 50 1 1 B 91 | X GPIO2 17 900 -200 300 L 50 50 1 1 B 92 | X GPIO0 18 900 -100 300 L 50 50 1 1 B 93 | X GPIO4 19 900 0 300 L 50 50 1 1 B 94 | ENDDRAW 95 | ENDDEF 96 | # 97 | # ESP-13-WROOM-02 98 | # 99 | DEF ESP-13-WROOM-02 U 0 40 Y Y 1 F N 100 | F0 "U" 0 -100 50 H V C CNN 101 | F1 "ESP-13-WROOM-02" 0 450 50 H V C CNN 102 | F2 "" -100 0 50 H I C CNN 103 | F3 "" -100 0 50 H I C CNN 104 | $FPLIST 105 | ESP-13* 106 | $ENDFPLIST 107 | DRAW 108 | S -700 -700 650 600 1 0 0 N 109 | X VCC 1 -1000 300 300 R 50 50 1 1 I 110 | X EN 2 -1000 200 300 R 50 50 1 1 P 111 | X GPIO14 3 -1000 100 300 R 50 50 1 1 I 112 | X GPIO12 4 -1000 0 300 R 50 50 1 1 B 113 | X GPIO13 5 -1000 -100 300 R 50 50 1 1 B 114 | X GPIO15 6 -1000 -200 300 R 50 50 1 1 B 115 | X GPIO2 7 -1000 -300 300 R 50 50 1 1 B 116 | X GPIO0 8 -1000 -400 300 R 50 50 1 1 B 117 | X GND 9 -1000 -500 300 R 50 50 1 1 B 118 | X GPIO4 10 950 -500 300 L 50 50 1 1 B 119 | X RXD 11 950 -400 300 L 50 50 1 1 B 120 | X TXD 12 950 -300 300 L 50 50 1 1 B 121 | X GND 13 950 -200 300 L 50 50 1 1 B 122 | X GPIO5 14 950 -100 300 L 50 50 1 1 B 123 | X RST 15 950 0 300 L 50 50 1 1 I 124 | X TOUT 16 950 100 300 L 50 50 1 1 O 125 | X GPIO16 17 950 200 300 L 50 50 1 1 B 126 | X GND 18 950 300 300 L 50 50 1 1 B 127 | ENDDRAW 128 | ENDDEF 129 | # 130 | # ESP-201 131 | # 132 | DEF ESP-201 U 0 40 Y Y 1 F N 133 | F0 "U" 0 -100 50 H V C CNN 134 | F1 "ESP-201" 0 100 50 H V C CNN 135 | F2 "" 0 0 50 H I C CNN 136 | F3 "" 0 0 50 H I C CNN 137 | $FPLIST 138 | ESP-201* 139 | $ENDFPLIST 140 | DRAW 141 | S -850 -700 850 700 1 0 0 N 142 | X GPIO0 1 -1150 500 300 R 50 50 1 1 B 143 | X GPIO2 2 -1150 400 300 R 50 50 1 1 B 144 | X D2/GPIO9 3 -1150 300 300 R 50 50 1 1 O 145 | X CLK/GPIO6 4 -1150 200 300 R 50 50 1 1 O 146 | X CMD/GPIO11 5 -1150 100 300 R 50 50 1 1 O 147 | X D0/GPIO7 6 -1150 0 300 R 50 50 1 1 O 148 | X D1/GPIO8 7 -1150 -100 300 R 50 50 1 1 O 149 | X D3/GPIO10 8 -1150 -200 300 R 50 50 1 1 O 150 | X GPIO4 9 -1150 -300 300 R 50 50 1 1 B 151 | X 3.3V 10 -1150 -400 300 R 50 50 1 1 W 152 | X GPIO12 20 1150 300 300 L 50 50 1 1 B 153 | X 3.3V 11 -1150 -500 300 R 50 50 1 1 W 154 | X GPIO13 21 1150 400 300 L 50 50 1 1 B 155 | X GND 12 1150 -500 300 L 50 50 1 1 W 156 | X GPIO15 22 1150 500 300 L 50 50 1 1 B 157 | X GND 13 1150 -400 300 L 50 50 1 1 W 158 | X GND 23 150 1000 300 D 50 50 1 1 W 159 | X GPIO5 14 1150 -300 300 L 50 50 1 1 B 160 | X TX 24 50 1000 300 D 50 50 1 1 O 161 | X T_OUT/ADC 15 1150 -200 300 L 50 50 1 1 B 162 | X RX 25 -50 1000 300 D 50 50 1 1 I 163 | X RST 16 1150 -100 300 L 50 50 1 1 I 164 | X 3.3V 26 -150 1000 300 D 50 50 1 1 W 165 | X CHIP_EN 17 1150 0 300 L 50 50 1 1 I 166 | X XPD/GPIO16 18 1150 100 300 L 50 50 1 1 B 167 | X GPIO14 19 1150 200 300 L 50 50 1 1 B 168 | ENDDRAW 169 | ENDDEF 170 | # 171 | #End Library 172 | -------------------------------------------------------------------------------- /firmware/rom0.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40202010, len = 0x78000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | EXTERN(_DebugExceptionVector) 24 | EXTERN(_DoubleExceptionVector) 25 | EXTERN(_KernelExceptionVector) 26 | EXTERN(_NMIExceptionVector) 27 | EXTERN(_UserExceptionVector) 28 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 29 | /* Various memory-map dependent cache attribute settings: */ 30 | _memmap_cacheattr_wb_base = 0x00000110; 31 | _memmap_cacheattr_wt_base = 0x00000110; 32 | _memmap_cacheattr_bp_base = 0x00000220; 33 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 34 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 35 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 36 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 37 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 38 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 39 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 40 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 41 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 42 | _memmap_cacheattr_wb_allvalid = 0x22222112; 43 | _memmap_cacheattr_wt_allvalid = 0x22222112; 44 | _memmap_cacheattr_bp_allvalid = 0x22222222; 45 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 46 | 47 | SECTIONS 48 | { 49 | 50 | .dport0.rodata : ALIGN(4) 51 | { 52 | _dport0_rodata_start = ABSOLUTE(.); 53 | *(.dport0.rodata) 54 | *(.dport.rodata) 55 | _dport0_rodata_end = ABSOLUTE(.); 56 | } >dport0_0_seg :dport0_0_phdr 57 | 58 | .dport0.literal : ALIGN(4) 59 | { 60 | _dport0_literal_start = ABSOLUTE(.); 61 | *(.dport0.literal) 62 | *(.dport.literal) 63 | _dport0_literal_end = ABSOLUTE(.); 64 | } >dport0_0_seg :dport0_0_phdr 65 | 66 | .dport0.data : ALIGN(4) 67 | { 68 | _dport0_data_start = ABSOLUTE(.); 69 | *(.dport0.data) 70 | *(.dport.data) 71 | _dport0_data_end = ABSOLUTE(.); 72 | } >dport0_0_seg :dport0_0_phdr 73 | 74 | .data : ALIGN(4) 75 | { 76 | _data_start = ABSOLUTE(.); 77 | *(.data) 78 | *(.data.*) 79 | *(.gnu.linkonce.d.*) 80 | *(.data1) 81 | *(.sdata) 82 | *(.sdata.*) 83 | *(.gnu.linkonce.s.*) 84 | *(.sdata2) 85 | *(.sdata2.*) 86 | *(.gnu.linkonce.s2.*) 87 | *(.jcr) 88 | _data_end = ABSOLUTE(.); 89 | } >dram0_0_seg :dram0_0_phdr 90 | 91 | .rodata : ALIGN(4) 92 | { 93 | _rodata_start = ABSOLUTE(.); 94 | *(.sdk.version) 95 | *(.rodata) 96 | *(.rodata.*) 97 | *(.gnu.linkonce.r.*) 98 | *(.rodata1) 99 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 100 | *(.xt_except_table) 101 | *(.gcc_except_table) 102 | *(.gnu.linkonce.e.*) 103 | *(.gnu.version_r) 104 | *(.eh_frame) 105 | . = (. + 3) & ~ 3; 106 | /* C++ constructor and destructor tables, properly ordered: */ 107 | __dso_handle = ABSOLUTE(.); 108 | __init_array_start = ABSOLUTE(.); 109 | KEEP (*crtbegin.o(.ctors)) 110 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 111 | KEEP (*(SORT(.ctors.*))) 112 | KEEP (*(.ctors)) 113 | __init_array_end = ABSOLUTE(.); 114 | KEEP (*crtbegin.o(.dtors)) 115 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 116 | KEEP (*(SORT(.dtors.*))) 117 | KEEP (*(.dtors)) 118 | /* C++ exception handlers table: */ 119 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 120 | *(.xt_except_desc) 121 | *(.gnu.linkonce.h.*) 122 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 123 | *(.xt_except_desc_end) 124 | *(.dynamic) 125 | *(.gnu.version_d) 126 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 127 | _bss_table_start = ABSOLUTE(.); 128 | LONG(_bss_start) 129 | LONG(_bss_end) 130 | _bss_table_end = ABSOLUTE(.); 131 | _rodata_end = ABSOLUTE(.); 132 | } >dram0_0_seg :dram0_0_phdr 133 | 134 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 135 | { 136 | . = ALIGN (8); 137 | _bss_start = ABSOLUTE(.); 138 | *(.dynsbss) 139 | *(.sbss) 140 | *(.sbss.*) 141 | *(.gnu.linkonce.sb.*) 142 | *(.scommon) 143 | *(.sbss2) 144 | *(.sbss2.*) 145 | *(.gnu.linkonce.sb2.*) 146 | *(.dynbss) 147 | *(.bss) 148 | *(.bss.*) 149 | *(.gnu.linkonce.b.*) 150 | *(COMMON) 151 | . = ALIGN (8); 152 | _bss_end = ABSOLUTE(.); 153 | _heap_start = ABSOLUTE(.); 154 | /* _stack_sentry = ALIGN(0x8); */ 155 | } >dram0_0_seg :dram0_0_bss_phdr 156 | /* __stack = 0x3ffc8000; */ 157 | 158 | .irom0.text : ALIGN(4) 159 | { 160 | _irom0_text_start = ABSOLUTE(.); 161 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 162 | out/build/app_app.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 163 | *libsming.a:*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 164 | _irom0_text_end = ABSOLUTE(.); 165 | _flash_code_end = ABSOLUTE(.); 166 | } >irom0_0_seg :irom0_0_phdr 167 | 168 | .text : ALIGN(4) 169 | { 170 | _stext = .; 171 | _text_start = ABSOLUTE(.); 172 | *(.UserEnter.text) 173 | . = ALIGN(16); 174 | *(.DebugExceptionVector.text) 175 | . = ALIGN(16); 176 | *(.NMIExceptionVector.text) 177 | . = ALIGN(16); 178 | *(.KernelExceptionVector.text) 179 | LONG(0) 180 | LONG(0) 181 | LONG(0) 182 | LONG(0) 183 | . = ALIGN(16); 184 | *(.UserExceptionVector.text) 185 | LONG(0) 186 | LONG(0) 187 | LONG(0) 188 | LONG(0) 189 | . = ALIGN(16); 190 | *(.DoubleExceptionVector.text) 191 | LONG(0) 192 | LONG(0) 193 | LONG(0) 194 | LONG(0) 195 | . = ALIGN (16); 196 | *(.entry.text) 197 | *(.init.literal) 198 | *(.init) 199 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 200 | *(.iram.literal .iram.text.literal .iram.text) 201 | *(.fini.literal) 202 | *(.fini) 203 | *(.gnu.version) 204 | _text_end = ABSOLUTE(.); 205 | _etext = .; 206 | } >iram1_0_seg :iram1_0_phdr 207 | 208 | .lit4 : ALIGN(4) 209 | { 210 | _lit4_start = ABSOLUTE(.); 211 | *(*.lit4) 212 | *(.lit4.*) 213 | *(.gnu.linkonce.lit4.*) 214 | _lit4_end = ABSOLUTE(.); 215 | } >iram1_0_seg :iram1_0_phdr 216 | } 217 | 218 | /* get ROM code address */ 219 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 220 | -------------------------------------------------------------------------------- /firmware/app/web_ipconfig.cpp: -------------------------------------------------------------------------------- 1 | #include "user_config.h" 2 | #include 3 | #include "AppSettings.h" 4 | #include "ota_update.h" 5 | 6 | #include "web_ipconfig.h" 7 | 8 | BssList networks; 9 | String network, password; 10 | Timer connectionTimer; 11 | 12 | Timer restartTimer; 13 | 14 | void settingsRestart() 15 | { 16 | System.restart(); 17 | } 18 | 19 | bool check_auth(HttpRequest &request, HttpResponse &response) 20 | { 21 | String auth = request.getQueryParameter("auth", ""); 22 | if (auth != AppSettings.auth_password) 23 | { 24 | TemplateFileStream *tmpl = new TemplateFileStream("forbidden.html"); 25 | response.sendTemplate(tmpl); // will be automatically deleted 26 | return false; 27 | } 28 | return true; 29 | } 30 | 31 | 32 | void onSettings(HttpRequest &request, HttpResponse &response) { 33 | 34 | if (!check_auth(request, response)) 35 | return; 36 | 37 | 38 | TemplateFileStream *tmpl = new TemplateFileStream("settings.html"); 39 | auto &vars = tmpl->variables(); 40 | 41 | vars["auth"] = request.getQueryParameter("auth", ""); 42 | if (request.getRequestMethod() == RequestMethod::POST) 43 | { 44 | AppSettings.ota_link = request.getPostParameter("ota_link"); 45 | AppSettings.auth_password = request.getPostParameter("auth_password"); 46 | if (request.getPostParameter("do_update").length() > 0) 47 | { 48 | ota_update(); 49 | vars["message"] = "Trying to update firmware. Please wait 60 seconds and reload this page..."; 50 | } 51 | 52 | if (request.getPostParameter("save_reboot").length() > 0) 53 | { 54 | restartTimer.initializeMs(1000, settingsRestart).startOnce(); 55 | vars["message"] = "Device is now being restarted..."; 56 | } 57 | } 58 | else 59 | { 60 | vars["message"] = "Settings will be applied after restart"; 61 | } 62 | 63 | 64 | vars["ota_link"] = AppSettings.ota_link; 65 | vars["auth_password"] = AppSettings.auth_password; 66 | 67 | vars["sw_ver"] = SW_VER; 68 | vars["hw_ver"] = HW_VER; 69 | 70 | response.sendTemplate(tmpl); // will be automatically deleted 71 | 72 | //save settings, reboot if neccessary 73 | AppSettings.save(); 74 | } 75 | 76 | void onIpConfig(HttpRequest &request, HttpResponse &response) 77 | { 78 | 79 | if (!check_auth(request, response)) 80 | return; 81 | 82 | if (request.getRequestMethod() == RequestMethod::POST) 83 | { 84 | AppSettings.dhcp = request.getPostParameter("dhcp") == "1"; 85 | AppSettings.ip = request.getPostParameter("ip"); 86 | AppSettings.netmask = request.getPostParameter("netmask"); 87 | AppSettings.gateway = request.getPostParameter("gateway"); 88 | 89 | AppSettings.ap_ssid = request.getPostParameter("ap_ssid"); 90 | 91 | if (request.getPostParameter("ap_password").length() >= 8) 92 | AppSettings.ap_password = request.getPostParameter("ap_password"); 93 | 94 | debugf("Updating IP settings: %d", AppSettings.ip.isNull()); 95 | 96 | AppSettings.save(); 97 | } 98 | 99 | TemplateFileStream *tmpl = new TemplateFileStream("networks.html"); 100 | auto &vars = tmpl->variables(); 101 | 102 | vars["auth"] = request.getQueryParameter("auth", ""); 103 | bool dhcp = WifiStation.isEnabledDHCP(); 104 | 105 | 106 | 107 | vars["dhcpon"] = dhcp ? "checked='checked'" : ""; 108 | vars["dhcpoff"] = !dhcp ? "checked='checked'" : ""; 109 | vars["ap_ssid"] = AppSettings.ap_ssid; 110 | vars["ap_password"] = AppSettings.ap_password; 111 | 112 | if (!WifiStation.getIP().isNull()) 113 | { 114 | vars["ip"] = WifiStation.getIP().toString(); 115 | vars["netmask"] = WifiStation.getNetworkMask().toString(); 116 | vars["gateway"] = WifiStation.getNetworkGateway().toString(); 117 | } 118 | else 119 | { 120 | vars["ip"] = "0.0.0.0"; 121 | vars["netmask"] = "255.255.255.0"; 122 | vars["gateway"] = "0.0.0.0"; 123 | } 124 | response.sendTemplate(tmpl); // will be automatically deleted 125 | } 126 | 127 | void onFile(HttpRequest &request, HttpResponse &response) 128 | { 129 | String file = request.getPath(); 130 | if (file[0] == '/') 131 | file = file.substring(1); 132 | 133 | if (file[0] == '.') 134 | response.forbidden(); 135 | else 136 | { 137 | response.setCache(86400, true); // It's important to use cache for better performance. 138 | response.sendFile(file); 139 | } 140 | } 141 | 142 | 143 | void onAjaxNetworkList(HttpRequest &request, HttpResponse &response) 144 | { 145 | JsonObjectStream* stream = new JsonObjectStream(); 146 | JsonObject& json = stream->getRoot(); 147 | 148 | json["status"] = (bool)true; 149 | 150 | bool connected = WifiStation.isConnected(); 151 | json["connected"] = connected; 152 | if (connected) 153 | { 154 | // Copy full string to JSON buffer memory 155 | json["network"]= WifiStation.getSSID(); 156 | } 157 | 158 | JsonArray& netlist = json.createNestedArray("available"); 159 | for (int i = 0; i < networks.count(); i++) 160 | { 161 | if (networks[i].hidden) continue; 162 | JsonObject &item = netlist.createNestedObject(); 163 | item["id"] = (int)networks[i].getHashId(); 164 | // Copy full string to JSON buffer memory 165 | item["title"] = networks[i].ssid; 166 | item["signal"] = networks[i].rssi; 167 | item["encryption"] = networks[i].getAuthorizationMethodName(); 168 | } 169 | 170 | response.setAllowCrossDomainOrigin("*"); 171 | response.sendJsonObject(stream); 172 | } 173 | 174 | void makeConnection() 175 | { 176 | WifiStation.enable(true); 177 | WifiStation.config(network, password); 178 | 179 | AppSettings.ssid = network; 180 | AppSettings.password = password; 181 | AppSettings.save(); 182 | 183 | network = ""; // task completed 184 | } 185 | 186 | void onAjaxConnect(HttpRequest &request, HttpResponse &response) 187 | { 188 | JsonObjectStream* stream = new JsonObjectStream(); 189 | JsonObject& json = stream->getRoot(); 190 | 191 | String curNet = request.getPostParameter("network"); 192 | String curPass = request.getPostParameter("password"); 193 | 194 | bool updating = curNet.length() > 0 && (WifiStation.getSSID() != curNet || WifiStation.getPassword() != curPass); 195 | bool connectingNow = WifiStation.getConnectionStatus() == eSCS_Connecting || network.length() > 0; 196 | 197 | if (updating && connectingNow) 198 | { 199 | debugf("wrong action: %s %s, (updating: %d, connectingNow: %d)", network.c_str(), password.c_str(), updating, connectingNow); 200 | json["status"] = (bool)false; 201 | json["connected"] = (bool)false; 202 | } 203 | else 204 | { 205 | json["status"] = (bool)true; 206 | if (updating) 207 | { 208 | network = curNet; 209 | password = curPass; 210 | debugf("CONNECT TO: %s %s", network.c_str(), password.c_str()); 211 | json["connected"] = false; 212 | connectionTimer.initializeMs(1200, makeConnection).startOnce(); 213 | } 214 | else 215 | { 216 | json["connected"] = WifiStation.isConnected(); 217 | debugf("Network already selected. Current status: %s", WifiStation.getConnectionStatusName()); 218 | } 219 | } 220 | 221 | if (!updating && !connectingNow && WifiStation.isConnectionFailed()) 222 | json["error"] = WifiStation.getConnectionStatusName(); 223 | 224 | response.setAllowCrossDomainOrigin("*"); 225 | response.sendJsonObject(stream); 226 | } 227 | 228 | void networkScanCompleted(bool succeeded, BssList list) 229 | { 230 | if (succeeded) 231 | { 232 | for (int i = 0; i < list.count(); i++) 233 | if (!list[i].hidden && list[i].ssid.length() > 0) 234 | networks.add(list[i]); 235 | } 236 | networks.sort([](const BssInfo& a, const BssInfo& b){ return b.rssi - a.rssi; } ); 237 | } 238 | -------------------------------------------------------------------------------- /firmware/web/dev/style.css: -------------------------------------------------------------------------------- 1 | #floatingCirclesG{ 2 | position:absolute; 3 | z-index: 100; 4 | width:50px; 5 | height:50px; 6 | top: 50px; 7 | left: 50%; 8 | -moz-transform:scale(0.6); 9 | -webkit-transform:scale(0.6); 10 | -ms-transform:scale(0.6); 11 | -o-transform:scale(0.6); 12 | transform:scale(0.6); 13 | } 14 | 15 | .f_circleG{ 16 | position:absolute; 17 | background-color:#FFFFFF; 18 | height:9px; 19 | width:9px; 20 | -moz-border-radius:5px; 21 | -moz-animation-name:f_fadeG; 22 | -moz-animation-duration:1.04s; 23 | -moz-animation-iteration-count:infinite; 24 | -moz-animation-direction:normal; 25 | -webkit-border-radius:5px; 26 | -webkit-animation-name:f_fadeG; 27 | -webkit-animation-duration:1.04s; 28 | -webkit-animation-iteration-count:infinite; 29 | -webkit-animation-direction:normal; 30 | -ms-border-radius:5px; 31 | -ms-animation-name:f_fadeG; 32 | -ms-animation-duration:1.04s; 33 | -ms-animation-iteration-count:infinite; 34 | -ms-animation-direction:normal; 35 | -o-border-radius:5px; 36 | -o-animation-name:f_fadeG; 37 | -o-animation-duration:1.04s; 38 | -o-animation-iteration-count:infinite; 39 | -o-animation-direction:normal; 40 | border-radius:5px; 41 | animation-name:f_fadeG; 42 | animation-duration:1.04s; 43 | animation-iteration-count:infinite; 44 | animation-direction:normal; 45 | } 46 | 47 | #frotateG_01{ 48 | left:0; 49 | top:20px; 50 | -moz-animation-delay:0.39s; 51 | -webkit-animation-delay:0.39s; 52 | -ms-animation-delay:0.39s; 53 | -o-animation-delay:0.39s; 54 | animation-delay:0.39s; 55 | } 56 | 57 | #frotateG_02{ 58 | left:6px; 59 | top:6px; 60 | -moz-animation-delay:0.52s; 61 | -webkit-animation-delay:0.52s; 62 | -ms-animation-delay:0.52s; 63 | -o-animation-delay:0.52s; 64 | animation-delay:0.52s; 65 | } 66 | 67 | #frotateG_03{ 68 | left:20px; 69 | top:0; 70 | -moz-animation-delay:0.65s; 71 | -webkit-animation-delay:0.65s; 72 | -ms-animation-delay:0.65s; 73 | -o-animation-delay:0.65s; 74 | animation-delay:0.65s; 75 | } 76 | 77 | #frotateG_04{ 78 | right:6px; 79 | top:6px; 80 | -moz-animation-delay:0.78s; 81 | -webkit-animation-delay:0.78s; 82 | -ms-animation-delay:0.78s; 83 | -o-animation-delay:0.78s; 84 | animation-delay:0.78s; 85 | } 86 | 87 | #frotateG_05{ 88 | right:0; 89 | top:20px; 90 | -moz-animation-delay:0.91s; 91 | -webkit-animation-delay:0.91s; 92 | -ms-animation-delay:0.91s; 93 | -o-animation-delay:0.91s; 94 | animation-delay:0.91s; 95 | } 96 | 97 | #frotateG_06{ 98 | right:6px; 99 | bottom:6px; 100 | -moz-animation-delay:1.04s; 101 | -webkit-animation-delay:1.04s; 102 | -ms-animation-delay:1.04s; 103 | -o-animation-delay:1.04s; 104 | animation-delay:1.04s; 105 | } 106 | 107 | #frotateG_07{ 108 | left:20px; 109 | bottom:0; 110 | -moz-animation-delay:1.17s; 111 | -webkit-animation-delay:1.17s; 112 | -ms-animation-delay:1.17s; 113 | -o-animation-delay:1.17s; 114 | animation-delay:1.17s; 115 | } 116 | 117 | #frotateG_08{ 118 | left:6px; 119 | bottom:6px; 120 | -moz-animation-delay:1.3s; 121 | -webkit-animation-delay:1.3s; 122 | -ms-animation-delay:1.3s; 123 | -o-animation-delay:1.3s; 124 | animation-delay:1.3s; 125 | } 126 | 127 | @-moz-keyframes f_fadeG{ 128 | 0%{ 129 | background-color:#000000} 130 | 131 | 100%{ 132 | background-color:#FFFFFF} 133 | 134 | } 135 | 136 | @-webkit-keyframes f_fadeG{ 137 | 0%{ 138 | background-color:#000000} 139 | 140 | 100%{ 141 | background-color:#FFFFFF} 142 | 143 | } 144 | 145 | @-ms-keyframes f_fadeG{ 146 | 0%{ 147 | background-color:#000000} 148 | 149 | 100%{ 150 | background-color:#FFFFFF} 151 | 152 | } 153 | 154 | @-o-keyframes f_fadeG{ 155 | 0%{ 156 | background-color:#000000} 157 | 158 | 100%{ 159 | background-color:#FFFFFF} 160 | 161 | } 162 | 163 | @keyframes f_fadeG{ 164 | 0%{ 165 | background-color:#000000} 166 | 167 | 100%{ 168 | background-color:#FFFFFF} 169 | 170 | } 171 | 172 | #circularG{ 173 | position:relative; 174 | width:30px; 175 | height:30px} 176 | 177 | .circularG{ 178 | position:absolute; 179 | background-color:#000000; 180 | width:7px; 181 | height:7px; 182 | -moz-border-radius:5px; 183 | -moz-animation-name:bounce_circularG; 184 | -moz-animation-duration:1.04s; 185 | -moz-animation-iteration-count:infinite; 186 | -moz-animation-direction:normal; 187 | -webkit-border-radius:5px; 188 | -webkit-animation-name:bounce_circularG; 189 | -webkit-animation-duration:1.04s; 190 | -webkit-animation-iteration-count:infinite; 191 | -webkit-animation-direction:normal; 192 | -ms-border-radius:5px; 193 | -ms-animation-name:bounce_circularG; 194 | -ms-animation-duration:1.04s; 195 | -ms-animation-iteration-count:infinite; 196 | -ms-animation-direction:normal; 197 | -o-border-radius:5px; 198 | -o-animation-name:bounce_circularG; 199 | -o-animation-duration:1.04s; 200 | -o-animation-iteration-count:infinite; 201 | -o-animation-direction:normal; 202 | border-radius:5px; 203 | animation-name:bounce_circularG; 204 | animation-duration:1.04s; 205 | animation-iteration-count:infinite; 206 | animation-direction:normal; 207 | } 208 | 209 | #circularG_1{ 210 | left:0; 211 | top:12px; 212 | -moz-animation-delay:0.39s; 213 | -webkit-animation-delay:0.39s; 214 | -ms-animation-delay:0.39s; 215 | -o-animation-delay:0.39s; 216 | animation-delay:0.39s; 217 | } 218 | 219 | #circularG_2{ 220 | left:3px; 221 | top:3px; 222 | -moz-animation-delay:0.52s; 223 | -webkit-animation-delay:0.52s; 224 | -ms-animation-delay:0.52s; 225 | -o-animation-delay:0.52s; 226 | animation-delay:0.52s; 227 | } 228 | 229 | #circularG_3{ 230 | top:0; 231 | left:12px; 232 | -moz-animation-delay:0.65s; 233 | -webkit-animation-delay:0.65s; 234 | -ms-animation-delay:0.65s; 235 | -o-animation-delay:0.65s; 236 | animation-delay:0.65s; 237 | } 238 | 239 | #circularG_4{ 240 | right:3px; 241 | top:3px; 242 | -moz-animation-delay:0.78s; 243 | -webkit-animation-delay:0.78s; 244 | -ms-animation-delay:0.78s; 245 | -o-animation-delay:0.78s; 246 | animation-delay:0.78s; 247 | } 248 | 249 | #circularG_5{ 250 | right:0; 251 | top:12px; 252 | -moz-animation-delay:0.91s; 253 | -webkit-animation-delay:0.91s; 254 | -ms-animation-delay:0.91s; 255 | -o-animation-delay:0.91s; 256 | animation-delay:0.91s; 257 | } 258 | 259 | #circularG_6{ 260 | right:3px; 261 | bottom:3px; 262 | -moz-animation-delay:1.04s; 263 | -webkit-animation-delay:1.04s; 264 | -ms-animation-delay:1.04s; 265 | -o-animation-delay:1.04s; 266 | animation-delay:1.04s; 267 | } 268 | 269 | #circularG_7{ 270 | left:12px; 271 | bottom:0; 272 | -moz-animation-delay:1.17s; 273 | -webkit-animation-delay:1.17s; 274 | -ms-animation-delay:1.17s; 275 | -o-animation-delay:1.17s; 276 | animation-delay:1.17s; 277 | } 278 | 279 | #circularG_8{ 280 | left:3px; 281 | bottom:3px; 282 | -moz-animation-delay:1.3s; 283 | -webkit-animation-delay:1.3s; 284 | -ms-animation-delay:1.3s; 285 | -o-animation-delay:1.3s; 286 | animation-delay:1.3s; 287 | } 288 | 289 | @-moz-keyframes bounce_circularG{ 290 | 0%{ 291 | -moz-transform:scale(1)} 292 | 293 | 100%{ 294 | -moz-transform:scale(.3)} 295 | 296 | } 297 | 298 | @-webkit-keyframes bounce_circularG{ 299 | 0%{ 300 | -webkit-transform:scale(1)} 301 | 302 | 100%{ 303 | -webkit-transform:scale(.3)} 304 | 305 | } 306 | 307 | @-ms-keyframes bounce_circularG{ 308 | 0%{ 309 | -ms-transform:scale(1)} 310 | 311 | 100%{ 312 | -ms-transform:scale(.3)} 313 | 314 | } 315 | 316 | @-o-keyframes bounce_circularG{ 317 | 0%{ 318 | -o-transform:scale(1)} 319 | 320 | 100%{ 321 | -o-transform:scale(.3)} 322 | 323 | } 324 | 325 | @keyframes bounce_circularG{ 326 | 0%{ 327 | transform:scale(1)} 328 | 329 | 100%{ 330 | transform:scale(.3)} 331 | 332 | } 333 | 334 | .network-info{ 335 | padding-top: 10px; 336 | } 337 | 338 | .connect-btn{ 339 | float: left; 340 | } 341 | 342 | .connect-btn-wrapper{ 343 | margin-top: 10px; 344 | height: 34px 345 | } 346 | 347 | .reload-btn-wrapper{ 348 | margin-bottom: 10px; 349 | } 350 | 351 | .wifi{ 352 | background: url(/wifi-sprites.png) no-repeat; 353 | float: left; 354 | margin-right: 10px; 355 | } 356 | 357 | .wifi-4{ 358 | background-position: 0 0; 359 | width: 64px; 360 | height: 64px; 361 | } 362 | 363 | .wifi-3{ 364 | background-position: -64px 0; 365 | width: 64px; 366 | height: 64px; 367 | } 368 | 369 | .wifi-2{ 370 | background-position: -128px 0; 371 | width: 64px; 372 | height: 64px; 373 | } 374 | 375 | .wifi-1{ 376 | background-position: -192px 0; 377 | width: 64px; 378 | height: 64px; 379 | } 380 | .error{ 381 | margin-top: 10px; 382 | } -------------------------------------------------------------------------------- /firmware/web/build/style.css: -------------------------------------------------------------------------------- 1 | #floatingCirclesG{ 2 | position:absolute; 3 | z-index: 100; 4 | width:50px; 5 | height:50px; 6 | top: 50px; 7 | left: 50%; 8 | -moz-transform:scale(0.6); 9 | -webkit-transform:scale(0.6); 10 | -ms-transform:scale(0.6); 11 | -o-transform:scale(0.6); 12 | transform:scale(0.6); 13 | } 14 | 15 | .f_circleG{ 16 | position:absolute; 17 | background-color:#FFFFFF; 18 | height:9px; 19 | width:9px; 20 | -moz-border-radius:5px; 21 | -moz-animation-name:f_fadeG; 22 | -moz-animation-duration:1.04s; 23 | -moz-animation-iteration-count:infinite; 24 | -moz-animation-direction:normal; 25 | -webkit-border-radius:5px; 26 | -webkit-animation-name:f_fadeG; 27 | -webkit-animation-duration:1.04s; 28 | -webkit-animation-iteration-count:infinite; 29 | -webkit-animation-direction:normal; 30 | -ms-border-radius:5px; 31 | -ms-animation-name:f_fadeG; 32 | -ms-animation-duration:1.04s; 33 | -ms-animation-iteration-count:infinite; 34 | -ms-animation-direction:normal; 35 | -o-border-radius:5px; 36 | -o-animation-name:f_fadeG; 37 | -o-animation-duration:1.04s; 38 | -o-animation-iteration-count:infinite; 39 | -o-animation-direction:normal; 40 | border-radius:5px; 41 | animation-name:f_fadeG; 42 | animation-duration:1.04s; 43 | animation-iteration-count:infinite; 44 | animation-direction:normal; 45 | } 46 | 47 | #frotateG_01{ 48 | left:0; 49 | top:20px; 50 | -moz-animation-delay:0.39s; 51 | -webkit-animation-delay:0.39s; 52 | -ms-animation-delay:0.39s; 53 | -o-animation-delay:0.39s; 54 | animation-delay:0.39s; 55 | } 56 | 57 | #frotateG_02{ 58 | left:6px; 59 | top:6px; 60 | -moz-animation-delay:0.52s; 61 | -webkit-animation-delay:0.52s; 62 | -ms-animation-delay:0.52s; 63 | -o-animation-delay:0.52s; 64 | animation-delay:0.52s; 65 | } 66 | 67 | #frotateG_03{ 68 | left:20px; 69 | top:0; 70 | -moz-animation-delay:0.65s; 71 | -webkit-animation-delay:0.65s; 72 | -ms-animation-delay:0.65s; 73 | -o-animation-delay:0.65s; 74 | animation-delay:0.65s; 75 | } 76 | 77 | #frotateG_04{ 78 | right:6px; 79 | top:6px; 80 | -moz-animation-delay:0.78s; 81 | -webkit-animation-delay:0.78s; 82 | -ms-animation-delay:0.78s; 83 | -o-animation-delay:0.78s; 84 | animation-delay:0.78s; 85 | } 86 | 87 | #frotateG_05{ 88 | right:0; 89 | top:20px; 90 | -moz-animation-delay:0.91s; 91 | -webkit-animation-delay:0.91s; 92 | -ms-animation-delay:0.91s; 93 | -o-animation-delay:0.91s; 94 | animation-delay:0.91s; 95 | } 96 | 97 | #frotateG_06{ 98 | right:6px; 99 | bottom:6px; 100 | -moz-animation-delay:1.04s; 101 | -webkit-animation-delay:1.04s; 102 | -ms-animation-delay:1.04s; 103 | -o-animation-delay:1.04s; 104 | animation-delay:1.04s; 105 | } 106 | 107 | #frotateG_07{ 108 | left:20px; 109 | bottom:0; 110 | -moz-animation-delay:1.17s; 111 | -webkit-animation-delay:1.17s; 112 | -ms-animation-delay:1.17s; 113 | -o-animation-delay:1.17s; 114 | animation-delay:1.17s; 115 | } 116 | 117 | #frotateG_08{ 118 | left:6px; 119 | bottom:6px; 120 | -moz-animation-delay:1.3s; 121 | -webkit-animation-delay:1.3s; 122 | -ms-animation-delay:1.3s; 123 | -o-animation-delay:1.3s; 124 | animation-delay:1.3s; 125 | } 126 | 127 | @-moz-keyframes f_fadeG{ 128 | 0%{ 129 | background-color:#000000} 130 | 131 | 100%{ 132 | background-color:#FFFFFF} 133 | 134 | } 135 | 136 | @-webkit-keyframes f_fadeG{ 137 | 0%{ 138 | background-color:#000000} 139 | 140 | 100%{ 141 | background-color:#FFFFFF} 142 | 143 | } 144 | 145 | @-ms-keyframes f_fadeG{ 146 | 0%{ 147 | background-color:#000000} 148 | 149 | 100%{ 150 | background-color:#FFFFFF} 151 | 152 | } 153 | 154 | @-o-keyframes f_fadeG{ 155 | 0%{ 156 | background-color:#000000} 157 | 158 | 100%{ 159 | background-color:#FFFFFF} 160 | 161 | } 162 | 163 | @keyframes f_fadeG{ 164 | 0%{ 165 | background-color:#000000} 166 | 167 | 100%{ 168 | background-color:#FFFFFF} 169 | 170 | } 171 | 172 | #circularG{ 173 | position:relative; 174 | width:30px; 175 | height:30px} 176 | 177 | .circularG{ 178 | position:absolute; 179 | background-color:#000000; 180 | width:7px; 181 | height:7px; 182 | -moz-border-radius:5px; 183 | -moz-animation-name:bounce_circularG; 184 | -moz-animation-duration:1.04s; 185 | -moz-animation-iteration-count:infinite; 186 | -moz-animation-direction:normal; 187 | -webkit-border-radius:5px; 188 | -webkit-animation-name:bounce_circularG; 189 | -webkit-animation-duration:1.04s; 190 | -webkit-animation-iteration-count:infinite; 191 | -webkit-animation-direction:normal; 192 | -ms-border-radius:5px; 193 | -ms-animation-name:bounce_circularG; 194 | -ms-animation-duration:1.04s; 195 | -ms-animation-iteration-count:infinite; 196 | -ms-animation-direction:normal; 197 | -o-border-radius:5px; 198 | -o-animation-name:bounce_circularG; 199 | -o-animation-duration:1.04s; 200 | -o-animation-iteration-count:infinite; 201 | -o-animation-direction:normal; 202 | border-radius:5px; 203 | animation-name:bounce_circularG; 204 | animation-duration:1.04s; 205 | animation-iteration-count:infinite; 206 | animation-direction:normal; 207 | } 208 | 209 | #circularG_1{ 210 | left:0; 211 | top:12px; 212 | -moz-animation-delay:0.39s; 213 | -webkit-animation-delay:0.39s; 214 | -ms-animation-delay:0.39s; 215 | -o-animation-delay:0.39s; 216 | animation-delay:0.39s; 217 | } 218 | 219 | #circularG_2{ 220 | left:3px; 221 | top:3px; 222 | -moz-animation-delay:0.52s; 223 | -webkit-animation-delay:0.52s; 224 | -ms-animation-delay:0.52s; 225 | -o-animation-delay:0.52s; 226 | animation-delay:0.52s; 227 | } 228 | 229 | #circularG_3{ 230 | top:0; 231 | left:12px; 232 | -moz-animation-delay:0.65s; 233 | -webkit-animation-delay:0.65s; 234 | -ms-animation-delay:0.65s; 235 | -o-animation-delay:0.65s; 236 | animation-delay:0.65s; 237 | } 238 | 239 | #circularG_4{ 240 | right:3px; 241 | top:3px; 242 | -moz-animation-delay:0.78s; 243 | -webkit-animation-delay:0.78s; 244 | -ms-animation-delay:0.78s; 245 | -o-animation-delay:0.78s; 246 | animation-delay:0.78s; 247 | } 248 | 249 | #circularG_5{ 250 | right:0; 251 | top:12px; 252 | -moz-animation-delay:0.91s; 253 | -webkit-animation-delay:0.91s; 254 | -ms-animation-delay:0.91s; 255 | -o-animation-delay:0.91s; 256 | animation-delay:0.91s; 257 | } 258 | 259 | #circularG_6{ 260 | right:3px; 261 | bottom:3px; 262 | -moz-animation-delay:1.04s; 263 | -webkit-animation-delay:1.04s; 264 | -ms-animation-delay:1.04s; 265 | -o-animation-delay:1.04s; 266 | animation-delay:1.04s; 267 | } 268 | 269 | #circularG_7{ 270 | left:12px; 271 | bottom:0; 272 | -moz-animation-delay:1.17s; 273 | -webkit-animation-delay:1.17s; 274 | -ms-animation-delay:1.17s; 275 | -o-animation-delay:1.17s; 276 | animation-delay:1.17s; 277 | } 278 | 279 | #circularG_8{ 280 | left:3px; 281 | bottom:3px; 282 | -moz-animation-delay:1.3s; 283 | -webkit-animation-delay:1.3s; 284 | -ms-animation-delay:1.3s; 285 | -o-animation-delay:1.3s; 286 | animation-delay:1.3s; 287 | } 288 | 289 | @-moz-keyframes bounce_circularG{ 290 | 0%{ 291 | -moz-transform:scale(1)} 292 | 293 | 100%{ 294 | -moz-transform:scale(.3)} 295 | 296 | } 297 | 298 | @-webkit-keyframes bounce_circularG{ 299 | 0%{ 300 | -webkit-transform:scale(1)} 301 | 302 | 100%{ 303 | -webkit-transform:scale(.3)} 304 | 305 | } 306 | 307 | @-ms-keyframes bounce_circularG{ 308 | 0%{ 309 | -ms-transform:scale(1)} 310 | 311 | 100%{ 312 | -ms-transform:scale(.3)} 313 | 314 | } 315 | 316 | @-o-keyframes bounce_circularG{ 317 | 0%{ 318 | -o-transform:scale(1)} 319 | 320 | 100%{ 321 | -o-transform:scale(.3)} 322 | 323 | } 324 | 325 | @keyframes bounce_circularG{ 326 | 0%{ 327 | transform:scale(1)} 328 | 329 | 100%{ 330 | transform:scale(.3)} 331 | 332 | } 333 | 334 | .network-info{ 335 | padding-top: 10px; 336 | } 337 | 338 | .connect-btn{ 339 | float: left; 340 | } 341 | 342 | .connect-btn-wrapper{ 343 | margin-top: 10px; 344 | height: 34px 345 | } 346 | 347 | .reload-btn-wrapper{ 348 | margin-bottom: 10px; 349 | } 350 | 351 | .wifi{ 352 | background: url(/wifi-sprites.png) no-repeat; 353 | float: left; 354 | margin-right: 10px; 355 | } 356 | 357 | .wifi-4{ 358 | background-position: 0 0; 359 | width: 64px; 360 | height: 64px; 361 | } 362 | 363 | .wifi-3{ 364 | background-position: -64px 0; 365 | width: 64px; 366 | height: 64px; 367 | } 368 | 369 | .wifi-2{ 370 | background-position: -128px 0; 371 | width: 64px; 372 | height: 64px; 373 | } 374 | 375 | .wifi-1{ 376 | background-position: -192px 0; 377 | width: 64px; 378 | height: 64px; 379 | } 380 | .error{ 381 | margin-top: 10px; 382 | } -------------------------------------------------------------------------------- /firmware/web/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Sming Framework WiFi Network configuration 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 224 | 225 | 226 |
227 |
228 | 234 |

Sming Based

235 |
236 | 237 |
238 |

Network Settings

239 | 240 |

Wireless network connection 241 |

242 |
243 | 244 |
245 |
246 | 247 |
248 |
249 |
250 |

Networks

251 | 252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 | 292 |
293 | 294 |
295 | 296 |
297 | 298 | 299 | -------------------------------------------------------------------------------- /hardware/esp-power-control.sch: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 2 2 | LIBS:power 3 | LIBS:device 4 | LIBS:transistors 5 | LIBS:conn 6 | LIBS:linear 7 | LIBS:regul 8 | LIBS:74xx 9 | LIBS:cmos4000 10 | LIBS:adc-dac 11 | LIBS:memory 12 | LIBS:xilinx 13 | LIBS:microcontrollers 14 | LIBS:dsp 15 | LIBS:microchip 16 | LIBS:analog_switches 17 | LIBS:motorola 18 | LIBS:texas 19 | LIBS:intel 20 | LIBS:audio 21 | LIBS:interface 22 | LIBS:digital-audio 23 | LIBS:philips 24 | LIBS:display 25 | LIBS:cypress 26 | LIBS:siliconi 27 | LIBS:opto 28 | LIBS:atmel 29 | LIBS:contrib 30 | LIBS:valves 31 | LIBS:ESP8266 32 | EELAYER 25 0 33 | EELAYER END 34 | $Descr A4 11693 8268 35 | encoding utf-8 36 | Sheet 1 1 37 | Title "ESP8266 PC power control" 38 | Date "2016-04-17" 39 | Rev "rev 1" 40 | Comp "festlv" 41 | Comment1 "" 42 | Comment2 "" 43 | Comment3 "" 44 | Comment4 "" 45 | $EndDescr 46 | $Comp 47 | L ESP-12 U1 48 | U 1 1 5713D4DB 49 | P 3700 3100 50 | F 0 "U1" H 4200 3750 50 0000 C CNN 51 | F 1 "ESP-12" H 3450 3750 50 0000 C CNN 52 | F 2 "" H 3700 3100 50 0001 C CNN 53 | F 3 "" H 3700 3100 50 0001 C CNN 54 | 1 3700 3100 55 | 1 0 0 -1 56 | $EndComp 57 | $Comp 58 | L R_Small R2 59 | U 1 1 5713D50D 60 | P 2450 2550 61 | F 0 "R2" H 2509 2596 50 0000 L CNN 62 | F 1 "10K" H 2509 2505 50 0000 L CNN 63 | F 2 "" H 2450 2550 60 0000 C CNN 64 | F 3 "" H 2450 2550 60 0000 C CNN 65 | 1 2450 2550 66 | 1 0 0 -1 67 | $EndComp 68 | $Comp 69 | L R_Small R1 70 | U 1 1 5713D579 71 | P 2100 2550 72 | F 0 "R1" H 2159 2596 50 0000 L CNN 73 | F 1 "10K" H 2159 2505 50 0000 L CNN 74 | F 2 "" H 2100 2550 60 0000 C CNN 75 | F 3 "" H 2100 2550 60 0000 C CNN 76 | 1 2100 2550 77 | 1 0 0 -1 78 | $EndComp 79 | $Comp 80 | L R_Small R3 81 | U 1 1 5713D5B2 82 | P 5050 2550 83 | F 0 "R3" H 5109 2596 50 0000 L CNN 84 | F 1 "10K" H 5109 2505 50 0000 L CNN 85 | F 2 "" H 5050 2550 60 0000 C CNN 86 | F 3 "" H 5050 2550 60 0000 C CNN 87 | 1 5050 2550 88 | 1 0 0 -1 89 | $EndComp 90 | $Comp 91 | L +3.3V #PWR1 92 | U 1 1 5713D671 93 | P 2250 1850 94 | F 0 "#PWR1" H 2250 1700 50 0001 C CNN 95 | F 1 "+3.3V" H 2268 2023 50 0000 C CNN 96 | F 2 "" H 2250 1850 60 0000 C CNN 97 | F 3 "" H 2250 1850 60 0000 C CNN 98 | 1 2250 1850 99 | 1 0 0 -1 100 | $EndComp 101 | $Comp 102 | L +3.3V #PWR5 103 | U 1 1 5713D6A0 104 | P 5050 2100 105 | F 0 "#PWR5" H 5050 1950 50 0001 C CNN 106 | F 1 "+3.3V" H 5068 2273 50 0000 C CNN 107 | F 2 "" H 5050 2100 60 0000 C CNN 108 | F 3 "" H 5050 2100 60 0000 C CNN 109 | 1 5050 2100 110 | 1 0 0 -1 111 | $EndComp 112 | $Comp 113 | L +3.3V #PWR2 114 | U 1 1 5713D6CF 115 | P 3700 1900 116 | F 0 "#PWR2" H 3700 1750 50 0001 C CNN 117 | F 1 "+3.3V" H 3718 2073 50 0000 C CNN 118 | F 2 "" H 3700 1900 60 0000 C CNN 119 | F 3 "" H 3700 1900 60 0000 C CNN 120 | 1 3700 1900 121 | 1 0 0 -1 122 | $EndComp 123 | $Comp 124 | L C_Small C1 125 | U 1 1 5713D79C 126 | P 3950 2100 127 | F 0 "C1" H 4042 2146 50 0000 L CNN 128 | F 1 "22uF" H 4042 2055 50 0000 L CNN 129 | F 2 "" H 3950 2100 60 0000 C CNN 130 | F 3 "" H 3950 2100 60 0000 C CNN 131 | 1 3950 2100 132 | 1 0 0 -1 133 | $EndComp 134 | $Comp 135 | L GND #PWR3 136 | U 1 1 5713D836 137 | P 3700 4100 138 | F 0 "#PWR3" H 3700 3850 50 0001 C CNN 139 | F 1 "GND" H 3708 3927 50 0000 C CNN 140 | F 2 "" H 3700 4100 60 0000 C CNN 141 | F 3 "" H 3700 4100 60 0000 C CNN 142 | 1 3700 4100 143 | 1 0 0 -1 144 | $EndComp 145 | $Comp 146 | L GND #PWR4 147 | U 1 1 5713D906 148 | P 3950 2250 149 | F 0 "#PWR4" H 3950 2000 50 0001 C CNN 150 | F 1 "GND" H 3958 2077 50 0000 C CNN 151 | F 2 "" H 3950 2250 60 0000 C CNN 152 | F 3 "" H 3950 2250 60 0000 C CNN 153 | 1 3950 2250 154 | 1 0 0 -1 155 | $EndComp 156 | $Comp 157 | L C_Small C2 158 | U 1 1 5713D9A2 159 | P 4300 2100 160 | F 0 "C2" H 4392 2146 50 0000 L CNN 161 | F 1 "1uF" H 4392 2055 50 0000 L CNN 162 | F 2 "" H 4300 2100 60 0000 C CNN 163 | F 3 "" H 4300 2100 60 0000 C CNN 164 | 1 4300 2100 165 | 1 0 0 -1 166 | $EndComp 167 | $Comp 168 | L CONN_01X02 P1 169 | U 1 1 5713DABE 170 | P 8500 1350 171 | F 0 "P1" H 8578 1388 50 0000 L CNN 172 | F 1 "PWR_BTN_IN" H 8578 1297 50 0000 L CNN 173 | F 2 "" H 8500 1350 60 0000 C CNN 174 | F 3 "" H 8500 1350 60 0000 C CNN 175 | 1 8500 1350 176 | 1 0 0 -1 177 | $EndComp 178 | $Comp 179 | L CONN_01X02 P2 180 | U 1 1 5713DB50 181 | P 8500 1700 182 | F 0 "P2" H 8578 1738 50 0000 L CNN 183 | F 1 "PWR_BTN_OUT" H 8578 1647 50 0000 L CNN 184 | F 2 "" H 8500 1700 60 0000 C CNN 185 | F 3 "" H 8500 1700 60 0000 C CNN 186 | 1 8500 1700 187 | 1 0 0 -1 188 | $EndComp 189 | $Comp 190 | L GND #PWR6 191 | U 1 1 5713DBE3 192 | P 8200 1950 193 | F 0 "#PWR6" H 8200 1700 50 0001 C CNN 194 | F 1 "GND" H 8208 1777 50 0000 C CNN 195 | F 2 "" H 8200 1950 60 0000 C CNN 196 | F 3 "" H 8200 1950 60 0000 C CNN 197 | 1 8200 1950 198 | 1 0 0 -1 199 | $EndComp 200 | $Comp 201 | L R_Small R6 202 | U 1 1 5713DD8F 203 | P 7100 1550 204 | F 0 "R6" V 6904 1550 50 0000 C CNN 205 | F 1 "100R" V 6995 1550 50 0000 C CNN 206 | F 2 "" H 7100 1550 60 0000 C CNN 207 | F 3 "" H 7100 1550 60 0000 C CNN 208 | 1 7100 1550 209 | 0 1 1 0 210 | $EndComp 211 | $Comp 212 | L R_Small R4 213 | U 1 1 5713DE6E 214 | P 6950 1750 215 | F 0 "R4" H 7009 1796 50 0000 L CNN 216 | F 1 "10K" H 7009 1705 50 0000 L CNN 217 | F 2 "" H 6950 1750 60 0000 C CNN 218 | F 3 "" H 6950 1750 60 0000 C CNN 219 | 1 6950 1750 220 | 1 0 0 -1 221 | $EndComp 222 | $Comp 223 | L Q_NMOS_DGS Q1 224 | U 1 1 5713DFBA 225 | P 7750 1550 226 | F 0 "Q1" H 7943 1596 50 0000 L CNN 227 | F 1 "N-FET" H 7550 1700 50 0000 L CNN 228 | F 2 "" H 7950 1650 29 0000 C CNN 229 | F 3 "" H 7750 1550 60 0000 C CNN 230 | 1 7750 1550 231 | 1 0 0 -1 232 | $EndComp 233 | Wire Wire Line 234 | 2450 2650 2450 2800 235 | Wire Wire Line 236 | 2450 2800 2800 2800 237 | Wire Wire Line 238 | 2100 2650 2100 3000 239 | Wire Wire Line 240 | 2100 3000 2800 3000 241 | Wire Wire Line 242 | 5050 2650 5050 3200 243 | Wire Wire Line 244 | 5050 3200 4600 3200 245 | Wire Wire Line 246 | 2450 2100 2450 2450 247 | Wire Wire Line 248 | 5050 2450 5050 2100 249 | Wire Wire Line 250 | 2100 2450 2100 2100 251 | Wire Wire Line 252 | 2100 2100 2450 2100 253 | Wire Wire Line 254 | 2250 1850 2250 2100 255 | Connection ~ 2250 2100 256 | Wire Wire Line 257 | 3700 1900 3700 2200 258 | Wire Wire Line 259 | 3700 2000 4300 2000 260 | Connection ~ 3700 2000 261 | Wire Wire Line 262 | 3700 4100 3700 4000 263 | Wire Wire Line 264 | 3950 2250 3950 2200 265 | Connection ~ 3950 2000 266 | Wire Wire Line 267 | 3950 2200 4300 2200 268 | Connection ~ 3950 2200 269 | Wire Wire Line 270 | 8300 1400 8200 1400 271 | Wire Wire Line 272 | 8200 1400 8200 1950 273 | Wire Wire Line 274 | 7850 1750 8300 1750 275 | Wire Wire Line 276 | 8150 1650 8300 1650 277 | Wire Wire Line 278 | 8150 1300 8150 1650 279 | Wire Wire Line 280 | 8150 1300 8300 1300 281 | Connection ~ 8200 1750 282 | Wire Wire Line 283 | 7850 1350 8150 1350 284 | Connection ~ 8150 1350 285 | Wire Wire Line 286 | 7550 1550 7200 1550 287 | Wire Wire Line 288 | 6950 1650 6950 1550 289 | Wire Wire Line 290 | 6500 1550 7000 1550 291 | Wire Wire Line 292 | 6950 1850 6950 1900 293 | Wire Wire Line 294 | 6950 1900 8200 1900 295 | Connection ~ 8200 1900 296 | Connection ~ 6950 1550 297 | Text Label 6500 1550 0 60 ~ 0 298 | PWR_BTN 299 | $Comp 300 | L CONN_01X02 P3 301 | U 1 1 5713E35E 302 | P 8500 2300 303 | F 0 "P3" H 8577 2338 50 0000 L CNN 304 | F 1 "RESET_BTN_IN" H 8577 2247 50 0000 L CNN 305 | F 2 "" H 8500 2300 60 0000 C CNN 306 | F 3 "" H 8500 2300 60 0000 C CNN 307 | 1 8500 2300 308 | 1 0 0 -1 309 | $EndComp 310 | $Comp 311 | L CONN_01X02 P4 312 | U 1 1 5713E364 313 | P 8500 2650 314 | F 0 "P4" H 8577 2688 50 0000 L CNN 315 | F 1 "RESET_BTN_OUT" H 8577 2597 50 0000 L CNN 316 | F 2 "" H 8500 2650 60 0000 C CNN 317 | F 3 "" H 8500 2650 60 0000 C CNN 318 | 1 8500 2650 319 | 1 0 0 -1 320 | $EndComp 321 | $Comp 322 | L GND #PWR7 323 | U 1 1 5713E36A 324 | P 8200 2900 325 | F 0 "#PWR7" H 8200 2650 50 0001 C CNN 326 | F 1 "GND" H 8208 2727 50 0000 C CNN 327 | F 2 "" H 8200 2900 60 0000 C CNN 328 | F 3 "" H 8200 2900 60 0000 C CNN 329 | 1 8200 2900 330 | 1 0 0 -1 331 | $EndComp 332 | $Comp 333 | L R_Small R7 334 | U 1 1 5713E370 335 | P 7100 2500 336 | F 0 "R7" V 6904 2500 50 0000 C CNN 337 | F 1 "100R" V 6995 2500 50 0000 C CNN 338 | F 2 "" H 7100 2500 60 0000 C CNN 339 | F 3 "" H 7100 2500 60 0000 C CNN 340 | 1 7100 2500 341 | 0 1 1 0 342 | $EndComp 343 | $Comp 344 | L R_Small R5 345 | U 1 1 5713E376 346 | P 6950 2700 347 | F 0 "R5" H 7009 2746 50 0000 L CNN 348 | F 1 "10K" H 7009 2655 50 0000 L CNN 349 | F 2 "" H 6950 2700 60 0000 C CNN 350 | F 3 "" H 6950 2700 60 0000 C CNN 351 | 1 6950 2700 352 | 1 0 0 -1 353 | $EndComp 354 | $Comp 355 | L Q_NMOS_DGS Q2 356 | U 1 1 5713E37C 357 | P 7750 2500 358 | F 0 "Q2" H 7943 2546 50 0000 L CNN 359 | F 1 "N-FET" H 7550 2650 50 0000 L CNN 360 | F 2 "" H 7950 2600 29 0000 C CNN 361 | F 3 "" H 7750 2500 60 0000 C CNN 362 | 1 7750 2500 363 | 1 0 0 -1 364 | $EndComp 365 | Wire Wire Line 366 | 8300 2350 8200 2350 367 | Wire Wire Line 368 | 8200 2350 8200 2900 369 | Wire Wire Line 370 | 7850 2700 8300 2700 371 | Wire Wire Line 372 | 8150 2600 8300 2600 373 | Wire Wire Line 374 | 8150 2250 8150 2600 375 | Wire Wire Line 376 | 8150 2250 8300 2250 377 | Connection ~ 8200 2700 378 | Wire Wire Line 379 | 7850 2300 8150 2300 380 | Connection ~ 8150 2300 381 | Wire Wire Line 382 | 7550 2500 7200 2500 383 | Wire Wire Line 384 | 6950 2600 6950 2500 385 | Wire Wire Line 386 | 6500 2500 7000 2500 387 | Wire Wire Line 388 | 6950 2800 6950 2850 389 | Wire Wire Line 390 | 6950 2850 8200 2850 391 | Connection ~ 8200 2850 392 | Connection ~ 6950 2500 393 | Text Label 6500 2500 0 60 ~ 0 394 | RESET_BTN 395 | $Comp 396 | L CONN_01X02 P5 397 | U 1 1 5713E651 398 | P 8500 3500 399 | F 0 "P5" H 8577 3538 50 0000 L CNN 400 | F 1 "PWR_LED_IN" H 8577 3447 50 0000 L CNN 401 | F 2 "" H 8500 3500 60 0000 C CNN 402 | F 3 "" H 8500 3500 60 0000 C CNN 403 | 1 8500 3500 404 | 1 0 0 -1 405 | $EndComp 406 | $Comp 407 | L CONN_01X02 P6 408 | U 1 1 5713E834 409 | P 8500 3900 410 | F 0 "P6" H 8577 3938 50 0000 L CNN 411 | F 1 "PWR_LED_OUT" H 8577 3847 50 0000 L CNN 412 | F 2 "" H 8500 3900 60 0000 C CNN 413 | F 3 "" H 8500 3900 60 0000 C CNN 414 | 1 8500 3900 415 | 1 0 0 -1 416 | $EndComp 417 | Wire Wire Line 418 | 8300 3450 8150 3450 419 | Wire Wire Line 420 | 8150 3450 8150 3850 421 | Wire Wire Line 422 | 8150 3850 8300 3850 423 | Wire Wire Line 424 | 8300 3550 8200 3550 425 | Wire Wire Line 426 | 8200 3550 8200 4100 427 | Wire Wire Line 428 | 7900 3950 8300 3950 429 | $Comp 430 | L GND #PWR8 431 | U 1 1 5713E99F 432 | P 8200 4100 433 | F 0 "#PWR8" H 8200 3850 50 0001 C CNN 434 | F 1 "GND" H 8208 3927 50 0000 C CNN 435 | F 2 "" H 8200 4100 60 0000 C CNN 436 | F 3 "" H 8200 4100 60 0000 C CNN 437 | 1 8200 4100 438 | 1 0 0 -1 439 | $EndComp 440 | Connection ~ 8200 3950 441 | $Comp 442 | L R_Small R8 443 | U 1 1 5713EA3C 444 | P 7900 3600 445 | F 0 "R8" H 7959 3646 50 0000 L CNN 446 | F 1 "10K" H 7959 3555 50 0000 L CNN 447 | F 2 "" H 7900 3600 60 0000 C CNN 448 | F 3 "" H 7900 3600 60 0000 C CNN 449 | 1 7900 3600 450 | 1 0 0 -1 451 | $EndComp 452 | $Comp 453 | L R_Small R9 454 | U 1 1 5713EAB3 455 | P 7900 3850 456 | F 0 "R9" H 7959 3896 50 0000 L CNN 457 | F 1 "10K" H 7959 3805 50 0000 L CNN 458 | F 2 "" H 7900 3850 60 0000 C CNN 459 | F 3 "" H 7900 3850 60 0000 C CNN 460 | 1 7900 3850 461 | 1 0 0 -1 462 | $EndComp 463 | Wire Wire Line 464 | 7900 3750 7900 3700 465 | Wire Wire Line 466 | 7900 3500 8150 3500 467 | Connection ~ 8150 3500 468 | Wire Wire Line 469 | 7900 3750 6550 3750 470 | Text Label 6550 3750 0 60 ~ 0 471 | PWR_LED 472 | $Comp 473 | L CONN_01X02 P7 474 | U 1 1 5713EDFB 475 | P 8500 4500 476 | F 0 "P7" H 8578 4538 50 0000 L CNN 477 | F 1 "HDD_LED_IN" H 8578 4447 50 0000 L CNN 478 | F 2 "" H 8500 4500 60 0000 C CNN 479 | F 3 "" H 8500 4500 60 0000 C CNN 480 | 1 8500 4500 481 | 1 0 0 -1 482 | $EndComp 483 | $Comp 484 | L CONN_01X02 P8 485 | U 1 1 5713EE01 486 | P 8500 4900 487 | F 0 "P8" H 8578 4938 50 0000 L CNN 488 | F 1 "HDD_LED_OUT" H 8578 4847 50 0000 L CNN 489 | F 2 "" H 8500 4900 60 0000 C CNN 490 | F 3 "" H 8500 4900 60 0000 C CNN 491 | 1 8500 4900 492 | 1 0 0 -1 493 | $EndComp 494 | Wire Wire Line 495 | 8300 4450 8150 4450 496 | Wire Wire Line 497 | 8150 4450 8150 4850 498 | Wire Wire Line 499 | 8150 4850 8300 4850 500 | Wire Wire Line 501 | 8300 4550 8200 4550 502 | Wire Wire Line 503 | 8200 4550 8200 5100 504 | Wire Wire Line 505 | 7900 4950 8300 4950 506 | $Comp 507 | L GND #PWR9 508 | U 1 1 5713EE10 509 | P 8200 5100 510 | F 0 "#PWR9" H 8200 4850 50 0001 C CNN 511 | F 1 "GND" H 8208 4927 50 0000 C CNN 512 | F 2 "" H 8200 5100 60 0000 C CNN 513 | F 3 "" H 8200 5100 60 0000 C CNN 514 | 1 8200 5100 515 | 1 0 0 -1 516 | $EndComp 517 | Connection ~ 8200 4950 518 | $Comp 519 | L R_Small R10 520 | U 1 1 5713EE17 521 | P 7900 4600 522 | F 0 "R10" H 7959 4646 50 0000 L CNN 523 | F 1 "10K" H 7959 4555 50 0000 L CNN 524 | F 2 "" H 7900 4600 60 0000 C CNN 525 | F 3 "" H 7900 4600 60 0000 C CNN 526 | 1 7900 4600 527 | 1 0 0 -1 528 | $EndComp 529 | $Comp 530 | L R_Small R11 531 | U 1 1 5713EE1D 532 | P 7900 4850 533 | F 0 "R11" H 7959 4896 50 0000 L CNN 534 | F 1 "10K" H 7959 4805 50 0000 L CNN 535 | F 2 "" H 7900 4850 60 0000 C CNN 536 | F 3 "" H 7900 4850 60 0000 C CNN 537 | 1 7900 4850 538 | 1 0 0 -1 539 | $EndComp 540 | Wire Wire Line 541 | 7900 4750 7900 4700 542 | Wire Wire Line 543 | 7900 4500 8150 4500 544 | Connection ~ 8150 4500 545 | Wire Wire Line 546 | 7900 4750 6550 4750 547 | Text Label 6550 4750 0 60 ~ 0 548 | HDD_LED 549 | Wire Wire Line 550 | 4600 3100 5350 3100 551 | Wire Wire Line 552 | 4600 3000 5350 3000 553 | Text Label 5150 3100 0 60 ~ 0 554 | PWR_LED 555 | Text Label 5150 3000 0 60 ~ 0 556 | HDD_LED 557 | Wire Wire Line 558 | 2800 3100 2200 3100 559 | Wire Wire Line 560 | 2800 3200 2200 3200 561 | Text Label 2200 3200 0 60 ~ 0 562 | PWR_BTN 563 | Text Label 2200 3100 0 60 ~ 0 564 | RESET_BTN 565 | NoConn ~ 2800 2900 566 | NoConn ~ 2800 3300 567 | NoConn ~ 2800 3400 568 | NoConn ~ 4600 3400 569 | NoConn ~ 4600 3300 570 | NoConn ~ 4600 2900 571 | NoConn ~ 4600 2800 572 | $EndSCHEMATC 573 | -------------------------------------------------------------------------------- /firmware/web/build/networks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Status & configuration 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 25 | 26 | 249 | 250 | 251 |
252 |
253 | 260 |

Power Control

261 |
262 | 263 |
264 |
265 | 266 |
267 |
268 |
269 |

Available networks

270 | 271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 | 311 | 312 |
313 |
314 | 315 | 316 |
317 |
318 | Client mode settings 319 |
320 |
321 | 322 |
323 | 326 | 329 |
330 |
331 |
332 | 333 | 334 |
335 |
336 | 337 | 338 |
339 |
340 | 341 | 342 |
343 |
344 |
345 |
346 | AP settings 347 |
348 |
349 | 350 | 351 |
352 |
353 | 354 | 355 |
356 |
357 |
358 | 359 |
360 | 361 |
362 |
363 |
364 |
365 | 366 |
367 | 368 |
369 | 370 |
371 | 372 | 373 | --------------------------------------------------------------------------------