Commit Graph

696 Commits

Author SHA1 Message Date
HomeSpan e0b9958001
Update OTA.md 2021-02-18 07:28:14 -06:00
HomeSpan edefa1380c
Update OTA.md 2021-02-17 08:15:08 -06:00
HomeSpan be71798836
Update OTA.md 2021-02-17 08:02:12 -06:00
HomeSpan d5757e6ab8
Update OTA.md 2021-02-16 21:55:10 -06:00
HomeSpan 3010e49347
Update OTA.md 2021-02-16 21:53:18 -06:00
HomeSpan 2aea557a3a
Update OTA.md 2021-02-16 18:58:00 -06:00
HomeSpan d60f9db3c5
Update OTA.md 2021-02-16 18:41:28 -06:00
HomeSpan 7e21159685
Create OTA.md 2021-02-16 17:30:13 -06:00
Gregg 269d749b5b Update src.ino 2021-02-16 07:19:48 -06:00
HomeSpan 121864ba36
Update Reference.md 2021-02-16 07:18:19 -06:00
HomeSpan 45e7c60dd1
Update Reference.md 2021-02-16 07:01:34 -06:00
HomeSpan 9450551947
Update Reference.md 2021-02-16 06:30:01 -06:00
HomeSpan f8b0e906bf
Update Tutorials.md 2021-02-15 21:13:24 -06:00
HomeSpan 0602b8ac3f
Update Reference.md 2021-02-15 21:00:59 -06:00
HomeSpan 1cbac51a43
Update Reference.md 2021-02-15 20:47:54 -06:00
HomeSpan 06da589541
Update Reference.md 2021-02-15 20:45:58 -06:00
Gregg c52ae7bdfe Update 17-LinkedServices.ino 2021-02-15 20:38:32 -06:00
Gregg 2e3f90851a Create 17-LinkedServices.ino 2021-02-15 19:40:07 -06:00
Gregg 63ad921106 Merge branch 'dev1.1.5' of https://github.com/HomeSpan/HomeSpan into dev1.1.5 2021-02-14 18:33:00 -06:00
Gregg 24cc2486e2 Added Linked Services logic
New SpanService method addLink(SpanService *svc), where svc is a pointer to the SpanService that is being specified as a Linked Service for the current Service.

addLink() returns a pointer to "this" so may be chained
2021-02-14 18:32:54 -06:00
HomeSpan a0f4a46adf
Update CLI.md 2021-02-13 21:36:16 -06:00
HomeSpan bccecc8127
Update Reference.md 2021-02-13 21:30:32 -06:00
Gregg 35c8f5b48c Added option to disable OTA password
homeSpan.enableOTA() is now homeSpan.enableOTA(boolean auth=true).  Set auth=false to disable password authentication.  Set to true, or leave blank, to enable password authentication.
2021-02-13 21:24:46 -06:00
Gregg f1c3684e1c Updated maxConnections logic and added Socket numbers to output
homeSpan.begin() automatically resizes maxConnections to ensure it is at or below maxLimit, where maxLimit=CONFIG_LWIP_MAX_SOCKETS-2-otaEnabled.

