Xylopyrographer / STAC

A Roland Smart Tally Atom Client
Other
3 stars 0 forks source link

Compiling errors #45

Closed feta00 closed 1 year ago

feta00 commented 2 years ago

HI, thanks for coding this up, I would love to get this to work, I'm trying since this morning but I keep getting compiling errors.

The only way I don't get errors is if I don't replace the 3 libraries file you modified, but all I get is a blank screen on the atom matrix, that is of course the reason you needed to modify them.

I tried with M5atom libraries 0.0.1 (as you suggested in another thread) and 0.0.9, the lastest, with different errors but no success.. Also tried using version 1.8 of the STAC, instead of the latest 1.10.. same results.

I was wondering if you have any suggestion, also because there are lots of different combinations (in between 0.0.1 and 0.0.9 there are 8 other set of libraries) so I don't think I'll be able to figure this out.

Thanks for any help and once again thanks for writing this.

Xylopyrographer commented 2 years ago

Hi @feta00 . Could you copy and paste here the errors you're seeing when compiling?

Also take look at this: https://github.com/Xylopyrographer/STAC/issues/43#issuecomment-1047148504 as it might help in the mean time.

The current release will not compile correctly with the new arduino-esp32 version 2.X core versions, so check t see if that is an issue. I've also not tested using the new Arduino v2 IDE.

feta00 commented 2 years ago

Hi and thanks for your quick reply. Please find below the errors I get, I'm using STAC 1.10, M5atom 0.0.9 libraries and esp32 1.0.6. Also Arduino IDE is version 1.8.19.

I had a look at visual studio code yesterday but seemed too much pro for me... I can dig into it more if necessary anyway.

Arduino:1.8.19 (Windows 10), Scheda:"M5Stack-ATOM, Default, 1500000, None"

In file included from C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src/M5Atom.h:53,

             from C:\Users\Re Luigi\Documents\Arduino\STAC\STAC.ino:31:

C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.h:53,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:4:

C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp: In member function 'void M5Atom::begin(bool, bool, bool)':

C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:35:7: error: 'class LED_Display' has no member named 'begin'

dis.begin();

   ^

Più di una libreria trovata per "WiFi.h"

Usata: C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\WiFi

Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

Errore durante la compilazione per la scheda M5Stack-ATOM.

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione "Mostra un output dettagliato durante la compilazione" in "File -> Impostazioni"

feta00 commented 2 years ago

just tried with 0.0.1 libraries also but I still get errors:

Arduino:1.8.19(Windows 10), Scheda:"M5Stack-ATOM, Default, 1500000,None"

In file included from C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src/M5Atom.h:53,

             from C:\Users\Re Luigi\Documents\Arduino\STAC\STAC.ino:31:

C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.h:53,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:4:

C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\utility\LED_Display.h:4,

             from C:\Users\Re Luigi\Documents\Arduino\libraries\M5Atom\src\utility\LED_Display.cpp:1:

C:\Users\Re Luigi\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:39:6: error: prototype for 'bool Preferences::begin(const char, bool, const char)' does not match any in class 'Preferences'

