Jump to content
Anubis_68

Installing ICS v8.58 on CBuilder 10.1

Recommended Posts

If I try to compile the XE3 packages, I get these Unresolved External Errors

96259775_UnresolvedError.thumb.png.204cb546188614c262744af73de41130.png

 

If I build CB102InstallVclFmx then it builds fine, but I can't install it, I get this error

 

416951914_InstallError.thumb.png.8486eabc9da1b825eb8d95093ffcaff0.png

 

I have added the path to the System Variables, that didn't help.

 

Any clues as to what to try next ?

 

I'm upgrading from v8.26 because I am trying to write a ssl client that connects to AWS

 

Thanks

 

Share this post


Link to post

According to the error message, you have not compiled package IcsVclCB102Design.dpk package or if you compiled it, there is an error in path somewhere and the IDE doesn't find it.

Share this post


Link to post
Posted (edited)

Thank you for the reply.

 

That was the package I was installing.

759540656_InstallEror2.thumb.png.06d3cc1c798a858f42e3ecf14c210c8a.png

Why has the location of the output files changes from 8.26 ?

I've added this path into the System Variables, anywhere else I need to look ?

Edited by Anubis_68

Share this post


Link to post
Posted (edited)

I can build and install IcsCommonCBXE3Design.bpl. So this means RadStudio can see the directory OK.

 

But I can't build either IcsVclCBXE3Design.bpl or IcsFmxCBXE3Design.bpl, I get the unresolved externals above.

 

Edited by Anubis_68

Share this post


Link to post

Why are you trying to install a two year old version, why not use the latest V8.66 version? 

 

Note ICS was never tested on D10.1 only D10.2 and later, which is why there are no packages.

 

Angus

 

Share this post


Link to post

I downloaded the latest on the Overbyte website v8.58

 

Is that not the latest ?

Share this post


Link to post

V8.66 was announced in this forum in April with a link to the main ICS wiki download page.

 

Angus

 

Share this post


Link to post

OK, downloaded and installed the latest, v8.66

 

But I'm still getting the same issues as above, CBXE3 I get unresolved Externals and CB102 I get Can't Load Package

 

So any ideas ?

 

Share this post


Link to post

Sorry, no ideas, I don't use C++.  A start would be to change the existing packages to actually target your old compiler, there are different packages for each compiler for a reason.

 

Angus

 

Share this post


Link to post

I'm upgrading to 10.3 hopefully this will cure this problem, then it's onto the next problem

 

Share this post


Link to post

OK.

I upgraded to 10.3 - everything is good so far.

Installed v8.66 - Compiled and installed without an issue.

Opened my test app and rebuilt - Had to link in the new files, but no other issues.

Run test app and nothing happens, whereas before with v8.26 it at least tried to connect to the server, now ( watching with WireShark ) nothing at all.

 

What I'm trying to do is connect to an AWS Server on port 8883.

 

So this is what I have using Rad Studio - C++Builder

Basic FMX project, with a TSslWSocket, SslContext & IcsLogger. With a couple of edit boxes and a go button. See below.

 

79088512_Screenshot2021-05-07at10_45_38.thumb.png.8faafe1e201d1799dff23997dff5c76e.png

 

This is what I get when I click connect.

1543358954_Screenshot2021-05-07at10_51_59.thumb.png.82e109b95a8b02366d6728236b39166c.png

 

This is the code behind the button

74223897_Screenshot2021-05-07at10_52_51.thumb.png.e218903a6111355d5d6a51a82f14ac0e.png

 

I get no Error, and the app does nothing.

With the previous version, the logger recorded this

 

1089488852_Screenshot2021-05-07at10_57_37.thumb.png.c7824d21f523de295a6b8f8636692747.png

 

The logger isn't adding anything to the file

 

 

 

Share this post


Link to post

ICS is an event driven component, you don't appear to have any events, so you have no idea what happens after you start the connection attempt.  The logger is designed for debugging the internals of the components, not end user applications.    You should be reporting the onConnect event which tells you whether connection worked or failed, also onHandshakeDone.

 

If you are using HTTPS, you should be using the TSslHttpRest which does not require an SslContext.  If this is a custom protocol, use TIcsIpStrmLog which doesn't need SslConrext either.  Both components are detailed in the Getting Started with ICS in readme8.txt, which explains the best components to use for new applications., also http://wiki.overbyte.eu/wiki/index.php/ICS_Getting_Started 

 

Unless your application is using an SSL client  certificate (which is rare) you don't need a private key or certfile.

 

Angus

 

 

 

Share this post


Link to post

Hi Angus,

 

All the events in my test app are setup to put information in my InfoList so I can see whats happening.