maxConnections still defaults to 8 if unspecified, which means it is reduced to 7 if OTA is enabled.  Users should set maxConnections to a lower number is they have implemented other socket-based services in their sketch
2021-02-13 14:28:10 -06:00
Gregg 7400383b0a Increased number of sockets in WiFiServer to maxConnection+1
This should account for the extra connection opened when all slots are already filled.
2021-02-12 13:23:02 -06:00
Gregg 7e03998865 Added WiFi callback functionality
HomeSpan will call a user-defined function upon establishing WiFi connectivity.
Set function with homeSpan.setWifiCallback(f), where f must be of form void f().
2021-02-11 07:27:29 -06:00
Gregg 3a519bdc54 Added logic to check for OTA partitions
Warning will be thrown If OTA is enabled but partition table is not configured for OTA.  OTA will not be started.
2021-02-09 21:23:37 -06:00
Gregg 98cfde8aa9 Modified 'O' command so that a blank entry cancels the request to update the OTA password 2021-02-08 18:31:51 -06:00
HomeSpan 01d48e73ec
Update CLI.md 2021-02-08 12:33:51 -06:00
HomeSpan b0b2f6c753
Update CLI.md 2021-02-08 08:33:51 -06:00
HomeSpan 5554bec70f
Update CLI.md 2021-02-08 08:24:23 -06:00
HomeSpan 749e239c9f
Update Reference.md 2021-02-08 08:15:41 -06:00
HomeSpan dd04f9967d
Update CLI.md 2021-02-08 07:53:56 -06:00
HomeSpan 36f302f01e
Update CLI.md 2021-02-08 07:53:02 -06:00
HomeSpan d02cfe63b7
Update Reference.md 2021-02-08 07:46:51 -06:00
HomeSpan 7b3358af10
Update CLI.md 2021-02-08 07:28:43 -06:00
HomeSpan 22c9dfd957
Update CLI.md 2021-02-07 21:10:51 -06:00
HomeSpan c499616b34
Update CLI.md 2021-02-07 21:04:09 -06:00
HomeSpan 9689db9773
Update CLI.md 2021-02-07 21:01:59 -06:00
HomeSpan 64fd64a8ba
Update QRCodes.md 2021-02-07 20:48:27 -06:00
HomeSpan 46ede137ee
Update Reference.md 2021-02-07 20:42:31 -06:00
HomeSpan 8453582626
Update Reference.md 2021-02-07 20:40:50 -06:00
HomeSpan 5e4c3f5127
Update CLI.md 2021-02-07 20:32:38 -06:00
Gregg 5c002708f9 Update version numbers 2021-02-07 19:25:59 -06:00
Gregg db3e1c4bb8 Added ability to specify optional sketch version number.
Specify with homeSpan.setSketchVersion(char *).
Read back with homeSpan.getSketchVersion().

Also, MDNS now broadcasts three new fields:

hspn = HomeSpan Version
sketch = Sketch Version
ota = "yes" if OTA enabled, else "no"

These are all optional to HAP but useful if trying to keep track of version updates when using OTA and Serial Monitor is not available.
2021-02-07 11:49:55 -06:00
Gregg 78b7900f19 Added ARDUINO_VARIANT to initial info output 2021-02-07 10:07:37 -06:00
Gregg 29470e4dd9 Completed OTA logic
OTA pasword now stored in NVS.  Use 'O' command to change from default.  Note password is stored as MD5 hash, and is therefore unrecoverable.  Changes to password DO NOT take effect until next reboot.  Password CAN be changed even if OTA has not been enabled for sketch.  Blank passwords are not allowed.

Stored password can only be erased with 'E' command.
2021-02-07 09:58:52 -06:00
Gregg 208905419c Added OTA logic - enable with homeSpan.enableOTA();
TO DO:  Add password for OTA (and require it)
2021-02-06 18:10:48 -06:00
Gregg 170f972d3b Fixed bug in pairing logic that would drop leading zeros when transmitting SALT
A 16-byte SALT with a leading zero would be sent as only a 15-byte number.  The chance of this occuring is 1 in 256, which is small but still significant.  Solution is to specify required size of MPI output in loadTLV.  This forces mbedtls_mpi_write_binary() to pad with leading zeros.

Also eliminated unused code (TLV pack_old).
2021-02-06 16:29:55 -06:00
Gregg 03e43e0bbb Added 'Q' command to change default Setup ID and store in NVS
Setup ID can now be stored in NVS and set dynamically with the 'Q' command.  However, homeSpan.setQRID(char *id) will override if present, but will not change the default stored in the NVS.  This default wil be used once again if homeSpan.setQRID() is removed from the sektch.

If the NVS is empty, the default is set to "HSPN" as in version 1.1.4.
2021-01-31 18:58:45 -06:00