Problem compiling IridiumSBD library with Teensy

Status
Not open for further replies.

George1

Active member
Hi,

I would like to use the RockBLOCK Mk2 - Iridium SatComm Module (https://www.sparkfun.com/products/13745) with Teensy 3.2 and 3.6 to communicate data from remote stations. They recommend using the IridiumSBD Library developed by Mikal Hart (http://arduiniana.org/libraries/iridiumsbd/). I am running Arduino: 1.8.5 (Windows 7), TD: 1.40 and trying to compile basic include example code BasicSend.ino, but the code in not compiling when Teensy 3.2 or 3.6 is used as a target device. It compiles when Arduino UNO or Mega are selected as targets. I suspect issue is with Teensyduino . I get the following compiler error:


Code:
Arduino: 1.8.5 (Windows 7), TD: 1.40, Board: "Teensy 3.6, Serial, 24 MHz, Faster, US English"

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp: In member function 'int IridiumSBD::internalSendReceiveSBD(const char*, const uint8_t*, size_t, uint8_t*, size_t*)':

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp:252:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

       for (int i=0; i<txDataSize; ++i)

                      ^

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp:259:25: error: call of overloaded 'console(size_t&)' is ambiguous

       console(txDataSize);

                         ^

In file included from C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp:25:0:

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.h:151:9: note: candidate: void IridiumSBD::console(uint16_t)

    void console(uint16_t n);

         ^

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.h:152:9: note: candidate: void IridiumSBD::console(char)

    void console(char c);

         ^

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp: In member function 'bool IridiumSBD::waitForATResponse(char*, int, const char*, const char*)':

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp:442:9: warning: unused variable 'done' [-Wunused-variable]

    bool done = false;

         ^

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp: In member function 'int IridiumSBD::doSBDRB(uint8_t*, size_t*)':

C:\Users\MyAccount\Documents\Arduino\libraries\IridiumSBD\IridiumSBD.cpp:621:13: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

          if (rxBuffer && prxBufferSize)

             ^

Error compiling for board Teensy 3.6.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
That looks like it is not especially a Teensyduino issue, but rather a gcc and/or toolchain issue. Teensyduino uses a more up to date c++ version and the corresponding toolchain which reacts more allergic to lousy programming. You can do two things: The academic option is to fix the ambiguity issues in the library and tell its developers that they have done a bad job. The lazy option would be to revert to Teensyduino 1.35 with the old toolchain.
 
Looks like this lib needs another console() overload for size_t. Mikal probably only ever tested on AVR where size_t is 16 bits.
 
Hi,

Well I have some good news. There is new library updated by Mikal Hart located at https://github.com/mikalhart/IridiumSBD. It is version 2.0 and it was updated 21 days ago and most importantly it compiles with Arduino 1.85 and TD 1.40.

Thanks a lot for all the helpful advice and thank you to especially to Mikal Hart for still continuing to support and update his earlier work. You smart people are amazing and I hope to continue to learn from you. Once I do more testing I will try to also confirm that it is working well in my application.

Thanks
 
Status
Not open for further replies.
Back
Top