1710191869_Screenshot2021-05-07at12_01_38.thumb.png.3fc5bedf4d3a5d67c25a83bba4eb617d.png

 

559447807_Screenshot2021-05-07at12_02_20.thumb.png.992b8e33256725f973b3076ff2224443.png

 

I need to establish a TCP connection to port 8883 as I'm connecting to a secure MQTT server, I can connect without issue on the unsecured port of 1883.

I have all the certificates for the connection ( am I putting them in the right places is another question ? ).

 

I am also monitoring the tcp traffic with WireShark and there is nothing at all from the app.

 

 

 

 

Share this post


Link to post

After you call Connect, the onConnect event will always be called, maybe not for a minute if the connection fails. 

 

You also don't seem to set SslEnable or SslMode anywhere.  All this is done for you in TIcsIpStrmLog, but I appreciate there is no C++ sample.

 

Angus

 

Share this post


Link to post

The SslEnable and SslMode are set on the Socket

 

1906468862_Screenshot2021-05-07at12_42_33.thumb.png.9613b1234d1943c15550d064a4020129.png

 

The app has been "Connecting" for over 7 minutes with no further output.

 

I can read Delphi without any issues, I'll have a look at TIcsIpStrmLog, I had not looked at it because it wasn't marked as Ssl

 

Share this post


Link to post
Posted (edited)

My mistake, thought IpStrmLog was a example project, not a component.

 

Is there a Delphi example using this that I can have a look at ?

 

I have modified my code to match that in OverbyteIcsSimpleSslCli1.pas, so the SslEnable is false in the component and before the call to connect.
Then in the connect, I am setting SslEnable to True. ( Or it will when it gets called )

No change in the behavior of the app. Still no attempt to actually send anything to the network.

Edited by Anubis_68

Share this post


Link to post

Some component properties are reset when the socket closes, and need to be set each time it is opened, SslEnable is one of them since the next connection may not be SSL. 

 

OverbyteIcsIpStmLogTst.dpr is the sample for TIcsIpStrmLog, it has both client and server modes, you only need the client part, I wrote a simple app to test something::

 

    IcsIpStrmLog1.LogProtocol := logprotTcpClient;
    IcsIpStrmLog1.RemoteHost := SendHost.Text;
    IcsIpStrmLog1.RemoteIpPort := SendPort.Text;

    IcsIpStrmLog1.ForceSsl := True;
    IcsIpStrmLog1.StartLogging;

 

Log onLogProgEvent and onLogRecvEvent. 

 

Angus

 

 

Share this post


Link to post

I tried connecting to your Amazon server with the IcsIpStrmLog sample, it works without SSL, but not with SSL on that port.  Ports are always configured for one or the other, unless the protocol accepts a command like STARTTLS after a non-SSL connection. 

 

Angus

Share this post


Link to post

WIth MQTT 1883 is unsecured and 8883 is TLS

 

Question : Does the SslWSocket support ALPN ?

 

I've just been reading on the AWS site that they have enabled connections on 443 and using ALPN (Application Layer Protocol Negotiation) with a specific protocol name - x-amzn-mqtt-ca then changes the protocol to MQTTS

 

I'll see if I can find out any more information

 

Share this post


Link to post

There is a SslAlpnProtocols property in TSslWSocket, stringlist of protocols the client accepts.  

 

The  OverbyteIcsHttpRestTst.dpr sample uses it. 

 

Angus

 

Share this post


Link to post

I started to panic then, but I found it on the TSslContext.

 

I'm creating my test app from scratch, just to make sure there isn't something in the old app that's causing me issues. I'll add a port edit and ALPN option to it as well, to test.

Share this post


Link to post

Well I recreated my test app eventually, 10.3 was not playing ball and I had to manually edit the project cbproj file to get it to compile.

 

But it appears to work.

 

887691607_Screenshot2021-05-10at11_48_44.thumb.png.66dd8973077e6355ab4c7457517d8b25.png

 

So that's the good news.

 

So now I return to my main project, edit the cbproj before I do anything, just to make sure I'm not wasting my own time.

But when I compile ( clean first just to make sure ), I get the following linker error.

 

1450975483_Screenshot2021-05-10at11_51_45.thumb.png.9d6cc1de485b016503d8ad5d399fc7ed.png

 

The components I have in the project are, TWSocket, TSslWSocket, TSslContext & TFtpClient.

 

Share this post


Link to post

In your first project, onConnect error=0 is OK, but you are not logging the error for HandshakeDone which quite often fails.  It is also where your component should be checking whether you really reached the secure server you requested. 

 

Can not help on the C++ missing external, you'll need to resolve that yourself.

 

Angus

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×