How To Know If AVSession Is Open On App Restart

I have any app that is required to perform work if a le_avdata session is not open and stop that work when a le_avdata session is open. I used the le_avdata_AddSessionStateHandler which I have has works well. Something that I didn’t expect is when I update my app that has an open data session (only the app I’m updating is restarted all other apps are left running by Legato) there doesn’t seem to be an API to determine if a session is open or closed. Obviously the handler isn’t called because the session event has happened before the app restarted.

Is there an API to determine if an AVData session is open?

Thanks,
Darren

can AT+WDSS? help on determinating this?

@jyijyi

Is there no way to do this from the le_avdata API? It seems heavy handed to have to use the AT commands from within my app no?

Do you mean the AT command works for you?

I’m not sure how to go about accessing the AT commands from within my app. Can you please help me understand how I can issue AT commands from within my app?

Just open the AT command port and check.
If it works, you can open /dev/ttyAT in your app to check

@jyijyi OK thank you!

@jyijyi I can’t seem to get a response from the AT service I keep getting ERROR.

I run microcom /dev/ttyAT and then type AT+WDSS? and I get ERROR. The only response that gives me OK is AT. What’s also interesting is a lot of the AT examples show using the -E switch but this doesn’t seem to be an option for me.

Thoughts?

You mean all the AT commamd returns error?
This is strange, i never encounter this before.