Check for valid IMEI

南笙酒味 提交于 2019-12-04 07:08:23
Klaus Byskov Pedersen

IMEI numbers are validated using the Luhn algorithm. The linked page has implementations in various languages. This post also has a few more implementations and a general methodology on how to go about solving the Luhn algorithm.

IMEISV(IMEI software version) does not have Luhn algorithm check digit. Instead it has Software Version Number presented with two digits. Format of IMEI number has been evolving by years.

Wikipedia is the good source I think to see the changes in the format by years. If you look the new IMEI and IMEISV version format, you would see that Final Assembly Code(FAC) has removed and Type Allocation Code(TAC) was increased the 8 digit. There are free and commercial TAC lists exist on the internet.

it could be an option to validate TAC number by looking up the TAC lists on top of Luhn algorithm validation for new and old IMEI numbers. For old IMEI numbers FAC as 2 digit should be discarded and TAC validation should be done for 6 digits.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!