Info

You are currently browsing the Thoughts weblog archives for January, 2010.

Calendar
January 2010
M T W T F S S
« Jan    
 123
45678910
11121314151617
18192021222324
25262728293031
Categories
Links

Archive for January 2010

ESN Conversion

Today, our Sprint Liaison passed a spreadsheet with 100+ decimal ESN numbers matched to our phone numbers. Our cards report ESN numbers in Hex. Turns out there’s a smidgen of knowledge needed to switching between the two.

Then you get something like this.

perl -nE 'say hex( substr($_, 0, 2) ) . hex( substr($_, 2) );'

perl -nE 'say uc(sprintf("%x%x", substr($_, 0, 3), substr($_, 3 ) ));'

Happy Coding.

|