Thinxtra / Xkit-Sample

Sample Code for the Xkit. The perfect way to get started with Sigfox, the Thinxtra devkit Xkit boasts a full suite of features and accessories to empower anyone to set up an IoT solution, even with very little hardware experience. Perfect for start-ups, design houses, universities and schools, the kit has everything you need to hit the ground running using the globally available Sigfox network.
23 stars 21 forks source link

Many errors trying to compile XKit-Sample #6

Open teverth opened 6 years ago

teverth commented 6 years ago

I am starting to experiment with the XKit and was just trying to simply compile your sample code. Not a great start.

Can you have a look what is wrong with your code please:

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

Build options changed, rebuilding all

In file included from XKitDemo.ino:22:0: C:\Users\Thomas\Documents\Arduino\libraries\Tsensors/Tsensors.h:107:6: error: extra qualification 'Tsensors::' on member 'getACK' [-fpermissive] int Tsensors::getACK(uint8_t addr); ^ XKitDemo.ino: In function 'void setup()': XKitDemo:81: error: invalid conversion from 'void ()()' to 'void ()()' [-fpermissive] In file included from XKitDemo.ino:22:0: C:\Users\Thomas\Documents\Arduino\libraries\Tsensors/Tsensors.h:83:8: error: initializing argument 1 of 'void Tsensors::setReed(void ()())' [-fpermissive] void setReed(void (InterruptService(void))); ^ XKitDemo:83: error: invalid conversion from 'void ()()' to 'void ()()' [-fpermissive] In file included from XKitDemo.ino:22:0: C:\Users\Thomas\Documents\Arduino\libraries\Tsensors/Tsensors.h:78:7: error: initializing argument 1 of 'void Tsensors::setButton(void ()())' [-fpermissive] void setButton(void (service(void))); ^ XKitDemo.ino: In function 'void GetDeviceID()': XKitDemo:270: error: invalid conversion from 'const char' to 'char' [-fpermissive] In file included from C:\Users\Thomas\Documents\Arduino\libraries\Isigfox/WISOL.h:13:0, from XKitDemo.ino:21: C:\Users\Thomas\Documents\Arduino\libraries\Isigfox/Isigfox.h:87:17: error: initializing argument 1 of 'virtual int Isigfox::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] virtual int sendMessage(char outData, const uint8_t len, recvMsg receivedMsg) = 0; ^ invalid conversion from 'void ()()' to 'void (*)()' [-fpermissive]

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

teverth commented 6 years ago

After resolving some of these errors the compiler gets a bit further to many more errors. Any idea why this is so buggy? Did this work for anybody?

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

Using library Isigfox in folder: C:\Users\Thomas\Documents\Arduino\libraries\Isigfox (legacy)

Using library Tsensors in folder: C:\Users\Thomas\Documents\Arduino\libraries\Tsensors (legacy)

Using library Wire in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

Using library SimpleTimer in folder: C:\Users\Thomas\Documents\Arduino\libraries\SimpleTimer (legacy)

Using library Arduino Watchdog Handler in folder: C:\Users\Thomas\Documents\Arduino\libraries\Arduino-Watchdog-Handler-master

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Thomas\Documents\Arduino\libraries\Isigfox -IC:\Users\Thomas\Documents\Arduino\libraries\Tsensors -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Thomas\Documents\Arduino\libraries\SimpleTimer -IC:\Users\Thomas\Documents\Arduino\libraries\Arduino-Watchdog-Handler-master C:\Users\Thomas\AppData\Local\Temp\build5984905135632522811.tmp\XKitDemo.cpp -o C:\Users\Thomas\AppData\Local\Temp\build5984905135632522811.tmp\XKitDemo.cpp.o

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Users\Thomas\Documents\Arduino\libraries\Isigfox -IC:\Users\Thomas\Documents\Arduino\libraries\Tsensors -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Thomas\Documents\Arduino\libraries\SimpleTimer -IC:\Users\Thomas\Documents\Arduino\libraries\Arduino-Watchdog-Handler-master -IC:\Users\Thomas\Documents\Arduino\libraries\Isigfox\utility C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp -o C:\Users\Thomas\AppData\Local\Temp\build5984905135632522811.tmp\Isigfox\WISOL.cpp.o

