ConnectionManager is not found when running on Multi-Sandbox for STM32F7508-DK Discovery Kit

I’m trying out the pre-built Multi-Sandbox VEE Port for the STM32F7508-DK Discovery Kit. (STM32F7508-DK Discovery Kit - Multi Sandbox - Get Started)

When running the Android connectivity example, it works fine on the simulator, but on the actual STM32F7508-DK it always fails to load the ConnectionManager service. I’ve tried other examples, always with the same result.

Why is it so different from the simulator running the same settings? What am I missing here?

	@Override
	public void start()
	{
		ConnectivityManager connectivityManager = ServiceFactory.getService(ConnectivityManager.class);

		if (connectivityManager != null)
		{
			LOGGER.info("all good"); //$NON-NLS-1$
		} else
		{
			LOGGER.severe("No connectivity manager found."); //$NON-NLS-1$
		}
	}
Start
MCU revision identifier: 0x1001
MCU device identifier: 0x449
watchdog started
MicroEJ START
kernel INFO: Kernel startup
kernel INFO: Initializing custom Security Manager
kernel INFO: Registering mandatory services
kernel INFO: Registering featureStateListener
kernel INFO: Loading and installing features from the storage (FS)
kernel INFO: State update: MyFeature (v0.1.0) has changed from state UNKNOWN to INSTALLED
kernel INFO: Starting NTP and CommandServer
kernel INFO: Start the ntp client
kernel INFO: Use the connectivity manager
kernel INFO: Start the admin server
remotecommandserver INFO: Server listening on port 4000
kernel INFO: State update: MyFeature (v0.1.0) has changed from state INSTALLED to STARTED
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SystemPropertiesServiceLoader:ej.service.ServiceLoader' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SystemPropertiesServiceLoader:ej.service.ServiceRegistry' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'ServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SharedServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SharedServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SystemPropertiesServiceLoader:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'ServiceLoaderKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'ServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SharedServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
kernel INFO: Granted permission 'ej.service.ServicePermission' with action 'SharedServiceRegistryKF:android.net.ConnectivityManager' for feature 'MyFeature'
android connectivity example SEVERE: No connectivity manager found.
[INFO] DHCP started
[INFO] DHCP address assigned: 192.168.178.162
kernel INFO: Available Network interfaces:
kernel INFO: - 192.168.178.162
kernel INFO: Scheduled update time task
kernel INFO: Updated time: Sun Jan 28 10:56:33 GMT 2024
kernel INFO: Stopped retry task

Hey there!

In the current version of the Green Kernel, this service isn’t available to applications. But no worries, if you’d like to make it accessible, just register the service within the shared services by tweaking the following line.

Happy coding! :blush:
Anas

serviceRegistryKF.register(ConnectivityManager.class, connectivityManager, false /*false: means service shared with apps, true means local to kernel*/);

Check the project readme for more details on the exposed services.

2 Likes