How to Establish connection¶
The application can commnunicate with any microcontroller via three defined protocols
Serial
Transport Contorl Protocol
User Datagram Protocol
Serial Communication¶
Data can be transmitted in full-duplex mode via serial protocol. The MCU must be configured to transmit serial data via USART or USB. In the absence of this internal peripherals, the user can use an interface converter such as the FTDI converters or opt for the TCP <> or UDP<> options. The first step is to confirm the connection parameters of the serial communication of the MCU. It is necessary to note the baudrate, portnumber, parity stopbits and databits in order to configure the application.
To configure the application for serial communication, follow these steps
Click on the settings button
Click on the dropdown list to select Serial from the list of options
Click the OK button
Click the connect button
When connection is established, the parameters of the connection are displayed in the connection status bar
UDP connection¶
UDP connection is established in the same way as the TCP connection. Since UDP is a connection-less protocol, only a UDP socket which is bound to the address and port provided in the configuration as shown below.
Select UDP from the dropdown
Enter the ipadress or hostname of your PC.
Tip
You can click on the :use hostname button to use only the hostname and not the ipadress. Ensure that when using this option, the hostname resolves to a machine (pc) in the same domain as the pc running the application. You can choose to use localhost or 127.0.0.1 instead.
Warning
Only one option can be used at a time. If the :use hostname checkbox is checked, then the IP address is greyed out. You can only enter valid IP addresses in the ipadress lineedit. If the value entered is invalid, you cannot save the settings. A vaild IP address is contains 4 octects with values between 0-255 respectively.
Click Ok to save the settings
If previously connected via any of the available protocol, disconnect and reconnect.
TCP connection¶
To establish TCP connection, follow these steps
Select UDP from the dropdown
Enter the ipadress or hostname of your PC.
Enter the IP address of the TCP server you would like to connect to
Click OK and Connect button
With a valid connnection established, data commands can be sent using the configured media to the microncontroller.