C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp: In member function 'virtual int WISOL::testComms()': C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:185:55: error: invalid conversion from 'const char' to 'char' [-fpermissive] receivedResult = sendMessage(testchar, 2, receivedMsg); // Send message ^ In file included from C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:9:0: C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.h:31:6: error: initializing argument 1 of 'virtual int WISOL::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] int sendMessage(char outData, const uint8_t len, recvMsg receivedMsg); ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp: In member function 'int WISOL::prepareZone()': C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:385:78: error: invalid conversion from 'const char' to 'char' [-fpermissive] receivedResult = sendMessage(testchar, (int) strlen(testchar), receivedMsg); ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:339:5: error: initializing argument 1 of 'virtual int WISOL::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] int WISOL::sendMessage(char outData, const uint8_t len, recvMsg receivedMsg){ ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:403:78: error: invalid conversion from 'const char' to 'char' [-fpermissive] receivedResult = sendMessage(testchar, (int) strlen(testchar), receivedMsg); ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:339:5: error: initializing argument 1 of 'virtual int WISOL::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] int WISOL::sendMessage(char outData, const uint8_t len, recvMsg receivedMsg){ ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp: In member function 'void WISOL::checkChangeZone()': C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:426:62: error: invalid conversion from 'const char' to 'char' [-fpermissive] receivedResult = sendMessage(msg, (int) strlen(msg), RecvMsg); ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:339:5: error: initializing argument 1 of 'virtual int WISOL::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] int WISOL::sendMessage(char outData, const uint8_t len, recvMsg receivedMsg){ ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:437:73: error: invalid conversion from 'const char' to 'char' [-fpermissive] receivedResult = sendMessage(testchar, (int) strlen(testchar), RecvMsg); ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:339:5: error: initializing argument 1 of 'virtual int WISOL::sendMessage(char, uint8_t, recvMsg)' [-fpermissive] int WISOL::sendMessage(char outData, const uint8_t len, recvMsg receivedMsg){ ^ C:\Users\Thomas\Documents\Arduino\libraries\Isigfox\WISOL.cpp:442:9: error: return-statement with a value, in function returning 'void' [-fpermissive] return receivedResult; ^ Error compiling.

ThomasHoThinxtra commented 6 years ago

Hi teverth, The Arduino indeed returns many warnings for type conversion. However, there are no errors as in you case. The Arduino Studio version I am using is 1.8.1. Would you please try to update the Arduino and try again? Thanks.

Regards.

jamesle-0812 commented 6 years ago

Hi guys, I have a problem while uploading the code. Please make a double check. ` In file included from E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:19:0:

C:\Users\James\Documents\Arduino\libraries\Tsensors/Tsensors.h:107:6: warning: extra qualification 'Tsensors::' on member 'getACK' [-fpermissive]

int Tsensors::getACK(uint8_t addr);

  ^

E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino: In function 'void setup()':

E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:77:27: warning: invalid conversion from 'void ()()' to 'void (*)()' [-fpermissive]

tSensors->setReed(reedIR);

                       ^

In file included from E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:19:0:

C:\Users\James\Documents\Arduino\libraries\Tsensors/Tsensors.h:83:8: note: initializing argument 1 of 'void Tsensors::setReed(void ()())'

void setReed(void (*InterruptService(void)));

    ^

E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:79:31: warning: invalid conversion from 'void ()()' to 'void (*)()' [-fpermissive]

tSensors->setButton(buttonIR);

                           ^

In file included from E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:19:0:

C:\Users\James\Documents\Arduino\libraries\Tsensors/Tsensors.h:78:7: note: initializing argument 1 of 'void Tsensors::setButton(void ()())'

void setButton(void (*service(void)));

   ^

E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino: In function 'void GetDeviceID()':

E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:266:39: warning: invalid conversion from 'const char' to 'char' [-fpermissive]

Isigfox->sendMessage(msg, 7, RecvMsg);

                                   ^

In file included from C:\Users\James\Documents\Arduino\libraries\Isigfox/WISOL.h:13:0,

             from E:\OneDrive\Project\Xkit-Sample-master\DemoApp\DemoApp.ino:18:

C:\Users\James\Documents\Arduino\libraries\Isigfox/Isigfox.h:87:17: note: initializing argument 1 of 'virtual int Isigfox::sendMessage(char, uint8_t, recvMsg)'

 virtual int sendMessage(char *outData, const uint8_t len, recvMsg *receivedMsg) = 0;

             ^

Sketch uses 16826 bytes (52%) of program storage space. Maximum is 32256 bytes. Global variables use 1260 bytes (61%) of dynamic memory, leaving 788 bytes for local variables. Maximum is 2048 bytes. avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 An error occurred while uploading the sketch ` Thank!

adriens commented 5 years ago

Hi, same here on Win10

2018-12-14 17_32_04-sigfox _ arduino 1 8 8

I've followed all instructions found in the attached pdf Xkit_Development_Guide_For_Arduino_v10.pdf

I'm quite frustrated 😯

adriens commented 5 years ago

Please help 😄 🆘

adriens commented 5 years ago

I've created a dedicated issue in case it ay help see #9

omarcoaur3lio commented 5 years ago

Hi, To upload a sketch to the Arduino board (with the Xkit shield plugged into it), you must remove the P9 jumpers on the Xkit or disconnect you Xkit of the arduino

adriens commented 5 years ago

Thanks a lot @sgtmarcoaurelio , I give it a try and will letyou know. :crossed_fingers: