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
180 views 1 comments
by anonymous
Hi,
I use a C program developed by myself to manage the TRB142's serial port and UDP communications.
I would like to add digital I/O management to my program.
Question:
How can I read the digital inputs (analog for TRB141) and write the digital outputs from the C program?
Is there a library that I can include in the C program and reference the I/Os?
Or can I access the I/Os in some other way?

Thanks for your help with this.
Geza

1 Answer

0 votes
by anonymous

Hello,

The simplest option would be to run CLI commands on the router, the commands for this device can be found on our wiki page.

For IO control our router uses libioman, you could try to use this library to achieve your goals

by anonymous

I could not add the libioman library to my program. But using CLI commands works. I used the popopen() function in the C program. Thanks