My application receives information from another micro-controller about actuator status (postion of motor and state of motor on/off). State of the motor is where I am having problems. My setup sends on command if actuator is running and another if actuator is not running. Everything works perfectly if connected to the computer. However, if I run the app on the phone dis connected from the computer, it will work fine until phone sleeps. After phone sleeps the actuator state is no longer being updated.
I know the messages are being sent because I am watching them come across my mqtt broker.
before I created the service once the phone slept I couldn't send any commands at all. Now with the service the commands are being sent. But which command to send is based on wether the actuator is running or not and this is not being updated.
I even put the receive method in the serviceConnection class. this does not help.
I am using m2mqtt.net.dll that I got from compiling the github version of m2mqtt.