[solved] NetRegState ChangeHandler never called

Hi

I’m trying to register a event handler for NetRegState changes and then using le_mrc_SetRadioPower(LE_OFF) and le_mrc_SetRadioPower(LE_ON) to turn the modem off and on respectively. But I don’t see that my void NetRegStateHandler (le_mrc_NetRegState_t state, void* contextPtr) is called even though I’m certain that le_mrc_AddNetRegStateEventHandler(NetRegStateHandler, NULL); has been called.

I have turned off sandboxing for my app since I will make some IPC with other (external) applications at some point. Don’t know it that has something to say.

Anyone knows what I could do to make this work, it could be great to avoid having to poll that information.

I have now also added the dataconnection interface and tried to add a handler for these events, but alas this handler isn’t called either.

Found my issue. The problem were that I had made some ipc socket server handling in the component_init function which included a while(1). And since the component_init function never exited we never went back to the event loop for processing of more event handlers.