# Can we install application from SD Card or from Uart?

**URL:** <https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299>\
**Category:** Legato Application Framework\
**Created:** [September 22, 2022, 3:20pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299 "2022-09-22T15:20:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 22, 2022, 3:20pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/1 "2022-09-22T15:20:32Z")

</div>

Hi  
I am trying to install an application through UART on WP7607. Is it possible to do so?  
@jyijyi

---

<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:** [September 22, 2022, 3:56pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/2 "2022-09-22T15:56:10Z")

</div>

you can see here for transfer files via UART console:

> [@How to send and receive data using UART2 (RS232) interface](https://forum.legato.io/t/how-to-send-and-receive-data-using-uart2-rs232-interface/2403/5):
>
> You can use attached lrz binary. Here is an example to transfer file via UART console: transfer this lrz binary to /tmp of module by WINSCP cd /tmp; chmod 777 ./lrz; ./lrz -X cwe \</dev/ttyHSL1 \>/dev/ttyHSL1 In tera term, File → Transfer → XMODEM → tick 1K box → choose the file you want to transfer. the file will be in /tmp with filename “cwe”. [lrz](https://forum.legato.io/uploads/short-url/AoG97UPbPfQ2xS4vgYQKO4AQz2A) (202.7 KB)

You can see here for SSH/SCP through UART port in data mode:

> [@Update Over UART](https://forum.legato.io/t/update-over-uart/4824/2):
>
> You can connect DS via Uart. [How to connect Developer Studio via UART2 of module.docx](https://forum.legato.io/uploads/short-url/lSQpU2GipaMSCRxHJ9EnAAKZjan.docx) (360.1 KB)

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 22, 2022, 4:12pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/3 "2022-09-22T16:12:29Z")

</div>

can I copy my image to Sd card form UART and then install it on the system?  
am I going the right way ?

---

<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:** [September 22, 2022, 4:23pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/4 "2022-09-22T16:23:42Z")

</div>

you can directly copy the application from SD card to module /tmp folder and then install it.

```auto
ls /dev/mmc*
mkdir "/tmp/sdcard/"
/bin/mount -t auto -o sync /dev/mmcblk0p1 "/tmp/sdcard"
ls /tmp/sdcard

```

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 26, 2022, 10:23am UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/5 "2022-09-26T10:23:47Z")

</div>

Is there any API which installs the app and gives us status?  
@jyijyi

---

<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:** [September 26, 2022, 10:43am UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/6 "2022-09-26T10:43:21Z")

</div>

You can see the code here on how to use the “update” command to install app

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

> **[legato-af/framework/tools/target/linux/update at master ·...](https://github.com/legatoproject/legato-af/tree/master/framework/tools/target/linux/update)**
>
> master/framework/tools/target/linux/update

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 27, 2022, 12:14pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/7 "2022-09-27T12:14:26Z")

</div>

Hi  
I tried making and application (named : update) which is responsible for installing app from " /tmp " path.  
when I install “update” and see logs  
App update \<5021c1dd5a7a025cc24d54c552098422\> installed  
App ‘update\<5021c1dd5a7a025cc24d54c552098422\>’ installed properly.  
System on probation (timer started).  
Reaping unconfigured child process 22644.  
Execing ‘update’  
Setting resource limit maxCoreDumpFileBytes to value 102400.  
Setting resource limit maxFileBytes to value 102400.  
Setting resource limit maxLockedMemoryBytes to value 8192.  
Setting resource limit maxFileDescriptors to value 256.  
Setting resource limit maxMQueueBytes to value 512.  
Setting resource limit maxThreads to value 20.  
Setting resource limit maxQueuedSignals to value 100.  
I got these messages and it doesnot show any further log neither install the desired application.

**I want to install application from sdcard.**  
Thanks  
@jyijyi

---

<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:** [September 27, 2022, 12:37pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/8 "2022-09-27T12:37:03Z")

</div>

Have you installed a hello world application first from the SD card?

> **[legato-af/apps/sample/helloWorld at master · legatoproject/legato-af](https://github.com/legatoproject/legato-af/tree/master/apps/sample/helloWorld)**
>
> master/apps/sample/helloWorld

BTW, why do you need to make such application?  
Why don’t you just use the default “update” command to install application to your module?

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 27, 2022, 1:40pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/9 "2022-09-27T13:40:30Z")

</div>

Actually I don’t have access to the board directly through terminal so I want to keep my applications up to date.  
So I am finding a way to transfer my application to SD card(via UART or AT) and then updating it to the module.  
Can you suggest me a better option?  
previously I am using Airvantage for FOTA but I want to do it without internet connectivity.  
Thanks @jyijyi

---

<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:** [September 27, 2022, 2:14pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/10 "2022-09-27T14:14:29Z")

</div>

do you mean you want to automatically install the .update binary file in the SD card when you insert the SD card to the module?  
If so, you can write a script to monitor if there is SD card, and then mount the SD card, and then copy the .update binary file to /tmp folder, and then install it by “update” command.

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 27, 2022, 2:33pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/11 "2022-09-27T14:33:52Z")

</div>

Yes, it makes sense.  
but unfortunately I don’t have access to SD card as well. (I cannot insert or remove SD card physically)  
Any other way to pass my image to SD card ?  
@jyijyi

---

<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:** [September 27, 2022, 2:44pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/12 "2022-09-27T14:44:02Z")

</div>

you said that " I want to do it without internet connectivity", and then you cannot insert SD card to it, then the only way i think is to hire a people for you and insert a SD card with the binary inside.

---

<div class="post-metadata">

**Author:** ![bilawal.latif](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@bilawal.latif](https://forum.legato.io/u/bilawal.latif)\
**Post date:** [September 27, 2022, 2:59pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/13 "2022-09-27T14:59:04Z")

</div>

You are right in that case.  
If we have internet connectivity?  
Is there any way to do it other than Airvantage ?

---

<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:** [September 27, 2022, 3:25pm UTC](https://forum.legato.io/t/can-we-install-application-from-sd-card-or-from-uart/6299/14 "2022-09-27T15:25:25Z")

</div>

You can put your .update file to http or ftp server.  
On module side, you can download to /tmp folder by wget or ftp command
