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

You are here

How to obtain answer's value from commands? through java code | Thales IoT Developer Community

cbaezenko

October 13, 2016 - 3:54pm, 3451 views

Hello

Im using this class (public class ATCommand) sucesfully.I can see answer from commands into console, but I would like to have access to this date through Java.

This is what I have:

answer=atc.send( new String(cmd) + 0x0D);

System.out.println(answer);

I got command and his answer on console.

This is the method

public String send(String ATCmd)
            throws ATCommandFailedException,
                   IllegalStateException,
                   IllegalArgumentException
Parameters:
ATCmd - The command to send.
Returns:
The complete answer of the device corresponding to the send command.
How  to access to this "complete answer" through java code in ATCommand class isnt a method as getCommandAnswer, so how is posible ?