What's the question? Do you want to know how to get the number returned after the last command? According to the documentation, it should be something like
choroba, yes I know it will be an 1,2,3 or some number. But, displaying or "doing something" with that seems to be the problem.
Here is the "received_data.txt"
AT
OK
AT%23=1234
OK
AT1122
2 ####This is the digit I need to "do something with" or Relay to a
+n SNMP server later.
OK