Gemalto is now part of the Thales Group, find out more.

You are here

Parsing +CMGR | Thales IoT Developer Community

Student Project

October 31, 2015 - 11:36am, 1311 views

Hello everyone,

When running +ATCMGR command in a MIDlet it returns this type of info which I have captured in a string:

+CMGR: "REC READ","3367400000",,"2015/10/17 22:52:44+22"  
SWITCH ON O2

OK

I now wish to exploit the content of the text only ie 'SWITCH ON O2' to send instructions to the GPIOs

Could you please let me know how to eliminate all the other info from the string so I can use the text content to activate a port.

Have tried a split instruction via Eclipse but it generates:

error: "The method split(String) is undefined for the type String"

Thanks for your help.

UK Student team

To *********: apologies this was initially posted under training when it should have been under general discussion. Thanks for removing it from the training thread. All the best