PDA

View Full Version : Developing a Desktop application for interaction with the outer world



piyushpandey
20th December 2014, 08:07
Hi Guys


I am developing a simple application for controlling my development board and to get the information or status from it.

The development board is an 8 bit ATMEGA 16 board and I want to control it through the serial port of my PC and want to get the same i.e. status data of my board over the serial port.

At the terminal level all this thing is going good.

But I want to do it at the GUI level.

My development system is Win 7.

So please give me a little bit of hint of how to achieve this.



Best regards

wysota
20th December 2014, 09:08
You need to develop an API (a number of commands and responses) you can call over the serial port and implement an application that will use that API to send commands and then when responses arrive, parse them and display in the UI in a meaningful way.

piyushpandey
20th December 2014, 11:36
You need to develop an API (a number of commands and responses) you can call over the serial port and implement an application that will use that API to send commands and then when responses arrive, parse them and display in the UI in a meaningful way.



Can you just elaborate it a little more , I mean only developing program in qt is not going to help but I need to develop another extra stuff of software for it so that it can communicate or act as connecting link between my Qt app and my development board.

FreddyKay
20th December 2014, 15:56
Can you just elaborate it a little more , I mean only developing program in qt is not going to help but I need to develop another extra stuff of software for it so that it can communicate or act as connecting link between my Qt app and my development board.

Qt does not offer a Serial Port by default. Youd would need to program one yourself.

An easier way would be to use boost http://www.boost.org/. Look for Serial Port (http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/overview/serial_ports.html). Although you will have to add an extra framework, its worth it. Much easier than developing it yourself in my opinion.

EDIT://

just looked it up and I am sorry. Qt DOES in fact offer a QSerialPort class, which you could use. Seems pretty straight forward. AFAIK its implemented since Qt5.3.

wysota
21st December 2014, 10:56
Can you just elaborate it a little more , I mean only developing program in qt is not going to help but I need to develop another extra stuff of software for it so that it can communicate or act as connecting link between my Qt app and my development board.

You need to come up with a list of functions you want to execute across the serial link. Then implement those functions on the target end. Then implement a protocol for communication between the client and the target using the serial link. Finally use the protocol on the client side for calling functions you defined in the first step.