Step 2: Android G1 with serial output enabled
Optionally, you can follow the links there to this instructable on talking to your G1 over USB from your PC. That serial to USB connection isn't required for this tutorial but I used it as a nice sanity check to verify the phone was sending serial out.
If you don't use the other intructable to verify serial output is working, you can try this simple check:
1. Open the Terminal app on the G1 (comes with Cyanogen but download one from the Market if you have a different image)
2. Navigate to the /dev/ directory by typing in cd /dev/
3. Type ls (that's an L) and look for ttyMSM2 in the list returned
The Python script we'll use later sends commands to '/dev/ttyMSM2' in order for them to go out the serial connection. Since that requires root access, you'll need to change permissions on that every time you reboot the phone. To do that:
1. Open the terminal app on the phone
2. Enter 'chmod 777 /dev/ttyMSM2'
Then you can run the Python script from the Android Scripting edit in the next step and it will have access to send serial output.
Remove these ads by
Signing Up

























Not Nice















Visit Our Store »
Go Pro Today »



