2

I have 2 Question:

I want to send AT-Command to a serial port in android. so I did these steps:

  1. rooted my mobile
  2. install Terminal Emulator to insert unix command
  3. insert:

    su
    

then:

    echo -e "AT" > /dev/smd0
    cat dev/smd0

or

     echo -e "AT" > /dev/ttyS0
     cat dev/ttyS0

both don't gave me the response.

I think there is no problem in echo command but how can I read the answer? (Q1)

in this link: How to send a sequence of AT commands to a serial port in bash?

there is something close to my question but it seems that they insert the command on the computer not a phone. in both cases what is ppp packet and how can install it on my mobile and what dose it mean? (Q2)

Community
  • 1
  • 1
Mohammad Alshaar
  • 523
  • 4
  • 21
  • Generally an actual serial port (assuming you have the right device at all) needs to be configured before you can use it. `echo` may work for writing, but `cat` rarely works for reading from one. I would suggest you compile and test some C code on a desktop linux, then once you have it correct port it to android either as a jni library (if app userid's have sufficient permission) or as an executable to use with your su hack. – Chris Stratton May 03 '14 at 22:42
  • but how can i do it on desktop? – Mohammad Alshaar May 03 '14 at 22:46

0 Answers0