From 3314850e1560db7d70a02fb4f3d9df7db8f6b8ce Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Sun, 1 May 2016 16:44:30 -0700 Subject: [PATCH] Add nodemcu-uploader --- .gitmodules | 3 +++ extern/nodemcu-uploader | 1 + nodemcu/init.lua | 5 +++++ 3 files changed, 9 insertions(+) create mode 160000 extern/nodemcu-uploader diff --git a/.gitmodules b/.gitmodules index 5172402..1785eb0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "extern/nodemcu-telnet-uploader"] path = extern/nodemcu-telnet-uploader url = https://github.com/balu-/nodemcu-telnet-uploader +[submodule "extern/nodemcu-uploader"] + path = extern/nodemcu-uploader + url = https://github.com/kmpm/nodemcu-uploader diff --git a/extern/nodemcu-uploader b/extern/nodemcu-uploader new file mode 160000 index 0000000..cd55833 --- /dev/null +++ b/extern/nodemcu-uploader @@ -0,0 +1 @@ +Subproject commit cd5583310a68485132a867ff061121afd5df9295 diff --git a/nodemcu/init.lua b/nodemcu/init.lua index 1d980ea..fa262c0 100644 --- a/nodemcu/init.lua +++ b/nodemcu/init.lua @@ -16,6 +16,10 @@ wifiConfig.stationPointConfig = {} wifiConfig.stationPointConfig.ssid = "Scalar24" -- Name of the WiFi network you want to join wifiConfig.stationPointConfig.pwd = "Fb274Gh@12G1" -- Password for the WiFi network +wifiConfig.mDNS = {} +wifiConfig.mDNS.hostname = "rvoots-nameplate" -- default hostname +wifiConfig.mDNS.description = "Ryan Voot's name plate at his desk" -- what avahi-browse will describe this as + -- Tell the chip to connect to the access point wifi.setmode(wifiConfig.mode) @@ -55,6 +59,7 @@ end -- Start the APs once we hit here wifi.ap.config(wifiConfig.accessPointConfig) wifi.sta.config(wifiConfig.stationPointConfig.ssid, wifiConfig.stationPointConfig.pwd) +mdns.register(wifiConfig.mDNS.hostname, wifiConfig.mDNS) wifiConfig = nil collectgarbage()