FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
158 views 1 comments
by anonymous

Hello,

new SDK (RUT9_R_GPL_00.07.03) contains libmodbus + couple of patches.

One of them changes the interface to original libmodbus => not possible to compile previously developed software.

...

-MODBUS_API int modbus_read_registers(modbus_t *ctx, int addr, int nb, uint16_t *dest);

-MODBUS_API int modbus_read_input_registers(modbus_t *ctx, int addr, int nb, uint16_t *dest);

+MODBUS_API int modbus_read_registers(modbus_t *ctx, int addr, int nb, uint8_t *dest);

+MODBUS_API int modbus_read_input_registers(modbus_t *ctx, int addr, int nb, uint8_t *dest);

...
How to keep original libmodbus in a build system and properly link the software ?
thank you,
A.B.

1 Answer

0 votes
by anonymous
Hello,

I have forwarded your question to the development team. Once I get a reply, I will post here.

Best regards,
by anonymous

Hello,

Below is a brief suggestion from the developers:

"If you want to keep original interfaces, then probably the easiest way is to add another libmodbus package without patches and name it like libmodbus_org (or something like that) and link your previously developed software with libmodbus_org.

Another option is to update your developed software with our patches."

Best regards,