I'm trying to communicate with some industrial hardware, on ModBusRTU, from my Intel Galileo Gen2 board. I use this board to convert UART to RS485 http://linksprite.com/wiki/index.php5?title=RS485_Shield_V2.1_for_Arduino and I can talk serially between Arduino (with SoftwareSerial on pin 2/3) and Galileo (with Serial1 on pin 0/1). So I know the RS485's link is working.
With Arduino Uno I can talk with my devices using ModBusRTU, thanks to this library https://github.com/4-20ma/ModbusMaster
On galileo gen2 I receveid this warning "WARNING: library ModbusMaster claims to run on [avr, sam] architecture(s) and may be incompatible with your current board which runs on [i586] architecture(s). " because of the different architecture.
Now I'm trying to use the examples of cooking hack's tutorial about modbus and rs485 for arduino, raspberry and galileo but I can't make it works for me. I receveid tons of compiling errors like these:
C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp: In member function 'uint8_t ModbusMaster485::ModbusMasterTransaction(uint8_t)': C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:701:50: error: '_crc16_update' was not declared in this scope
C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:814:52: error: '_crc16_update' was not declared in this scope
C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp: At global scope:
C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:881:14: error: prototype for 'unsigned int ModbusMaster485::makeWord(unsigned int)' does not match any in class 'ModbusMaster485'
In file included from C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:25:0: C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.h:302:11: error: candidates are: uint16_t ModbusMaster485::makeWord(uint8_t, uint8_t)
C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.h:301:14: error: uint16_t ModbusMaster485::makeWord(uint16_t) C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:887:14: error: prototype for 'unsigned int ModbusMaster485::makeWord(uint8_t, uint8_t)' does not match any in class 'ModbusMaster485'
In file included from C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.cpp:25:0: C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.h:302:11: error: candidates are: uint16_t ModbusMaster485::makeWord(uint8_t, uint8_t) C:\Intel\arduino-1.6.4\libraries\ModBusMaster485\ModbusMaster485.h:301:14: error: uint16_t ModbusMaster485::makeWord(uint16_t) Error compiling.
Did someone has got ModBus working on Galileo Gen2?
Thank you, Aldo