I needed to write a Ruby SOAP client that would call a Perl based SOAP server for one of my clients, so I searched and serched on the Internet and never could find an example.  Maybe I’m a bad searcher or something, but in the off chance that this example can help someone else, I’m posting it here.

This is actually a couple of examples:

  1. Ruby SOAP client calling Perl SOAP server
  2. Remotely starting up the SOAP sever using ssh from Ruby
  3. Executing a SQL query against an Informix database using the ‘dbaccess’ CLI.

Here’s the Perl Server:
continue reading »

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
 | Posted by MobileDataGuy | Categories: Code, OtherStuff | Tagged: , , |


10 July 2008

So today marks the launch the 3G version of the iPhone.  Working around the folks that have been very busy working to launch this new phone, I’ve been exposed to a new set of nouns that I never knew existed before.

As a rule, most new phones don’t require a lot of extra work on the part of the cellular carrier.  You need to make sure that the device capabilities are entered and working in your SMSCs (text messages or SMS), your WAP Gateways (Internet web pages, although a lot of phone go direct now a days), and your MMSCs (picture messages). That the radio side of the network will work with the handset…all the usual things. Other than that is just the usual amount of coordination to make sure all the stores have the new phones in time.

But iPhones are a bit different.  There is a belief that they are going to be flying off the shelves and be selling at a phenomenal rate….like more and faster than last time.  So we have all been busy with meetings to make sure everything in the system can handled the anticipated load.  But these aren’t just any meetings….they are iMeetings. With iAgendas on iConference iCalls.

The closer we got to today, the more iMeetings we had.  Some were iFires in that someone felt some parts of the system needed to be corrected ASAP before today.  I guess when I have my iLunch today I’ll take a peek at the iSystem and see if it iCrashed. :)

Now if only Mr. Jobs would put an MMS client on the iPhone…..or is that an iMMS iClient ;)

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
 | Posted by MobileDataGuy | Categories: Cellphones, Opinions, OtherStuff |

In the course of working on Mobile Data systems, there are times when we need to figure out what is going to and from a particular handset or mobile device. The problem is that when the system you are trying to troubleshoot has tens of millions of devices connecting to it through proxy servers, its a lot like a needle-in-the-haystack kind of problem.

We had to narrow the potential number of packets that we would be capturing using tcpdump to something under a GB of disk space. If we just did a generic capture, we would only get about four seconds of traffic….which would not be very helpful for our troubleshooting efforts. So we needed a way to reduce the packets just down to the HTTP ‘GET’ packets, and the HTTP response codes.

After digging around the tcpdump man pages for awhile, I came up with the following parameters to just capture those packets:

tcpdump -i eth0 -n -s 1400 -W troubleshoot.cap host {localhost IP} and \( tcp[20:2] = 18245 or tcp[20:2] = 18516 \)

  • The “-i eth0″ tells it to capture off the eth0 network device.
  • “-n” tells it not to expand the IP addresses into domain name. (Optional)
  • “-s 1400″ captures 1400 bytes of each packet.
  • “-W troubleshoot.cap” is the capture file.
  • {localhost IP} would be where you substitute the IP address of the host you are capturing from.
  • Now the meat of the command: the “tcp[20:2]” tells tcpdump to look at the 20th byte of the TCP field and get two bytes from there. 18245 => 0×4745 => “GE” as in “GET”. My version of tcpdump only allows for 1,2 or 4 bytes to be compared, so I settled for two. 18516 => 0×4854 = “HT” as in “HTTP”.

This should significantly reduce the number of packets captured. But be aware — getting tcpdump to look inside the TCP field of the IP packets requires a lot of CPU cycles to process all the incoming packets.

Here’s a sample of a capture using the command above (and its only off my local office web server, so you won’t find any cellphone company secrets here):

