开发者

Interacting with terminal in Linux using C/C++

开发者 https://www.devze.com 2023-03-16 04:30 出处:网络
Is it possible to have an interactive session with terminal using a C code. I need to open a PORT using terminal and then start GtkTerm and then send hexadecimal code to it . So, can I do this all us

Is it possible to have an interactive session with terminal using a C code.

I need to open a PORT using terminal and then start GtkTerm and then send hexadecimal code to it . So, can I do this all using a C code.

Please suggest me other alternatives to communicate through serial Port . But I need to make a GUI , so that 开发者_如何学JAVAI dont need to go to terminal again and again because it is not expected from every user.

Thanks :)


Many years ago, I used Greenleaf's CommLib for serial communications and found it to be an extremely high quality product. It looks like they've added some terminal emulation capabilities to it as well, so there is some ability to add interactivity to the your code. They have C and C++ versions of the library.

It is a bit pricey, but I suppose you have to pay for high quality. http://www.greenleafsoft.com/

This is a Windows library though, so maybe it won't work for you. I found a free eBook for serial communications on POSIX systems here:

http://www.easysw.com/~mike/serial/serial.html

Now you need to add in terminal emulation for the interactive part. libvterm looks like it tries to provide emulation: http://sourceforge.net/projects/libvterm/

It looks like there is a terminal emulation widget for QT too, which might work better: http://qt-apps.org/content/show.php/QTermWidget?content=82832

Good luck...not many people deal with serial communications anymore.

0

精彩评论

暂无评论...
验证码 换一张
取 消