saokath 0 Posted October 23, 2018 Share Posted October 23, 2018 Hi, This is my first time using this forum. I saw that someone has done the code for connecting CC3200 to cayenne, but not for CC3220. Just want to enquire if anyone has done the codes for connecting CC3220 to cayenne MQTT using energia? Quote Link to post Share on other sites
Rei Vilo 695 Posted October 23, 2018 Share Posted October 23, 2018 The code for CC3200 should be compatible with the CC3220. Have you tried? Quote Link to post Share on other sites
saokath 0 Posted October 23, 2018 Author Share Posted October 23, 2018 Yeah i tried, but instead i got this error : exit status 1 Error compiling for board CC3220SF-LAUNCHXL (80MHz). Quote Link to post Share on other sites
Rei Vilo 695 Posted October 23, 2018 Share Posted October 23, 2018 As for the verbose output in Preferences and post the whole log. Quote Link to post Share on other sites
saokath 0 Posted October 24, 2018 Author Share Posted October 24, 2018 Energia: 1.6.10E18 (Windows 10), Board: "CC3220SF-LAUNCHXL (80MHz)" In file included from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoDefines.h:130:0, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFiClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFi.h:25, from C:\Users\165085T\Desktop\example\example.ino:13: C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/DetectDevice.h:83:10: warning: #warning "Cannot detect board type" [-Wcpp] #warning "Cannot detect board type" ^~~~~~~ In file included from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTClient/CayenneMQTTClient.h:24:0, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMessage.h:32, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneHandlers.h:29, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoDefines.h:131, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFiClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFi.h:25, from C:\Users\165085T\Desktop\example\example.ino:13: c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h: In member function 'void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long int)': c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h:143:23: error: there are no arguments to 'ltoa' that depend on a template parameter, so a declaration of 'ltoa' must be available [-fpermissive] ltoa(value, str, 10); ^ c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h:143:23: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h: In member function 'void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long unsigned int)': c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h:158:24: error: there are no arguments to 'ultoa' that depend on a template parameter, so a declaration of 'ultoa' must be available [-fpermissive] ultoa(value, str, 10); ^ In file included from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFiClient.h:21:0, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFi.h:25, from C:\Users\165085T\Desktop\example\example.ino:13: C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h: In member function 'void CayenneArduinoMQTTClient::connect()': C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:59:63: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] if (!NetworkConnect(&_network, CAYENNE_DOMAIN, CAYENNE_PORT)) { ^ In file included from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTClient/CayenneMQTTClient.h:24:0, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMessage.h:32, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneHandlers.h:29, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoDefines.h:131, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFiClient.h:21, from C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneMQTTWiFi.h:25, from C:\Users\165085T\Desktop\example\example.ino:13: c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h: In instantiation of 'void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]': C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:331:3: required from 'static void CayenneArduinoMQTTClient::publishData(CayenneTopic, unsigned int, const T&, const char*, const char*) [with T = long int; CayenneTopic = CayenneTopic]' C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:126:61: required from here c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h:143:8: error: 'ltoa' was not declared in this scope ltoa(value, str, 10); ~~~~^~~~~~~~~~~~~~~~ c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h: In instantiation of 'void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]': C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:331:3: required from 'static void CayenneArduinoMQTTClient::publishData(CayenneTopic, unsigned int, const T&, const char*, const char*) [with T = long unsigned int; CayenneTopic = CayenneTopic]' C:\Users\165085T\Documents\Energia\libraries\Cayenne-MQTT-LaunchPadCC3200-master\src/CayenneArduinoMQTTClient.h:141:14: required from 'void CayenneArduinoMQTTClient::virtualWrite(unsigned int, const T&, const char*, const char*) [with T = long unsigned int]' C:\Users\165085T\Desktop\example\example.ino:52:39: required from here c:\users\165085t\documents\energia\libraries\cayenne-mqtt-launchpadcc3200-master\src\cayenneutils\cayennedataarray.h:158:9: error: 'ultoa' was not declared in this scope ultoa(value, str, 10); ~~~~~^~~~~~~~~~~~~~~~ exit status 1 Error compiling for board CC3220SF-LAUNCHXL (80MHz). This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. Quote Link to post Share on other sites
Rei Vilo 695 Posted October 24, 2018 Share Posted October 24, 2018 CC3220SF board not detected You need to edit the DetectDevice.h file and add the reference for the CC3220. #if defined(ENERGIA) #define INFO_DEVICE "Energia" #if defined(__MSP430F5529__) #define INFO_CPU "MSP430F5529" #define NO_FLOAT // Added support for CC3200 and other LaunchPads // Rei Vilo, Nov. 30, 2016 — CC = BY SA NC #define F(x) x #elif defined(__CC3200R1M1RGC__) #define INFO_CPU "CC3200R1M1RGC" #define NO_FLOAT #else #define INFO_CPU "Other LaunchPad" #warning "Cannot detect board type" #endif ltoa() See CC3220 — 'ltoa' was not declared in this scope #30. An issue similar to ltoa was reported and fixed at itoa.h Issue with CC3200 Examples #19. Quote Link to post Share on other sites
saokath 0 Posted October 25, 2018 Author Share Posted October 25, 2018 After editing the DetectDevice.h file, i got this error : Energia: 1.6.10E18 (Windows 10), Board: "CC3220SF-LAUNCHXL (80MHz)" CC3220:20: error: universal character \u00bb is not valid in an identifier #endif ^ CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: universal character \u00bb is not valid in an identifier CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: universal character \u00bb is not valid in an identifier CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: universal character \u00bb is not valid in an identifier CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: universal character \u00bb is not valid in an identifier CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: universal character \u00bb is not valid in an identifier CC3220:20: error: universal character \u00bf is not valid in an identifier CC3220:20: error: invalid preprocessing directive #endif\U000000ef\U000000bb\U000000bf\U000000ef\U000000bb\U000000bf\U000000ef\U000000bb\U000000bf\U000000ef\U000000bb\U000000bf\U000000ef\U000000bb\U000000bf\U000000ef\U000000bb\U000000bf #endif ^~~~~~~~~~~~~~~~~~~~~~~ CC3220:5: error: unterminated #else #if defined(__MSP430F5529__) C:\Users\165085T\Desktop\CC3220\CC3220.ino: In function 'void setupCC3220()': CC3220:41: error: 'ltoa' was not declared in this scope ltoa(value, str, 10); ^ CC3220:43: error: 'Cayenne' was not declared in this scope Cayenne.begin(username, password, clientID, ssid, wifiPassword); ^~~~~~~ C:\Users\165085T\Desktop\CC3220\CC3220.ino: In function 'void loopCC3220()': CC3220:49: error: 'Cayenne' was not declared in this scope Cayenne.loop(); ^~~~~~~ C:\Users\165085T\Desktop\CC3220\CC3220.ino: At global scope: CC3220:69: error: ISO C++ forbids declaration of 'CAYENNE_IN_DEFAULT' with no type [-fpermissive] CAYENNE_IN_DEFAULT() ^ C:\Users\165085T\Desktop\CC3220\CC3220.ino: In function 'int CAYENNE_IN_DEFAULT()': CC3220:71: error: 'request' was not declared in this scope CAYENNE_LOG("CAYENNE_IN_DEFAULT(%u) - %s, %s", request.channel, getValue.getId(), getValue.asString()); ^~~~~~~ CC3220:71: error: 'getValue' was not declared in this scope CAYENNE_LOG("CAYENNE_IN_DEFAULT(%u) - %s, %s", request.channel, getValue.getId(), getValue.asString()); ^~~~~~~~ CC3220:71: error: 'CAYENNE_LOG' was not declared in this scope CAYENNE_LOG("CAYENNE_IN_DEFAULT(%u) - %s, %s", request.channel, getValue.getId(), getValue.asString()); ^ exit status 1 universal character \u00bb is not valid in an identifier This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. Quote Link to post Share on other sites
Rei Vilo 695 Posted October 25, 2018 Share Posted October 25, 2018 The file seems to have been corrupted. Quote Link to post Share on other sites
saokath 0 Posted October 29, 2018 Author Share Posted October 29, 2018 Sorry, i made a mistake, the board is CC3220SF instead of CC3220. Is the code for CC3200 compatible with CC3220SF? Quote Link to post Share on other sites
Rei Vilo 695 Posted February 1, 2019 Share Posted February 1, 2019 Yes. However, the WiFi library has changed: use WiFiMKII instead of WiFi. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.