Previously I have used Granity 1.13.1 preview successfully. With version 1.14.1 attempt to connect via TCP/IP to Ioni pro device address fails with message:
“Unable to connect. Possibly incompatible COM adapter selected or device is already used by another application”
The message seems strange because the device should not be in use and if I try Granity 1.13.1 after the error message, it works just fine.
Just to clarify, are you using TCP/IP connection method in both cases?
Yes. The two cases are identical except for the Granity version.
We are currently investigating this, as it’s likely a bug in the latest Granity.
I was trying to update our code to use the latest simplemotion V2 develop branch version and noticed that it was unable to connect to our Ioni device via TCP/IP. The reason turned out to be that in simplemotion’s tcpclient.c tcpipPortOpen() passes sizeof(devicename) as parameter to parseIpAddress(). This function seems to treat it as IP address string length, which is obviosly incorrect as devicename was of type const char *. I also found that I had to define ENABLE_BUILT_IN_DRIVERS for my compiler to event get to that point. Could these be reasons for Granity’s connection failure too?
Good debugging & reporting! Yes, that was basically the problem. We found also the same issue about at the same time. It’s been fixed now and I’ll push the fixed SimpleMotion to the Github today. Update of Granity will also follow soon.
Also it’s true that ENABLE_BUILT_IN_DRIVERS needs to be defined in build environment in current version of the library. If it’s not enabled, then SM library is just HW independent C library that relies on user supplied port driver. We decided to add that option especially for embedded systems where no PC driver will compile or work directly.
Ok, Thanks for the quick reply.