sensors_for_ros icon indicating copy to clipboard operation
sensors_for_ros copied to clipboard

Playing around with Fast-DDS and Bundles for Play store release

Open sloretz opened this issue 3 years ago • 1 comments

~~This is a work in progress towards compatibility with Android 13 With CycloneDDS on an Android 13 device I saw a bunch of avc events { read } with name "wireless". I assumed this was because CycloneDDS tries to read /proc/net/wireless. I don't see the same events on an Android 30 device. Communication works on the Android 11 device, but silently does not work on the Android 13 device.~~ Fixed on main.

With this I tried switching to Fast-DDS. It comes with a couple problems. The first is the code size is massive and the apk becomes 200Mb. The second is Fast-DDS requires two type supports (even rmw_fastrtps_dynamic_cpp does), so I can't use static linking and LTO to shrink it.

~~This still does not solve the communication problem on Android 13 device. I see a new avc event with Fast-DDS, although this time I see it on both the Android 11 and Android 13 devices. The communication behavior is the same: I can communicate with the Android 11 device but not the Android 13 device. This makes me think there's something else happening on the Android 13 device.~~ Fixed on Main.

type=1400 audit(0.0:302): avc: denied { ioctl } for path="socket:[366356]" dev="sockfs" ino=366356 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c7,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c7,c257,c512,c768 tclass=udp_socket permissive=0 app=com.github.sloretz.sensors_for_ros

~~Next idea: try holding WifiManager.MulticastLock and see if that allows communication? https://developer.android.com/reference/android/net/wifi/WifiManager.MulticastLock~~

sloretz avatar Oct 13 '22 17:10 sloretz

Problem is cyclonedds is selecting the wrong network. The Android-13 device has a valid sim, while the Android-11 device does not. It was selecting the mobile data network interface instead of the wireless interface. This will need to be configurable.

sloretz avatar Oct 13 '22 19:10 sloretz