bool Preferences::begin(const char name, bool readOnly, const char partition_label){

  ^

In file included from C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:21:0:

C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.h:28:14: error: candidate is: bool Preferences::begin(const char*, bool)

     bool begin(const char * name, bool readOnly=false);

          ^

C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:317:1: error: 'PreferenceType' does not name a type

PreferenceType Preferences::getType(const char* key) {

^

C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:337:40: error: no 'bool Preferences::isKey(const char*)' member function declared in class 'Preferences'

bool Preferences::isKey(const char* key) {

                                    ^

Più di una libreria trovata per "WiFi.h"

Usata: C:\Users\Re Luigi\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\WiFi

Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

Errore durante la compilazione per la scheda M5Stack-ATOM.

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione "Mostra un output dettagliato durante la compilazione" in "File -> Impostazioni"

mqshaw commented 2 years ago

Hi @feta00,

As for my configuration, I am using M5Stick-C, whereas you are using M5-ATOM

Have you tried using the M5Stick-C board? And if so, is your preferences.cpp updated? That is one of the files that needs to be changed. Line 39 in the preferences files on my build states

bool Preferences::begin(const char * name, bool readOnly, const char* partition_label){
    if(_started){
        return false;

which is very different to the function declaration in your error log. Did you update the preferences file with the changes from the GitHub repo in the library folder?

 https://github.com/Xylopyrographer/STAC/tree/main/libraries

Mark

Xylopyrographer commented 2 years ago

@feta00, @mqshaw points out a few good things.

The folks over at M5Stack have been doing some tinkering with their libraries that make current versions not backward compatible with older versions. STAC does require M5Atom v0.0.1. However even with that you also need to replace a few files from their library by following the instructions here: https://github.com/Xylopyrographer/STAC/blob/main/libraries/libraries_README.md

Similarly, they have been working on a consolidated library for all their bits of hardware. However that also is causing some compatibility issues so, as Mark states, you need to select "M5Stick-C" as the target board.

You may have to uninstall all the M5Stack libraries and then reinstall just v 0.0.1 of the M5Atom library. (And replace the files noted above.)

The pragma message from FastLED is informational and can ignored.

Not sure this applies in your case, but others on the Arduino.cc and arduino-esp32 forums report issues with Windows if path names contains a space. I know it's a pain, but if the above suggestions don't work, maybe create another User on your machine without a space in the name? You would have to install the IDE to that User as well.

On the positive side, the next release of STAC does away with all libraries from M5 so none of that will be a problem. That version also compiles under both arduino-esp32 core 1.0.6 and the new core v2.0.3, which also includes the fixes to the Preferences library so no more library changes will be needed at all.

Let us know how things progress.

feta00 commented 2 years ago

Thanks to both of you for the tips and for your time. I will give a try on Monday and keep you updated. have a nice weekend.

feta00 commented 2 years ago

So guys, back to you but unfortunately with no luck. I did all you suggested, so changed my PC with another with no spaces in the user, changed the board to M5-StickC and of course I did replace the preference files as instructed in the github repo. I still get compiling errors as you see below, they seem to me the same I always got. I confirm that if I load this sketch as a test, everything works.

Arduino:1.8.19 (Windows 10), Scheda:"M5Stick-C, Default, 1500000, None"

In file included from C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Mowgli\Documents\Arduino\libraries\M5Atom\src/M5Atom.h:53,

             from C:\Users\Mowgli\Documents\Arduino\STAC\STAC.ino:31:

C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Mowgli\Documents\Arduino\libraries\M5Atom\src\M5Atom.h:53,

             from C:\Users\Mowgli\Documents\Arduino\libraries\M5Atom\src\M5Atom.cpp:4:

C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

In file included from C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/FastLED.h:67:0,

             from C:\Users\Mowgli\Documents\Arduino\libraries\M5Atom\src\utility\LED_Display.h:4,

             from C:\Users\Mowgli\Documents\Arduino\libraries\M5Atom\src\utility\LED_Display.cpp:1:

C:\Users\Mowgli\Documents\Arduino\libraries\FastLED\src/fastspi.h:145:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

                   ^

C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:39:6: error: prototype for 'bool Preferences::begin(const char, bool, const char)' does not match any in class 'Preferences'

bool Preferences::begin(const char name, bool readOnly, const char partition_label){

  ^

In file included from C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:21:0:

C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.h:28:14: error: candidate is: bool Preferences::begin(const char*, bool)

     bool begin(const char * name, bool readOnly=false);

          ^

C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:317:1: error: 'PreferenceType' does not name a type

PreferenceType Preferences::getType(const char* key) {

^

C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\Preferences.cpp:337:40: error: no 'bool Preferences::isKey(const char*)' member function declared in class 'Preferences'

bool Preferences::isKey(const char* key) {

                                    ^

Più di una libreria trovata per "WiFi.h"

Usata: C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\WiFi

Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

Errore durante la compilazione per la scheda M5Stick-C.

Questo report potrebbe essere più ricco di informazioni abilitando l'opzione "Mostra un output dettagliato durante la compilazione" in "File -> Impostazioni"

Xylopyrographer commented 2 years ago

@feta00 No problem. We'll get you there 😄.

Looks like the revised Preferences library needs to move to it's proper directory.

The modified Preferences.cpp file needs to be in:

C:\Users\Mowgli\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\Preferences\src\

not in:

C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\Preferences\src\

(The modified Preferences.cpp file is part of the ESP32 core, not part of the M5Stack support libraries. See the "Improved Preferences Library" part of the libraries_README.md file.)

I think this is the root of the problem as in its current location (the ...\m5stack\... directory), there his no corresponding Preferences.h file so things like PreferencesType definition is not being seen during compilation.

Once Preferences.cpp it's moved, delete the Preferences folder located in C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\

After that, can you try compiling the StartCounter example (in the Arduino IDE under Files -> Examples -> Preferences). That'll confirm that the library is in the right place.

Turning on verbose output would help further with debugging.

(Questo report potrebbe essere più ricco di informazioni abilitando l'opzione "Mostra un output dettagliato durante la compilazione" in "File -> Impostazioni")

Seems odd you're seeing multiple instances of the pragma message from the FastLED library, but one thing at a time.

Let us know if that does the trick.

feta00 commented 2 years ago

so guys, seems we got it up and running, and I now understand what I was doing wrong..

so basically last friday, when I spent the all day trying to figure out why I couldn't be able to get it running, one of the things I tried was to reinstall everything and start from zero, as I was getting confused after so many attempts. And one thing I forgot at that point was to reinstall the esp32 library. Unfortunately, the preferences path for both the esp32 and m5stack is identical, and this didn't help me to find the mistake.

So thanks a lot for finding this out, now I got all my 4 matrix with STAC installed and ready for configuration tomorrow, which I believe will be straight forward.

Just a couple of more things that may be useful for others just in case:

first, it's not necessary to use M5Stick-C as the target board, it works flawlessy with M5Stack also.

then, deleting the preferences folder as you suggested:

Once Preferences.cpp it's moved, delete the Preferences folder located in C:\Users\Mowgli\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\1.0.6\libraries\

did not work for me, I got an error when I did this, restoring the folder at its original path did the trick.

lastly, it doesn't seem that spaces in the path name will make any difference, altough is always better not to use them.

So, thanks again for your help, I don't think I would have been able to get it bymyself. And apologies for my mistakes, I'm not a programmer, just a kind of geek, it was my first time dealing with this...

mqshaw commented 2 years ago

Very glad that you were able to get it up and running.

Don't forget that there is a Python 3 simulator tool that you can use to test your STAC's in the absence of hardware switcher.

 https://github.com/Xylopyrographer/STAC/tree/main/SmartTally%20Server

Another thing to try ( if you need to start debugging ) is to use the Microsoft Visual Studio Code IDE, it is a much more powerful development environment than the Arduino IDE. You just need a config folder ( .vscode ) in the folder with the .ino file, change the paths to reflect your system and it works like a charm (attached).

 https://code.visualstudio.com/
 https://github.com/Xylopyrographer/STAC/files/8884276/vscode_config.zip

We have been using multiple STACs in our setup for over a year now, and they are so helpful for our camera operators.

Xylopyrographer commented 2 years ago

@feta00 Great to hear you're good to go. Let us know if the the configuration works!

Thanks as well for your comments. Look for a new release in a couple of weeks or so that will remove the need to fuss with the library files.

feta00 commented 2 years ago

hi guys, just to let you know that I get stuck at the purple cross, seems the atoms can't communicate with the switcher (a brand new V-160HD).. I can't understand why, of course all the IP settings are correct and the atoms connects correctly to the wifi, I will try with the emulator when I find a minute to test it..

Xylopyrographer commented 2 years ago

@feta00 One step forward... 😉

That is a nice piece of kit!

Couple of things to check:

  1. Ensure the switch has a static IP address assigned & use that address when configuring the STAC.
  2. Confirm that you can retrieve the tally status using a phone or some other browser. (Page 72 of the manual.)

I've not seen a V-160HD in the wild so it's possible Roland tweaked the Smart Tally protocol in a way that makes it incompatible with the STAC. But if that turns out to be the case, I'm sure we can get a version out that will work.

If you're curious the STAC Communications document describes what the STAC is looking for when talking to a switch.

feta00 commented 2 years ago

Hi, yes I confirm the switcher has a static IP address, or anyway a rule assigned in the router that assign to the V-160HD always the same IP address if set in DHCP. And I confirm the smart tally works fine using a browser in a phone.

There something I thought can be useful: the network connection in the V-160HD Is in someway password protected. I mean, when you want to control the switcher with the official Roland RCS app you need the IP address and a 4 digits passcode that you setup in the switcher itself.

I don't know this is the case also for other smart tally switchers, as we don't own any with this functionality, but I'm wondering if this could be the issue.

Xylopyrographer commented 2 years ago

@feta00 On our V-60HD we can run RCS and the STACs concurrently. The protocols don't conflict. Only password you should need for the STAC is for the WiFi network that the V-160HD is connected to.

Using the Arduino serial monitor, you can look at the output of one of your configured STACs and confirm the info is correct. (Except the password.)

mqshaw commented 2 years ago

@feta00 If you use a laptop connected to the same network, and browse to the IP Address of the Roland, you should see the embedded web server (EWS). I see, you have verified that the EWS is up and running. Another test is to try the Python Simulator that is on Github. We know that this works ( assuming the PC firewall is turned off ), that will allow you to verify that your STACs are working as designed.

feta00 commented 2 years ago

I will try the emulator as soon as I can, it will take me a while, my next weeks are quite busy. I’ll come back to you then. cheers.

Xylopyrographer commented 1 year ago

Closing. Assumed completed.