# How to get IMEI using le\_info\_GetImei()

**URL:** <https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054>\
**Category:** Uncategorized\
**Created:** [April 19, 2021, 9:49am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054 "2021-04-19T09:49:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![takashishiina](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@takashishiina](https://mangoh.discourse.group/u/takashishiina)\
**Post date:** [April 19, 2021, 9:49am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/1 "2021-04-19T09:49:19Z")

</div>

To get IMEI information for WP76 module, my customer would like to use le\_info\_GetImei().  
But customer showed compile error.  
I tried to build simple IMEI code but not succeed it yet.  
The following is my code, please advise how to modify it?  
Note: I checked cm\_info GitHub. But I cannot succeed it yet.  
[sample.c](https://mangoh.discourse.group/uploads/short-url/dJRDha9vjPLchqSzgTWbYrzPWbS.c) (345 Bytes)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 19, 2021, 11:12am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/2 "2021-04-19T11:12:55Z")

</div>

you can see this sample, you need to also change .adef and .cdef :

> **[legatoproject/legato-af](https://github.com/legatoproject/legato-af/tree/master/apps/test/modemServices/info/infoIntegrationTest)**
>
> master/apps/test/modemServices/info/infoIntegrationTest

---

<div class="post-metadata">

**Author:** ![takashishiina](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@takashishiina](https://mangoh.discourse.group/u/takashishiina)\
**Post date:** [April 21, 2021, 1:26am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/3 "2021-04-21T01:26:07Z")

</div>

Thanks. I changed adef and cdef file but not succeed it yet. I put the my test code, please check it.  
The following is my compile error.

(lsh:wp76stable) MVWXU1N1:~/myWorkspace/IMEI$ mkapp -t wp76xx -i ./leaf-data/current/wp76-legato/interfaces/modemServices infoTest.adef  
\*\* ERROR:  
/home/FMV/myWorkspace/IMEI/infoTest/Component.cdef:10:2: error: Can’t find dependent .api file: ‘le\_mdc.api’.[IMEI.zip](https://mangoh.discourse.group/uploads/short-url/oppoJiNrJ3ATtGdmKA5WrKmVRnF.zip) (3.4 KB)

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 21, 2021, 2:19am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/4 "2021-04-21T02:19:38Z")

</div>

I don’t see problem, you can use my code:

[infoTest.rar](https://mangoh.discourse.group/uploads/short-url/6E1pRnCqmWGzmztP25hqdbcn59o.rar) (297.5 KB)

---

<div class="post-metadata">

**Author:** ![takashishiina](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@takashishiina](https://mangoh.discourse.group/u/takashishiina)\
**Post date:** [April 21, 2021, 6:58am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/5 "2021-04-21T06:58:24Z")

</div>

Thanks. My customer tried to compile it under their environment but not succeed it yet. The following is error message.  
Please let us know which command should send for compiling your code?

(lsh:wp76stable) mangoh@mangoh-dev:~/myWorkspace/infoTest$ mkapp -t wp76xx infoTest.adef

\*\* ERROR:

/home/mangoh/myWorkspace/infoTest/infoTest/Component.cdef:10:8: error: Couldn’t find file ‘le\_info.api.’

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 21, 2021, 9:35am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/6 "2021-04-21T09:35:36Z")

</div>

There is makefile inside, you can have a look

---

<div class="post-metadata">

**Author:** ![takashishiina](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@takashishiina](https://mangoh.discourse.group/u/takashishiina)\
**Post date:** [April 21, 2021, 9:51am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/7 "2021-04-21T09:51:08Z")

</div>

If possible, please let us know how to compile using makefile inside?  
I do not know how to compile using makefile under leaf.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [April 21, 2021, 11:08am UTC](https://mangoh.discourse.group/t/how-to-get-imei-using-le-info-getimei/9054/8 "2021-04-21T11:08:00Z")

</div>

Didn’t the makefile have the mkapp command

Or you can type make in leaf shell
