Tips and Tricks for Android Users
Posts tagged networking
Samsung Captivate Tethering for OS X
Aug 17th
When I plugged my Samsung Captivate into my OS X machine I was surprised to see a network connection dialog pop up on my laptop and what looked like a tethering app pop up on the device. Given that AT&T tries to kill off tethering in every way possible with the iPhone, I figured it wouldn’t be on with my Captivate either. Or at least not easy to get working. No problem though. I just needed to figure out which set of settings to put in the network connection dialogs in OS X.
In the main network settings screen under System Preferences:
- leave telephone number blank
- use ‘WAP@CINGULARGPRS.COM’ for Account Name
- use ‘CINGULAR1′ for Password
Then click the advanced button and setup:
- Vendor generic
- Model GPRS (GSM/3G)
- APN is ‘wap.cingular’
- CID set to 1
After that starting up a network session with my Captivate attached over USB yielded a pretty quick network connection! Now if only they could fix these GPS issues….
On Device Packet Capture
Aug 5th
When I need to capture network traffic from my device I normally capture traffic at a router to see what’s going on. I had seen some mentions of running tcpdump on device and pulling off the pcap file to a desktop to inspect, but Androshark was what people mentioned the most. And it didn’t seem to be actively developed any more. I ran across Shark for Root and Sharkreader recently however. It’s an app for packet capture and a simple packet capture viewer directly on the device. Works out pretty well. Requires root access, and it seems to be working quite well on my Nexus One with CM6. Screenshots below.
Start/stop capture, writes to the sdcard by default:

View packet dump stream:

View contents of an individual packet:

Monitoring Network Traffic Using OS X
Jun 1st
Here’s a tip for monitoring network traffic from your Android phone using OS X. The same thing works for iPhone (or any other mobile device you can configure to use a wifi connection). I frequently use it to see how some bit of client/server interaction is done.
- Install Wireshark
- Follow the instructions in the readme to also install the ChmodBPF script
- Under Sharing area of the OS X settings app configure your system to use an ethernet connection and share it out to wifi clients
- Now configure your device to connect to the wifi network provided by your system, test to make sure it works
- Startup Wireshark and set it to capture traffic (wifi is en1 on MacBook Pro systems, what I normally use)
And that’s it, you should now get quite readable dumps of what applications are doing to communicate. Lots of interesting things you can learn digging into how folks structure their client/server interaction.