# Changing APN, Username and Password & le\_data\_Request

**URL:** <https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228>\
**Category:** Uncategorized\
**Created:** [March 28, 2019, 2:12pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228 "2019-03-28T14:12:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AE\_1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@AE\_1](https://forum.legato.io/u/AE_1)\
**Post date:** [March 28, 2019, 2:12pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/1 "2019-03-28T14:12:47Z")

</div>

Hello all,

how can I change the APN, Username and Password befor calling the le\_data\_Request function?

I am using the legato version18.06.03.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 28, 2019, 2:46pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/2 "2019-03-28T14:46:41Z")

</div>

Please see

> **[cm - Legato Docs](https://docs.legato.io/latest/toolsTarget_cm.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![AE\_1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@AE\_1](https://forum.legato.io/u/AE_1)\
**Post date:** [March 28, 2019, 3:06pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/3 "2019-03-28T15:06:59Z")

</div>

Hi jyijyi,

I have to change the apn , password and username from my source code.  
Is there any api function to do that, I would like to avoid to use the command “cm data apn”.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 28, 2019, 3:09pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/4 "2019-03-28T15:09:31Z")

</div>

Ypu can go and see the source code of cm tool

---

<div class="post-metadata">

**Author:** ![AE\_1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@AE\_1](https://forum.legato.io/u/AE_1)\
**Post date:** [March 28, 2019, 4:56pm UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/5 "2019-03-28T16:56:23Z")

</div>

Hi jyijyi,  
I already saw the source code. The cm tool uses the le\_mdc api (modem data control).  
The le\_data\_Request uses the le\_data api (dataConnectionService).

There is a warning:  
Warning  
Some Services shouldn’t be used together in the same app (e.g, if you use a multi-app safe service like Data Connection, you can’t also use the Modem Data Control Service).

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 29, 2019, 1:24am UTC](https://forum.legato.io/t/changing-apn-username-and-password-le-data-request/4228/6 "2019-03-29T01:24:55Z")

</div>

As you say you don’t want to use cm tool, then you can port the code to your application, then it will not be using the API together.
