Using Industruino with Cayenne

#1

Hi I have tried to connect Industruino (Indio) w/ Ethernet w5500 using Cayenne bring your device option. Installed the MQTT Arduino library but getting this error: wen tried to upload EthernetShieldW5500 example:
#warning “Cannot detect board type”.

Is it that Industruino is not supported ? Any idea how to fix this?

0 Likes

#2

have you selected arduino leonardo board in tools?

0 Likes

#3

Hi, selecting leonardo in tools doesn’t work. And it’s industruino, so I have selected Industruino D21G from tools…

0 Likes

#4

sorry, i am not familiar with industruino and the 1st post search on google gave me the link to select Leonardo. now read the docs and there is a separate board option for it.
can you share the entire error from the IDE. are you able to load other basic sketches?

0 Likes

#5

Actually when trying to load the examples from Cayenne MQTT library it’s bricking the device. All other examples from Indio, Ethernet2 or lcd UC1701 is working fine though. This is the kind of error I get when trying to load Cayenne library example:

In file included from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoDefines.h:127:0,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoMQTTClient.h:21,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTEthernetClient.h:21,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTEthernetW5500.h:25,
                 from /tmp/arduino_modified_sketch_350860/EthernetShieldW5500.ino:16:
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/DetectDevice.h:240:10: warning: #warning "Cannot detect board type" [-Wcpp]
         #warning "Cannot detect board type"
          ^
In file included from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoDefines.h:127:0,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp:26:
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/DetectDevice.h:240:10: warning: #warning "Cannot detect board type" [-Wcpp]
         #warning "Cannot detect board type"
          ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c: In function 'CayenneMQTTPublishDataInt':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c:135:2: warning: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
  itoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c: In function 'CayenneMQTTPublishDataUInt':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c:158:2: warning: implicit declaration of function 'utoa' [-Wimplicit-function-declaration]
  utoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c: In function 'CayenneMQTTPublishDataLong':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c:181:2: warning: implicit declaration of function 'ltoa' [-Wimplicit-function-declaration]
  ltoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c: In function 'CayenneMQTTPublishDataULong':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c:204:2: warning: implicit declaration of function 'ultoa' [-Wimplicit-function-declaration]
  ultoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c: In function 'CayenneMQTTPublishDataDouble':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTClient/CayenneMQTTClient.c:227:2: warning: implicit declaration of function 'dtostrf' [-Wimplicit-function-declaration]
  dtostrf(value, 5, 3, str);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c: In function 'buildSuffix':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:88:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = COMMAND_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:91:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = DATA_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:94:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = RESPONSE_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:97:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = SYS_MODEL_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:100:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = SYS_VERSION_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c: In function 'CayenneDataArrayAddInt':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:103:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = SYS_CPU_MODEL_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneUtils.c:106:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   topicString = SYS_CPU_SPEED_STRING;
               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c:87:2: warning: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
  itoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c: In function 'CayenneDataArrayAddUInt':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c:105:2: warning: implicit declaration of function 'utoa' [-Wimplicit-function-declaration]
  utoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c: In function 'CayenneDataArrayAddLong':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c:123:2: warning: implicit declaration of function 'ltoa' [-Wimplicit-function-declaration]
  ltoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c: In function 'CayenneDataArrayAddULong':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c:141:2: warning: implicit declaration of function 'ultoa' [-Wimplicit-function-declaration]
  ultoa(value, str, 10);
  ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c: In function 'CayenneDataArrayAddDouble':
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDataArray.c:159:2: warning: implicit declaration of function 'dtostrf' [-Wimplicit-function-declaration]
  dtostrf(value, 5, 3, str);
  ^
Sketch uses 27338 bytes (95%) of program storage space. Maximum is 28672 bytes.
Global variables use 1006 bytes (39%) of dynamic memory, leaving 1554 bytes for local variables. Maximum is 2560 bytes.

avrdude: butterfly_recv(): programmer is not responding
0 Likes

#6

those are just warning (#warning “Cannot detect board type”) suggesting that the board is not listed in the DeviceDetect file. the issue here is the avrdude: butterfly_recv(): programmer is not responding with the leonardo. there are many post w.r.t this topic https://www.google.com/search?q=avrdude+butterfly_recv()+programmer+is+not+responding+arduino+leonardo&sa=X&ved=2ahUKEwjfqo-C8afhAhWI8HMBHTOBAP8Q1QIoB3oECAoQCA&biw=1440&bih=821 and some suggest that double pressing reset while uploading fixes it while other suggest to use an UNO as ISP, wired into the Leonardos ICSP and burned the bootloader.

0 Likes

#7

I think selecting Leonardo will not work since Industruino official website says to use the Industruino library to load sketch on Industruino. Now I get this;

Arduino: 1.8.9 (Linux), Board: "Industruino D21G"

Build options changed, rebuilding all
In file included from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoDefines.h:127:0,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoMQTTClient.h:21,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTEthernetClient.h:21,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneMQTTEthernetW5500.h:25,
                 from /tmp/arduino_modified_sketch_354627/EthernetShieldW5500.ino:16:
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/DetectDevice.h:240:10: warning: #warning "Cannot detect board type" [-Wcpp]
         #warning "Cannot detect board type"
          ^
In file included from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoDefines.h:127:0,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp:26:
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/DetectDevice.h:240:10: warning: #warning "Cannot detect board type" [-Wcpp]
         #warning "Cannot detect board type"
          ^
In file included from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneUtils/CayenneDefines.h:52:0,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneArduinoDefines.h:29,
                 from /home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp:26:
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp: In function 'void (* GetInputHandler(uint8_t))(Request&, CayenneMessage&)':
/home/dragonfly/.arduino15/packages/industruino/hardware/samd/1.0.1/cores/industruino/avr/pgmspace.h:103:61: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 #define pgm_read_word(addr) (*(const unsigned short *)(addr))
                                                             ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp:148:31: note: in expansion of macro 'pgm_read_word'
  return (InputHandlerFunction)pgm_read_word(&InputHandlerVector[channel]);
                               ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp: In function 'void (* GetOutputHandler(uint8_t))(Request&)':
/home/dragonfly/.arduino15/packages/industruino/hardware/samd/1.0.1/cores/industruino/avr/pgmspace.h:103:61: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 #define pgm_read_word(addr) (*(const unsigned short *)(addr))
                                                             ^
/home/dragonfly/Arduino/libraries/Cayenne-MQTT-Arduino-master/src/CayenneHandlers.cpp:159:32: note: in expansion of macro 'pgm_read_word'
  return (OutputHandlerFunction)pgm_read_word(&OutputHandlerVector[channel]);
                                ^
Sketch uses 42256 bytes (16%) of program storage space. Maximum is 262144 bytes.
Atmel SMART device 0x10010005 found
Device       : ATSAMD21G18A
Chip ID      : 10010005
Version      : v2.0 [Arduino:XYZ] Aug  1 2017 11:04:45
Address      : 16384
Pages        : 3840
Page Size    : 64 bytes
Total Size   : 240KB
Planes       : 1
Lock Regions : 16

SAM-BA operation failed
An error occurred while uploading the sketch
Locked       :
0 Likes

#8

if you click on compile does the code compile successfully?

0 Likes

#9

When I just compile it gives all the warnings just like above, and when try to upload it gives the SAM-BA operation failed… and bricks the device

0 Likes

#10

while compiling it does not give any error to me

0 Likes

#11

for example I have selected Examples > Cayennet MQTT > EthernetShieldW5500 it’s giving me same cannot detect board type warning

0 Likes

#12

can you join me on slack http://slack.mydevices.com/

0 Likes