21:02:58.807323 IP > P 3493:4074(581) ack 1146 win 16138
0×0000: 4500 026d 7a60 4000 8006 d092 c0a8 161b E..mz`@………
0×0010: c0a8 162c d75d 0050 fe3a b4da 2337 2b65 …,.].P.:..#7+e
0×0020: 5018 3f0a 3e7c 0000 4745 5420 2f73 6d2f P.?.>|..GET./sm/
0×0030: 696d 6167 6573 2f70 6c75 732e 706e 6720 images/plus.png.
0×0040: 4854 5450 2f31 2e31 0d0a 486f 7374 3a20 HTTP/1.1..Host:.
0×0050: 3139 19
21:02:58.808107 IP > P 1146:1337(191) ack 4074 win 3500
0×0000: 4500 00e7 5d80 4000 4006 2ef9 c0a8 162c E…].@.@……,
0×0010: c0a8 161b 0050 d75d 2337 2b65 fe3a b71f …..P.]#7+e.:..
0×0020: 5018 0dac 0c06 0000 4854 5450 2f31 2e31 P…….HTTP/1.1
0×0030: 2033 3034 204e 6f74 204d 6f64 6966 6965 .304.Not.Modifie
0×0040: 640d 0a44 6174 653a 2057 6564 2c20 3233 d..Date:.Wed,.23
0×0050: 204a .J

If you are counting out the packets by hand, the tcp[] option starts its counting at zero.

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
 | Posted by MobileDataGuy | Categories: Cellphones, HowTos, Radio Data |

I was reading a WSJ article about the fact that some companies are recalling their telecommuters back to the office the other day with growing apprehension. Seems that some companies feel that better team work will result if everyone is sitting around the table “singing Kumbaya” to quote the article. As a mobile worker, it strikes me a bit odd that these companies didn’t seem to understand that in some cases, with some people, working remotely out of the office makes these workers more productive than if they were working there at the office. Some companies feel the added cost of things like Internet access doesn’t offset the amount of productivity gains that can be had by working in an environment where you are either in a more comfortable setting, or working closer with the customers by traveling to them. Its seems like a case of penny wise, dollar foolish (or maybe the modern version is ‘Euro’ ;) ) to me.

The article makes three points about how to maintain your telecommuting lifestyle: Perform well and make sure people understand you are performing well, Be visible (but not visible in some place like on the beach in Hawaii), and Make sure you are collaborating with your fellow workers. Just to add to this a bit, being connected might be another point to make. If you have the ability to take your phone extension with you — like a good VoIP system will let you — colleagues may never know that you are mobile. A good video chat system also seems to help people connect with you more than just a simple IM chat. I take with me a nice Snap-on camera:

Logitech QuickCam Deluxe for Notebooks: Electronics

that lets me video conference with other folks anywhere I can get a good Internet connections (hint: coffee shops are usually too loud unless you also have a head set with a noise canceling microphone…also, sit with your back to a wall, so the space behind you isn’t busy with people moving around.) Yahoo IM has a nice video mode, and the price is right….free :)

Telecommuting and/or mobile working isn’t for everyone. You do need to be self-motivated to get things done, and can work without any supervision. If you do work this way, be sure to let your boss know how much better you both are for letting you work the way you are!!

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
 | Posted by MobileDataGuy | Categories: Opinions, OtherStuff |

Danger Inc, the makers of the Sidekick line of handheld devices sold in the US by T-Mobile, was purchased yesterday for an undesclosed amount by Microsoft Corporation. While the Sidekick is more normally aimed at the youth market, there are some folks that use it as a business tool. Those folks are a bit worried that Microsoft is just going to convert it over to a Windows Mobile device and stop supporting the existing operating system on the device. I find it interesting that they are buying a company that is so closely identified with a mobile device. The Sidekick devices are actually made by Sharp for Danger, but you have to think that there might be a lenghtly contract to continue supplying Sidekicks to Danger….now Microsoft. Could this be the start of Microsoft selling cellular phone devices? Is this a counter-move to Google’s Android? Could be interesting times ahead!

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
 | Posted by MobileDataGuy | Categories: OtherStuff |