Skip to content

Commit 0503e8f

Browse files
Fix STAC ID being trucated. (#54)
Bug fix for truncated STAC ID's.
1 parent 60498ec commit 0503e8f

16 files changed

+471
-253
lines changed

Documentation/Detailed Change Log.md

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44
Intended for developers and others interested in the nitty gritty.
55

6+
### Version 2.1.1
7+
8+
* Bug fix - STAC ID.
9+
* A unique STAC ID using the last 4 bytes of the ESP-32 chip MAC address, in byte reverse order, is used as the ID suffix. For a chip MAC ending in `4D:3C:2B:1A` the STAC ID would be `STAC-1A2B3C4D` with there always being eight characters after the `-`. However, with the method used, all trailing zeros of the MAC are removed, resulting in ID's with less than eight characters. Not the desired outcome. (Trailing zero's become leading zero's which are ignored by the String HEX formatting function.)
10+
11+
* Solution: Use a different method to retrieve the chip MAC and then format it using `snprintf()`. Add new function to generate the STAC ID to `/STACLib/STACUtil.h`
12+
13+
* Internal improvements
14+
* Code changes throughout to convert all in-line `#include` files to functions, with appropriate function calls replacing them.
15+
616
### Version 2.1
717

818
* Add the ability to do OTA firmware updates via a web browser.

Documentation/Release Notes.md

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
# STAC Release Notes
2+
## v2.1.1
3+
4+
__Bug Fix__
5+
6+
* _STAC ID_
7+
8+
* If the ESP-32 chip MAC address has trailing zeros, the STAC ID would be truncated. Fixed.
9+
10+
__New__
11+
12+
* Added *"Using CoolTerm for STAC Information.md"* in the *Documentation* folder. CoolTerm is a great little app for viewing the info sent out by the STAC during startup. Check it out!
13+
14+
* The *"README.md"* file contains information on how to install the STAC software to an ATOM directly without the need to install a development environment. Zero programming knowledge needed!. Plug, play and go!
15+
16+
217
## v2.1
318

419
__New Features__
520

621
* _OTA Software Updates_
722

8-
* After installing this version, it will be possible to update the STAC software over WiFi using a web browser. This is referred to as an *over the air* or OTA update. Details are in the the *STAC Users Guide*.
23+
* After installing this version, it will be possible to update the STAC software over WiFi using a web browser. This is referred to as an *over the air* or OTA update. Details are in the the *"STAC Users Guide"*.
924
* As a result of this change, the STAC will need to be setup again after installing this version.
1025

1126
* _mDNS Support_
1227

13-
* The mDNS protocol is now supported when the STAC opens up a WiFi hotspot for setup or a software update by pointing a browser to `setup.local` and `update.local` respectively. More information in the *STAC Users Guide*.
28+
* The mDNS protocol is now supported when the STAC opens up a WiFi hotspot for setup or a software update by pointing a browser to `setup.local` and `update.local` respectively. More information in the *"STAC Users Guide"*.
1429

1530
* _Camera Operator Tally Display in Peripheral Mode_
1631

17-
* The Tally Display Mode when the STAC is in Peripheral Mode can now be set to either Camera Operator or Talent. More info in, you guessed it, the *STAC Users Guide*.
32+
* The Tally Display Mode when the STAC is in Peripheral Mode can now be set to either Camera Operator or Talent. More info in, you guessed it, the *"STAC Users Guide"*.
1833

1934

2035
__Improvements__
@@ -35,7 +50,7 @@ __New Features__
3550
* _Configurable Polling Interval_
3651

3752
* The amount of time, in milliseconds, between polls of the Smart Tally Server can now be set when configuring the STAC.
38-
* As a result, if an older version of STAC is running, the STAC will need to be reconfigured using a web browser after installing this update. Refer to the *STAC Users Guide*.
53+
* As a result, if an older version of STAC is running, the STAC will need to be reconfigured using a web browser after installing this update. Refer to the *"STAC Users Guide"*.
3954

4055
__Improvements__
4156

@@ -45,7 +60,7 @@ __Improvements__
4560

4661
* When operating in busy networks, the "Big Purple X" won't flicker, only activating when there is a number of consecutive communication errors with the Smart Tally Server.
4762

48-
* Added a "Big Orange X" display error when the STAC cannot connect to the Smart Tally Server. Helps with troubleshooting to distinguish between "Big Purple X" and "Purple Question Mark" type errors. More info in the *STAC Users Guide*.
63+
* Added a "Big Orange X" display error when the STAC cannot connect to the Smart Tally Server. Helps with troubleshooting to distinguish between "Big Purple X" and "Purple Question Mark" type errors. More info in the *"STAC Users Guide"*.
4964

5065
* Revised the format of the information dump sent to the serial port on startup.
5166

@@ -67,7 +82,7 @@ __Improvements__
6782
__New Features__
6883

6984
* _Adds Peripheral Mode_
70-
* Allows one STAC to be connected to another via their GROVE ports. The STAC configured in Peripheral Mode operates as if in Talent Mode but it receives its tally information from the connected STAC without the need to establish a WiFi connection to the Roland device. More in the *STAC User's Guide* and the *Peripheral Mode Application Note*.
85+
* Allows one STAC to be connected to another via their GROVE ports. The STAC configured in Peripheral Mode operates as if in Talent Mode but it receives its tally information from the connected STAC without the need to establish a WiFi connection to the Roland device. More in the *"STAC User's Guide"* and the *"Peripheral Mode Application Note"*.
7186

7287
* _Adds Configuration Check_
7388
* Previously, the configuration of the STAC would be reset with each software update. After updating to version 1.10 you will have to reconfigure the STAC but from then on new software updates will do a check to see if the existing configuration is compatible with that version. If so, the existing configuration information will be retained. Too cool 🤯.

Documentation/Using CoolTerm for STAC Information.md

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Using CoolTerm for STAC Information
2+
3+
On startup, the STAC sends an information and status page to its USB port.
4+
5+
To view this, you need an application on your computer that can take in serial data from a USB port.
6+
7+
A good option is CoolTerm. CoolTerm is a simple serial port terminal application very well suited for the task and highly recommended.
8+
9+
It is available from [Roger Meier's Web site](https://freeware.the-meiers.org). If you find it useful, please hit the Donate button!
10+
11+
**Once CoolTerm is installed:**
12+
13+
1. Launch the CoolTerm app and open a new terminal window.
14+
1. Connect the STAC to a USB port.
15+
1. Using the drop down menu in the lower left of the CoolTerm window, find the STAC serial address. On a macOS system it'll look something like:
16+
`usbserial-3552F606F3`.
17+
1. From the CoolTerm Connections menu, pick Options...
18+
1. In the window that opens, select Serial Port from the list on the left to bring up the Serial Port Options pane.
19+
2. Port: should be set to what you picked in step 3.
20+
2. Set:
21+
* Baudrate to 115200
22+
* Data Bits to 8
23+
* Parity to None
24+
* Stop bits to 1
25+
* Under Flow Control; uncheck CTS, DTR and XON
26+
* Check the boxes for "Software Supported Flow Control" and "Block Keystrokes while flow is halted"
27+
* Under Initial Line States when Port opens, click the "DTR On" and "RTS On" buttons
28+
1. Hit the OK button.
29+
2. Click the Connect icon in the top toolbar.
30+
1. Restart the STAC.
31+
32+
In the CoolTerm window, you should see the STAC startup information.
33+
Something like:
34+
35+
```
36+
==========================================
37+
STAC
38+
A Roland Smart Tally Client
39+
by: Team STAC
40+
https://github.com/Xylopyrographer/STAC
41+
42+
Version: 2.1.1 (17e4e0)
43+
Core: 2.0.5
44+
SDK: v4.4.2
45+
Setup SSID: STAC-00F8A86C
46+
Setup URL: http://setup.local
47+
Setup IP: 192.168.6.14
48+
MAC: 94:B9:6C:A8:F8:00
49+
--------------------------------
50+
WiFi Network SSID: SmartTallyNet
51+
Smart Tally IP: 192.168.1.90
52+
Port #: 80
53+
Max Tally Channel: 4
54+
Polling Interval: 300 ms
55+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
56+
Active Tally Channel: 5
57+
Tally Mode: Camera Operator
58+
Auto start: Enabled
59+
Brightness Level: 1
60+
=========================================
61+
WiFi Connected. IP: 192.168.1.14
62+
=========================================```
63+
Items above the "`=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=`" line are those from the STAC setup via a web browser. Items below that line are set using the STAC display button.
64+
65+
The "`WiFi Connected.`" line will show up after the STAC connects to the WiFi network and has an IP address assigned.
66+
67+
If the STAC has not been set up, it'll tell you that. And it will let you know when it's waiting for the setup data. Then once set up, it'll send the rest of the information.
68+
69+
If it is operating in Peripheral Mode, it'll send that info out, something like...
70+
71+
```
72+
==========================================
73+
STAC
74+
A Roland Smart Tally Client
75+
by: Team STAC
76+
https://github.com/Xylopyrographer/STAC
77+
78+
Version: 2.1.1 (17e4e0)
79+
Core: 2.0.5
80+
SDK: v4.4.2
81+
Setup SSID: STAC-00F8A86C
82+
Setup URL: http://setup.local
83+
Setup IP: 192.168.6.14
84+
MAC: 94:B9:6C:A8:F8:00
85+
--------------------------------
86+
OPERATING IN PERIPHERAL MODE
87+
Tally Mode: Talent
88+
Brightness Level: 1
89+
=======================================```
90+
In Peripheral Mode, only the display brightness level and tally display mode can be set, using the display button.
91+
92+
When doing a Factory Reset, it'll send out information to let you know how that's progressing.
93+
94+
Likewise, if a software update is running, it'll let you know that too.
95+
96+
You can select and copy this information to paste into another application.
97+
98+
**Note:**<br>
99+
If you see a bunch of garbage in the CoolTerm window after restarting the STAC, ensure that CoolTerm is set up as described above—especially the Baudrate setting.
100+
101+
### Other Systems
102+
103+
CoolTerm is available for a number of systems and platforms. The serial communications port descriptor is different for each, but once you discover that, things should function as described above.
104+
105+
### Geek Info
106+
107+
If you're curious, part of the info dump looks like:
108+
109+
```
110+
Version: 2.1.1 (17e4e0)
111+
Core: 2.0.5
112+
SDK: v4.4.2
113+
Setup SSID: STAC-00F8A86C
114+
Setup URL: http://setup.local
115+
Setup IP: 192.168.6.14
116+
MAC: 94:B9:6C:A8:F8:00
117+
```
118+
Here:
119+
120+
`Version` is the version number of the STAC software. The characters in brackets are the "build number" of this version.
121+
122+
`Core` is the arduino-esp32 core version used by the STAC software version.
123+
124+
`SDK` is the espressif ESP-IDF software development kit version used by the arduino-esp32 core.
125+
126+
`MAC` is the WiFi network interface MAC address.
127+
128+
Useful info if you're interested in tweaking the STAC software. File it in the trivia bucket otherwise.
129+
130+
The other bits of the data dump are covered in the *STAC Users Guide*.

README.md

+33-13
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,47 @@ There is also a Peripheral Mode where one STAC can be connected to another via a
2626

2727
Lots of good information in the *STAC User Guide*, located in the `Documentation` folder. Other interesting bits are there as well.
2828

29-
### To use this sketch:
29+
## Installation
30+
31+
### Download the Files
3032

3133
1. Here in GitHub, on the right side of the window, click the green "Latest" button under "Releases".
3234
1. Click "Source code" choosing either `zip` or `tar.gz` as you prefer.
33-
1. Unpack the downloaded `STAC-X.Y.Z` file
34-
1. Move the folder to where you keep your Arduino sketches.
35+
1. Unpack the downloaded `STAC-X.Y.Z` file.
36+
37+
### Using a Pre-Built Version
38+
39+
1. Download an ESP flasher. A recommended one is *esphome-flasher*. Available from their [Github page](https://github.com/esphome/esphome-flasher).
40+
41+
1. Connect an ATOM Matrix to your computer.
42+
43+
1. Open the ESP flasher that you downloaded.
44+
+ Select the **device serial port** *(from the "Serial port" list in esphome-flasher)* and then select the STAC software file *(clicking on "Browse" in esphome-flasher)*.
45+
+ The STAC software file you want is in the `bin` folder which is inside the `STAC` folder of the Release zip archive you downloaded. The file name is something like: `STAC_211-4c417e.bin`.
46+
47+
1. Install the software onto the ATOM Matrix *(using esphome-flasher, click "Flash ESP")*.<br>If you're using *esphome-flasher*, also click the "View Logs" button as it will show how things are progressing along with a nice welcome message from the STAC.
48+
49+
Done! Your ATOM Matrix is now a STAC 👍. Next steps are in the *STAC User Guide* in the `Documentation` folder of the Release archive.
3550

36-
### Required Libraries:
51+
### Using an IDE
3752

38-
The following libraries are required to compile this sketch.
53+
1. Move the unpacked archive you downloaded to a folder where you keep your Arduino sketches.
3954

40-
+ [FastLED](https://github.com/FastLED/FastLED) by Daniel Garcia
41-
+ [JC_Button](https://github.com/JChristensen/JC_Button) by Jack Christensen
42-
+ [I2C_MPU6886](https://github.com/tanakamasayuki/I2C_MPU6886) by TANAKA Masayuki
55+
1. Install the libraries:<br>
56+
The following libraries are required to compile this sketch.<br>
4357

44-
All of these can be installed using the Arduino IDE Library Manager.
58+
+ [FastLED](https://github.com/FastLED/FastLED) by Daniel Garcia
59+
+ [JC_Button](https://github.com/JChristensen/JC_Button) by Jack Christensen
60+
+ [I2C_MPU6886](https://github.com/tanakamasayuki/I2C_MPU6886) by TANAKA Masayuki
4561

46-
When compiling, you may see a message that JC_Button may not work as expected with the ESP32. This can be ignored.
47-
<br>
62+
All of these can be installed using the Arduino IDE Library Manager.
4863

49-
### Build System Compatibility:
64+
When compiling, you may see a message that JC_Button may not work as expected with the ESP32. This can be ignored.
5065

51-
This sketch has been built and tested using:
66+
**Build System Compatibility**
5267

68+
This sketch has been built and tested using:
69+
5370
+ arduino-esp32 core version 2.0.5
5471
+ core v2.0.3 is the minimum required. *Older cores will not work*.
5572
+ Arduino IDE version 1.8.19
@@ -59,9 +76,12 @@ This sketch has been built and tested using:
5976
+ Depending on how support for the ATOM Matrix was added, selecting either the M5Stick-C, or the M5Stack-ATOM as the target board should work.
6077
+ To compile, make sure the `STACLib` folder is located in the same folder as the `STAC.ino` file.
6178
+ Starting with v2.1, the Partition Scheme must be set to "Minimal SPIFFS (Large APPS with OTA)".
79+
<br><br>
6280

81+
---
6382
### Revision History
6483

84+
**2023-02-21:** Include info on using an ESP flasher.<br>
6585
**2023-02-04:** Revised for software v2.1.<br>
6686
**2022-07-09:** Revised arduino-esp32 core compatibility information. Added required libraries.<br>
6787
**2022-01-04:** Added information on Peripheral Mode. Minor format changes.<br>

0 commit comments

Comments
 (0)