Solved serialbus iOS error
-
Hello, I'm building a cross platform application to monitor industrial PLCs via ModbusTCP.
My application compiles flawlessly in Windows, Android and MacOS. In iOS i get this error at compile time:Project ERROR: Unknown module(s) in QT: serialbus 15:00:57: The process "/Users/ginopilotino/Qt/5.11.1/ios/bin/qmake" exited with code 3. Error while building/deploying project 00008_GestioneSistema (kit: Qt 5.11.1 for iOS Simulator) When executing step "qmake"
Any idea how to fix it?
-
I'll answer myself, it's not fixable. There is no QtSerialBus framework for iOS, too bad it's not written anywhere.
-
Officially supported is Windows and Linux: https://doc.qt.io/qt-5.11/qtmodules.html
ModBus should work on macOS too, you're right - that is missing from the docs. I guess nobody wanted to test Android and iOS, chances are that it can be compiled there also. i guess there is some switch that excludes the build for iOS,still you could try to build yourself after patching the sources.
-
@aha_1980 thanks for the answer, everything is clear.
It's unfortunate that the Modbus/TCP Qt code has to include serial libraries even though no serial port is actually involved. I'll have to switch to some other library. -
Ok, that might be the reason. Is there no QSerialPort for iOS? (Sorry, I'm no Mac user, so this all is a bit unclear to me)
-
AFAIK, the serial ports are not supported on iOS at all (as in Android).
PS: Maybe it be possible to add some patches to the qtserialbus library on iOS, which disables the Modbus RTU && CAN-bus.. But keep the Modbus TCP. i.e. make it more modularity.
-
@kuzulis Good idea. Unfortunately I cannot help there as I have no Mac and no iOS device.
The question stays, why does it work for him at Android?
Regards
-
@aha_1980 said in serialbus iOS error:
The question stays, why does it work for him at Android?
Who said, that it is worked on Android? :)
It just compiles on Android, because QSerialPort compiles there. But since 5.12 the QSerialPort will be ignored/skipped from the Qt bundle for Android platform QTBUG-69727. But for iOS the QSerialPort is already skipped a long time ago.
-
@kuzulis Ok, but as he don't use QSerialPort it may also work for him on Android ;)
-
I confirm it does work in the Android simulator. I'm able to connect and communicate from the emulated device with a PLC in the same LAN using ModbusTCP.
If serial libs are going to be dropped for Android too in Qt 5.12 as @kuzulis said, then I definitely need to switch to another ModbusTCP library. Which is actually a shame. -
Hi @Illogica.
I've created QTBUG-70360 to track this.
-
This post is deleted!