# SSH connection over USB drops while testing legato app

**URL:** <https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559>\
**Category:** Uncategorized\
**Created:** [August 5, 2021, 10:00pm UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559 "2021-08-05T22:00:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 5, 2021, 10:00pm UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/1 "2021-08-05T22:00:44Z")

</div>

I was testing a legato app which acquires GPS coordinates on WP7702, the app is programmed to constantly send GPS in SMS to my cell phone for 4 mins, but my cell phone only received the SMS for approx 1-2 mins, and I looked at the terminal trying to figure out what was going wrong on Legato app, I found out the the ssh connection drops:

> packet\_write\_wait: Connection to 192.168.2.2 port 22: Broken pipe

 ![Screen Shot 2021-08-05 at 3.00.07 PM](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/a/a9c189c33cb5a6d7b1734d2559009e05443c7383.png)

Then I had to wait a few second to ssh reconnect to the target over USB. I connected wp7702 to a macbook BTW.

Can anyone help me figure out the issue is from target or legato app?

---

<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:** [August 6, 2021, 12:12am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/2 "2021-08-06T00:12:14Z")

</div>

Do you see problem in ubuntu linux machine?

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 12:42am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/3 "2021-08-06T00:42:32Z")

</div>

I don’t really have an ubuntu machine, I could only install a virtual ubuntu machine to see if it would happen. Will that be okay? any particular ubuntu version it requires?

Also, I forgot to mention, the app seems to stop working while ssh connection drops.

---

<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:** [August 6, 2021, 1:19am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/4 "2021-08-06T01:19:00Z")

</div>

is it a module reset case?

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 1:52am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/5 "2021-08-06T01:52:41Z")

</div>

I don’t think so. does the system log the reset?  
As far as I can tell, the legato app has a SQLite database, if a reset occurred, the database would also be reset, I just checked the database, it looks good as before. so I dont think that was a reset…

---

<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:** [August 6, 2021, 1:55am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/6 "2021-08-06T01:55:13Z")

</div>

do you have the UART console?  
It will show there.

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 2:22am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/7 "2021-08-06T02:22:22Z")

</div>

No, do I have to install it on my computer?

---

<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:** [August 6, 2021, 2:40am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/8 "2021-08-06T02:40:12Z")

</div>

you can check the schematic, there should be a USB port for UART2

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 4:12am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/9 "2021-08-06T04:12:50Z")

</div>

I found it, I actually use that port for SSH connection. How could I use it for UART2 though?

---

<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:** [August 6, 2021, 4:14am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/10 "2021-08-06T04:14:28Z")

</div>

Ssh is using usb port, uart2 is just a serial port

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 4:46am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/11 "2021-08-06T04:46:31Z")

</div>

Are we talking about MangOH red WP7702? I can’t find any serial port either on device or user guide manual

---

<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:** [August 6, 2021, 5:02am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/12 "2021-08-06T05:02:47Z")

</div>

There are two usb ports on the mangoh red board, one is connected to usn of module, one is connected to uart2 of module

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 6, 2021, 6:19am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/13 "2021-08-06T06:19:56Z")

</div>

I think I found it, how could I get UART console on my computer then?

---

<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:** [August 6, 2021, 6:23am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/14 "2021-08-06T06:23:54Z")

</div>

I think so , if you have set AT!MAPAURT=16,2 which to choose console function for UART2

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 7, 2021, 6:25am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/15 "2021-08-07T06:25:16Z")

</div>

when I set AT!MAPUART=16,2 how could I see UART console then? would ssh connection still be working?

---

<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:** [August 7, 2021, 8:08am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/16 "2021-08-07T08:08:14Z")

</div>

Did you see a com port in device manager?  
You can use tera term to open the port

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 7, 2021, 7:43pm UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/17 "2021-08-07T19:43:57Z")

</div>

I have set it, but cant find the port you mentioned:  
AT!MAPUART  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/c/c37ce272ae025573fef5521ca9521460f591258a.png)  
Device Manager  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/2X/e/ee5139b7ce7c8b3cbcb2f1c6d0c4b4ed3a122e3a.png)

---

<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:** [August 7, 2021, 8:14pm UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/18 "2021-08-07T20:14:18Z")

</div>

Did you connect the CN800 to PC?

[https://www.manualslib.com/manual/1843614/Mangoh-Yellow.html?selected=1&page=31#manual](https://www.manualslib.com/manual/1843614/Mangoh-Yellow.html?selected=1&page=31#manual)

---

<div class="post-metadata">

**Author:** ![jeremyzhang](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeremyzhang](https://mangoh.discourse.group/u/jeremyzhang)\
**Post date:** [August 7, 2021, 8:36pm UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/19 "2021-08-07T20:36:28Z")

</div>

yes I did, mangoh red has only two usb ports and I have had both connected to PC

---

<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:** [August 8, 2021, 1:24am UTC](https://mangoh.discourse.group/t/ssh-connection-over-usb-drops-while-testing-legato-app/9559/20 "2021-08-08T01:24:32Z")

</div>

Then it should have a com port in device manager …
