FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
02-20-2023 11:03 PM
Hi,
I'm trying to access USB serial device from custom snap Node application in CtrlX CORE. I have developer-enabled version of CORE with ssh access to terminal. Inside CORE I can receive data with miniterm from my USB device connected to the integrated USB-C port of CORE. So far so good. Also my node application, when running in development environment (native Linux or MacOS) can receive data from the USB device, so nothing wrong with the node application itself.
I have described serialport dependency in the package.json of my snap as follows:
"dependencies": {
"serialport": "^10.3.0"
},
When building the snap, I get following error message:
Staging app
+ snapcraftctl stage
Priming app
+ snapcraftctl prime
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/lib/node_modules/sick/node_modules/@serialport/bindings-cpp/prebuilds/android-arm64/node.napi.armv8.node'
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/bin/node'
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/lib/node_modules/sick/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv6.node'
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/lib/node_modules/sick/node_modules/@serialport/bindings-cpp/prebuilds/android-arm/node.napi.armv7.node'
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/lib/node_modules/sick/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv7.node'
not a dynamic executable
not a dynamic executable
Unable to determine library dependencies for '/home/boschrexroth/sick/prime/lib/node_modules/sick/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm64/node.napi.armv8.node'
This part is missing libraries that cannot be satisfied with any available stage-packages known to snapcraft:
- libc.musl-x86_64.so.1
These dependencies can be satisfied via additional parts or content sharing. Consider validating configured filesets if this dependency was built.
The 'passthrough' property is being used to propagate experimental properties to snap.yaml that have not been validated.
Strange thing here is that the error message is referring to x86 architecture, even if I'm building for ARM: build-snap-arm64.sh
The snap'd application itself works, I can see console.log debug printing in log file, but it simply does not receive any data from serial port, even if the specified /dev/ttyACM0 interface exists.
Any ideas?
Solved! Go to Solution.
02-20-2023 11:45 PM
Missing piece of information: I'm building in App Build Environment of WORKS version 1.18.2
02-21-2023 10:34 AM
Got my problem solved. Had to enable access to the serial port by adding it in snapcraft.yaml file:
plugs: [network, serial-port]
However, the error message is persistent when building the snap app. To ensure it's not caused by any of my configuration changes, I created a new App Build Environment (1.18.2) and only installed sdk (1.18.0) and snapcraft with the scripts included. The error message is as stated above.
My snap app source is copy of the hello-world Node sample, with only src/app.ts, package.json and snap/snapcraft files modified accoringly.