No, you can't if your system doesn't have support for serial communication enabled. You'll still have to do it no matter what. And when you do it, you won't need any other "special tricks". When using plain serial everything should be already set up, so you'd just need to set proper device options using ioctl (like the speed of the device) and then you can simply open a proper ttyS device and communicate with it as I already mentioned in the previous post. For USB you still need to configure the device to reveal its serial ports (they should be called /dev/ttyUSB0, /dev/ttyUSB1, etc.) and find a proper one to communicate with (especially if you have other USB devices plugged in).
This is true if you already configured the connection between two machines. If you did, you can forget about termios and simply open the device and use it.I have done some research and have come to know that using a structure called termios defined in termios.h fine we can communicate through usb and serial port. i.e. we can open, close, read and write through the port.
You still have to set the connection between two ends of communication. And if you want a two-way transmission, you'll have to use SOME protocol - either an existing one or your own one. If you don't know what carrier collisions are, I'd suggest you go with an existing one (the easiest one would be PPP as it would give you an IP interface between machines, so you could use IP protocols like TCP or UDP).but i dont know how to do it.
can anybody please help??
You can start here: http://tldp.org/HOWTO/Serial-HOWTO.html#toc1
As for Qt support, see here: http://qextserialport.sourceforge.net, it should be enough for you if you don't use USB. If you do, you'll still need to make sure your kernel reveals USB serial ports.
Anyway, what exactly do you need the connection for? Do you want to transfer files or some application data?
Bookmarks