A little progress, not a solution, however if I insert the following code
in between the commands I want to send it sorta works like I want it to...
android.os.SystemClock.sleep(150);
The listener thread is blocked though during while the systemclock is
sleeping, so the input from the modem doesn't get appended to the text view
until after the sequence of codes has been sent, which is less than
desirable. But still not the right way to do it, and I need to find a
better way. When I'm done with this code I will need a way to handle the
input. Example of what sorta works:
sendData("enable"); android.os.SystemClock.sleep(150);
sendData("password");
android.os.SystemClock.sleep(150);
sendData("conf t");
android.os.SystemClock.sleep(150);
sendData("interface eth0");
android.os.SystemClock.sleep(150);
//etc...etc...etc...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en