Thursday, December 22, 2016

How To Calculate an IMEI from a MEID/ESN (Luhn's Algorithm)

This is a short article on how to get an IMEI number from a MEID or ESN, which should be the same. For a lot of people, this can be found within the device. But there will be times when a device will just not show this information.

Why Do I Need This?
As stated above, most of the time an IMEI can be easily found in your device settings. Other times you may even be able to find this printed on the back of a device. However, there will be times that neither provide an IMEI.

As for what it is needed for, most of us would have to give it to a carrier to register our device on a network before we can use the network. There may be other reasons, but this would be the most common.

For Me
I recently had an issue with a brand new LG G5 (US992) device that comes factory unlocked, but is branded for US Cellular. There was nothing on the back, and the settings only showed an MEID and ESN.

Reading through some forum threads, some people stated that popping in a GSM SIM card would allow me to see an IMEI in the settings if the device was on a CDMA network previously. The LG G5 had been on US Cellular for about two days, so maybe this was a simple solution. But after putting in a GSM SIM card, nothing changed...

Luhn's Algorithm
Math. Math is the solution here. If you have either the MEID or ESN, you have the ability to calculate your IMEI.

An MEID or ESN will be 14 digits, while an IMEI will be 15 digits. The IMEI will have the same first 14 digits as an MEID or ESN, with a final 15th digit called a check digit. Luhn's algorithm is a way to obtain that 15th digit. It is a public domain algorithm commonly used today for numerous devices.

The Math
I will give you a simple visual showing of how it is done. We will first write out our MEID:

12345678912345

You will then double every second digit of the MEID:

1 2 3 4 5 6   7 8   9 1 2 3 4 5  
1 4 3 8 5 12 7 16 9 2 2 6 4 10

Add up all the digits as though they were all single numbers:

1  4  3  8  5  12     7 16     9  2  2  6  4  10         
1+4+3+8+5+1+2+7+1+6+9+2+2+6+4+1+0=62

Now add to the summed number until it is divisible by 10 and results in a whole number:

62+8=70
70/10=7

The number that we added to the 62 is our check digit:

8

Our IMEI would then be:

123456789123458

This is just an example, but shows exactly how one would use a real MEID/ESN to calculate the 15th digit (to get the IMEI).

Does It Work?
I have used this during two occasions. The first was for my LG G5, and I was able to validate it through an IMEI checker, which did display the correct LG G5 variant--and was later sold to a customer with that IMEI, and who has not complained since our transaction.

The second occasion was during a job that required activating phones at times. I had an elderly customer who did not have the IMEI but provided the ESN to me. Following the formula above, I calculated his 15th digit and was able to confirm that his device was fully activated. 

Cricket: How To Reach & Increase Data Speeds & Hotspot on Unlimited Plan!

I recently decided I wanted to get an unlimited data plan, not one with restrictions to where you drop down to 90's modem speeds, but one where you could really just use as much as you want without penalty. I had a few options, so with some time wasted, eventually landed with Cricket. Here is how it all went down...



The Competition
Initially, I had a few options: Boost Mobile, MetroPCS, & Cricket. My phone of choice: LG G5 RS988, the factory unlocked variant covering the most frequency bands available for the G5.

Boost Mobile is the same price as MetroPCS, but you could save $10 if you did autopay ($5) and used the "rewards" app ($5); which would require you to view at least one offer every day for 20 days out of your billing cycle.

The only issue with Boost Mobile (besides using the Sprint network), was that I would need an applicable device. I have an iPhone 4 that works on the Sprint network, but because that does not support 4G, it would be pointless. I have an international LG G3, but that does not have the bands Sprint requires--and there is a disclosure that Sprint has to confirm the device beforehand. So, Boost Mobile was not a viable option for me.

MetroPCS was the next logical choice at $60. There was no credit for autopay, but since it used T-Mobile's network, it would work with my devices, which are all unlocked. I decided to try my luck and visit my closest store that is only 5 minutes by car.

I liked that even with the activation fee there were no taxes or surcharges added ($80). We tested the data at the store, and made a call (that took 20 seconds before getting a ring from the receiver). Once I left the store, I did an immediate speed check. It was pretty good at 36+Mbps, and higher upload speeds than my home Internet.

But as soon as I got home, the speeds had dropped to just above 1Mbps, and less for upload. That was not a problem since I did have home Internet, but what was a problem was calling or receiving calls. I could not do either after having tested with a friend. Every time I tried to make a call I would either lose the 3-4 bars of signal and 4G/LTE icon, getting an error message that "Mobile network is unavailable." Or, it would never ring, then end the call.

Of course I called tech support to diagnose the issue. They checked all my settings, had me restart, and verified my UCCID (SIM) number. Doing what they called a "network refresh", they told me to try to make a call in 30 minutes to see if the problem persisted. It did, so I called back and reiterated the issue and what had been done. In the end, after being asked if my device was 4G-capable, I had to cancel my service that was just over 3 hours old. (I am still fighting to get my money back!)

I was now left with Cricket as my last option. The good news is the Cricket is truly unlimited. Unlike Boost Mobile, where they would restrict your speeds after 23GB of usage, or MetroPCS, where they restrict you after 28GB of usage, Cricket does not have a limit. The only restrictions they have are speed limits (8Mpbs for 4G devices, 4Mbps for non-4G devices), which applies to all their plans. This was okay with me as I would not truly need higher speeds unless I was multitasking (e.g. watching FHD video and doing multiple app updates simultaneously).

The only other problem I could foresee was that in my area, it may have poor speeds in general, disallowing me from utilizing the data as I saw fit. A Tom's Guide article indicated that Cricket was at the bottom of the list in terms of speed, not even averaging its maximum speed limit! AT&T (the network Cricket uses), did pretty well, but its subsidiary was quite paltry in comparison. This was for a metropolitan city about an hour's drive away, so it could better or, likely, it could be worse.

There was no other available option for unlimited data, so I had to take my chances. I knew my phone would at least work as I had tried it with a AT&T prepaid SIM card previously. Again, I went to the store and signed up for the service. Since there was still a $5 credit on my AT&T prepaid account, I asked if there was a way to transfer that over. They were unable to do so, but did knock off the $10 SIM card fee they charge. This left me a charge for a little over $95 after taxes ($70 for the plan, $25 for the activation fee). Which may mean that they will charge taxes on the next bill, as AT&T prepaid does, but I was given assurance that they notated my account to waive any SIM fees if I ever needed a new one, as well as some additional fees if I had to add any new lines. And with autopay, I will save another $5, making it only slightly more expensive that what I would have been paying with MetroPCS.

On a side note, besides Cricket charging more than the competition, I would also lose the ability to have HD Voice that I could retain if I had Boost Mobile or MetroPCS. This is not a concern for me, but it does change my signal to "H" during my calls (and probably to "3G" in certain locations).

We had tested the data and made sure I could make calls (I already had some texts from Cricket about signing up). When I got into my car I did a speed test, which was slow at around 3Mbps for download--and somehow faster for upload--but it would get the job done. The ultimate test was when I arrived home. I first did a speed test, which was still about the same, which also meant better than MetroPCS. I then made a call to a friend, and it worked beautifully!

The last things I did included checking my settings for my network. I was originally on LTE/GSM/UMTS, but I found changing to Global--the default for factory unlocked phones--did a bit better in terms of speeds. I could also switch between these two choices after a call to get my 4G LTE signal back instantly.

And I also found that while the unlimited plan was optimized for 480p video, moving up to a 720p YouTube video seemed to work without the need to buffer constantly. Trying 1080p, buffering happened quick and often. Better speeds may correct that, but I can survive with HD on a phone or tablet.

How To Reach Cricket's "Fastest" Data Speeds
I mentioned earlier how I was getting fairly slow speeds from Cricket when I tested at the store and at my home. Even if I could only get 8Mbps downloads, I would prefer to get that as much as possible. So I set out to see if I could...

There were two free apps that I tested, and both worked. I believe they flush some settings and give you a clean slate with the network. From there, I was able to achieve much better speeds with great side effects.

The first app is Network Signal Speed Booster. It is a 16MB+ app with ads, but it takes a single button press to get it started. An ad will come up before it is done, then you can leave (not exit) the app and use your data to its fullest. I tested with Speedtest.net's app--there are other good apps, but this is a popular one--just ensure to enable your GPS (or location as it will likely be called) to get more accurate results. With this app I was able to get over 8Mbps download speeds, with upload speeds at 4+Mbps.

The second app is Internet Speed Booster Free. It is also is a 16+MB app with ads, and also takes a single button press to get started. The app aesthetic is a bit more polished, but I feel like its ads take more time to exit, that being a second or two longer. On top of this, it does show in the corner of the screen when activated. I do like this feature of the app as I like knowing that it is still running. (When I returned to the other app mentioned at one point, I had to restart it, even though my testing showed it seemed to still be running.) With this app I was able to get similar results in terms of speeds.

The major differences between the two apps was that the first app seemed to have slightly lower latency times when tested; however, the second app seemed to have slightly better download and upload speeds.

With either app, I was then able to run FHD (1080p) videos without buffering. I expected this would be true if I could reach Cricket's speed caps, but only now was able to confirm it. I can also safely say that with either app I was able to achieve higher Mbps speeds than the speed cap, nearly hitting a constant ~9Mbps download and 5+Mbps upload with the second app during two tests!

I should state that you may get different speeds in different locations and have to retest when moving from one spot to the other. Traveling and trying to get the most speeds out of where you are may also prove fruitless since you will likely end up with different speeds when you finally reach your destination.

How To Surpass Cricket's Fastest Data Speeds
I had been extremely pleased with my findings, and did not plan to push it any further. Yet, when I was watching a YouTube video I noticed that it was available in 1440p (2.5K). Of course when I tried it, there was constant buffering in between seconds of video playback. While I did not expect to be able to watch 1440p without buffering, I thought it would be fun to see if I could.

I brought up an article to find out what the average speeds needed to be in order to watch 1440p. It showed 1080p as needing 8Mbps, which rang true from my research, and that 1440p needed 10Mbps. Could I really get above Cricket's speed cap and get smooth video playback?

I discussed the possibility with a friend, and we both landed on the only plausible solution being different APN settings. I had already tried AT&T to no avail, but maybe there were some out there for Cricket I had not yet tried.

I went through a lot of articles that either gave me the same exact APN settings Cricket's SIM has me use, or just rubbish hacks that were of no use to me. Finally, after reading through a thread further than necessary, someone gave some APN settings that they were using. The APN settings I have were tried by this person and did not work for them, but they have found some that did.

There were two APN settings, one for just the Internet, and another for just the MMS. The Internet APN settings added without complication to my phone, but the MMS would not stick. It is rare that I send a MMS, and when I do send a picture, it is normally through a messaging app. 

After plugging in the new Internet APN settings and selecting it, I made a test call and SMS, both of which worked successfully (I did not try a MMS). I then ensured that one of the two apps I listed above (to reach Cricket's speeds caps) were in effect before trying a speed test.

The results were amazing! I was able to hit anywhere from 9+Mbps-11+Mbps for download speeds! What was odd during my tests was that it seemed that choosing the Global option gave better upload speeds, but not always better download speeds when using LTE/GSM/UMTS--albeit a small difference, if at all.

My next test was to go back to the YouTube video and try 1440p video playback. With everything in effect, I was able to watch 1440p without buffering once! The new APN settings was working, and working to help go above the speed caps imposed by Cricket.

The following are the Internet APN settings that I added to not only increase my Cricket speeds, but surpass the Cricket speeds caps (I have excluded any settings to be left blank):

  • Name: AioInternet
  • APN: ndo
  • MCC: 310
  • MNC: 150
  • Authentication type: PAP
  • APN type: default,supl,hipri,fota

If you do end up needing the MMS APN settings as well, remember to add them but still select the Internet settings as your primary option:

  • Name: AioMMS
  • APN: ndo
  • MMSC: http://aiowireless.net
  • Multimedia Message Proxy: proxy.aiowireless.net
  • Multimedia Message Port: 80
  • MCC: 310
  • MNC: 150
  • Authentication type: PAP
  • APN type: default,supl,mms

Note: It is possible to change "ndo" to a name of your choosing without affecting the other settings. This can be helpful if wanting to quickly know which settings you added and which settings came from the SIM card without first looking into the settings of each.

You may notice that combining these two APN settings gives you the normal Cricket APN settings. So, for whatever reason, using the Internet APN separately may somehow help increase your speed limits. This leads me to believe that somehow the MMS settings helps restrict or burden the data bandwidth, but I will never be sure.

How To Hotspot on Cricket's Unlimited Plan
If you check the fine print for the unlimited data plan through Cricket, you will read that the hotspot function is not supported. For their $50 or $60 plans, you can have the ability to hotspot for an additional $10/mo. And if you dig, you will find that you can only use up to 8GB for the hotspot feature.

I wanted to see if I could find a way around this, and I did! At first, I tried Bluetooth Internet sharing, but I could not make it work at all. But if I used my normal hotspot feature, I was able to connect to that hotspot from another device. I checked my account through the Cricket app, and have not yet seen any extra charges for a hotspot.

Maybe this is because the Cricket system is not setup to add that charge to unlimited plan..? I am also unsure if this also has to do with the phone I am using, since it is not from a carrier, and is completely unlocked (less the bootloader). Although, I would debate that the former is a more likely cause.


I also did try using a hotspot app before using my own hotspot, and found that FoxFi did work without issue as well. So, if by chance, the phone is the reason I can get around the hotspot problem, then using an app like FoxFi might help out others.

The Final Chirp
While I have not used Cricket for very long, and I will see if I keep them for more than a month, depending on their coverage in different locations, I am so far happy with my choice. In addition, Cricket does have a rewards app that may give me some benefits in terms of costs I have yet to weigh.