Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Powerful Serial Communication Component in FireMonkey for Delphi and C++ Builder on Windows

ComPort for FireMonkey

ComPort for FireMonkey (TFComport) it’s an easy to use and very powerful component to communicate with devices connected to the serial port.
You can download a trial version of the component from the creator web WinSoft.

Features of TFComport

Installation

Installation is quite simple and automatic: download the installer from here, run it and follow the steps (close the IDE before start to install).

Usage

The creators offer a good demo project here as an example of use but we will extend little by communicating with a GSM mobile phone.
Usually, a GSM mobile phone has an integrated modem with who we can communicate using serial port and use standard AT commands.
The plan is to use TFComport to send some AT commands to the phone and read the phone answer.

I will use a Samsung Galaxy A10e for our tests. The phone will be connected to the computer by USB cable and normally Windows 10 will install required drivers.
After drivers install finished we will see a modem device in devices manager. COM5 will be the serial port what we will use to communicate with the phone.

Let’s start the IDE, open the demo project and run it.
In order to communicate with any device be serial port we have to respect the next steps: set the communication parameters and open communication.

We drop a TEdit (EditCommand) for the command and a TButton (ButtonSend) to send command to the phone.

TFComport has an AfterOpen event, which is very useful in case we want to do something when the port is open or closed. The demo already contains a procedure named UpdateComInfo which enables or disables the buttons according to the Active property of the port.

We modify the UpdateComInfo procedure to include our EditCommand and SendButton:

[crayon-676d7722149f6118169713/]

Now we need to send command to the phone at the Click event for our ButtonSend:

[crayon-676d772214a00201995534/]

And here is the result:

If ComPort for FireMonkey is the tool you need just go to WinSoft and and check out the full version!

Like what you see? You can get the ComPort Component Suite together with over 100 other fantastic WinSoft components with our Enterprise Component Pack. For a limited time, when you purchase RAD Studio Enterprise or Architect Edition at special Upgrade Pricing, you will also get this package of third-party software worth over $13,000, including the full WinSoft Component Library, at NO EXTRA COST! Step up to RAD Studio 10.4 today!

Exit mobile version