# AT!MAPUART strange behavior

**URL:** <https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912>\
**Category:** mangOH Green\
**Created:** [September 14, 2018, 6:56pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912 "2018-09-14T18:56:08Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 14, 2018, 6:56pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/1 "2018-09-14T18:56:08Z")

</div>

Hi,

I’m trying to set the MangOH Green with “AT!MAPUART=1,1”. However, when I run the command to check if it worked the result is “AT!MAPUART: 17,16”, looking at the developers datasheet this is not even possible, can someone give me a hint if the command is working and what I’m doing wrong?

Regards,  
Daniel

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 14, 2018, 10:24pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/2 "2018-09-14T22:24:54Z")

</div>

what module are you using and fw revision?  
run cm info on the device

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 17, 2018, 5:19pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/3 "2018-09-17T17:19:28Z")

</div>

Hi Asyal, thanks for the feedback.

Device: WP7702  
IMEI: 352653090001751  
IMEISV: 2  
FSN: VU735370470101  
Firmware Version: SWI9X06Y\_02.16.04.00 019853 jenkins 2018/05/15 19:28:37  
Bootloader Version: SWI9X06Y\_02.16.04.00 019853 jenkins 2018/05/15 19:28:37  
MCU Version: 002.009  
PRI Part Number (PN): 9907365  
PRI Revision: 001.001  
Carrier PRI Name: GENERIC  
Carrier PRI Revision: 001.021\_000  
SKU: 1103530  
Last Reset Cause: Power Down  
Resets Count: Expected: 79 Unexpected: 15

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 17, 2018, 6:16pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/4 "2018-09-17T18:16:59Z")

</div>

> [@fefer](#):
>
> I’m trying to set the MangOH Green with “AT!MAPUART=1,1”. However, when I run the command to check if it worked the result is “AT!MAPUART: 17,16”, looking at the developers datasheet this is not even possible, can someone give me a hint if the command is working and what I’m doing wrong?

Can you print your direct output for the AT command?

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 18, 2018, 11:54am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/5 "2018-09-18T11:54:41Z")

</div>

Sure, I’m attaching it. However, I got it wrong, the output is still strange but not as I said. Can you explain these outputs?

![AT](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/570bdb18f6d87b1b386e5da4fb92bcd0fff0882a.png)

---

<div class="post-metadata">

**Author:** ![rkirk](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@rkirk](https://mangoh.discourse.group/u/rkirk)\
**Post date:** [September 18, 2018, 11:52pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/6 "2018-09-18T23:52:16Z")

</div>

Hi @fefer, that looks good to me. As per AT command spec ([https://source.sierrawireless.com/resources/airprime/software/airprime\_wpx5xx\_wp76xx\_wp77xx\_at\_command\_reference/](https://source.sierrawireless.com/resources/airprime/software/airprime_wpx5xx_wp76xx_wp77xx_at_command_reference/)):

> ```
> Usage:
> • Execution: AT!MAPUART=<service>[,<uart>]
> Response: OK
> Purpose: Map the specfiied <service> to the specified <uart> (if no <uart> is
> specified, UART1 is used).
> • Query: AT!MAPUART?
> Response: !MAPUART: <service (UART1)>, <service (UART2)>
> OK
> Purpose: Report the current mappings for both UARTs
> 
> ```

(edit: And by “looks good” I mean it matches the spec :). The asymmetry of the get/set parameters on this one trips me up too.)

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 19, 2018, 4:34pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/7 "2018-09-19T16:34:02Z")

</div>

Oh, gotcha, thanks a lot!! Yes, it was written but it’s a bit tricky. Another thing about this command that I didn’t get, I saw that I can change both MUX by hardware (using the dipswitch) or by software (using MAPUART). So, how does this works?

---

<div class="post-metadata">

**Author:** ![rkirk](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@rkirk](https://mangoh.discourse.group/u/rkirk)\
**Post date:** [September 20, 2018, 12:22am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/8 "2018-09-20T00:22:12Z")

</div>

Sorry, I don’t follow the MUX/dipswitch comment. Can you point me to the document you’re referring to? I don’t think there are any hardware mechanisms to override the MAPUART configuration, but maybe there is some conflicting documentation.

Ryan

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 20, 2018, 12:29am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/9 "2018-09-20T00:29:14Z")

</div>

Sure, Developers guide page 27 and 28, there is a table of how you can change UART settings, it says by hardware/software method. Bellow is the table:

 ![42%20PM](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/7a94b98b5f77357a547a7c2803e1e5cffdf7a864.png)

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 20, 2018, 12:56am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/10 "2018-09-20T00:56:43Z")

</div>

The MUX allows you to direct UART1 to either IoT0 or IoT1 slot.  
The AT commands allow you set the desired state of the UART (linux etc.)

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 20, 2018, 1:16am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/11 "2018-09-20T01:16:24Z")

</div>

Thanks for the clarifying it. The MUX **hardware** settings allow setting to the Arduino too, right? So, If I’m right and I want a connection of Arduino to the Linux as a bridge connecting to CF3 module I need dipswitch 6 set to OFF and AT!MAPUART set to 17,1, right?

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [September 20, 2018, 9:29pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/12 "2018-09-20T21:29:56Z")

</div>

Have you tried this tutorial: [https://mangoh.io/mangoh-green-arduino](https://mangoh.io/mangoh-green-arduino)

@Mirac might be able to help you with that.

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 22, 2018, 3:22pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/13 "2018-09-22T15:22:45Z")

</div>

Hi Asyal,

I’ve been trying it, but I’m struggling to find some of the files, like the “Airvantage.zip”. I’ll contact @Mirac to check if he can help me solve some of my problems 🙂

---

<div class="post-metadata">

**Author:** ![Mirac](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Mirac](https://mangoh.discourse.group/u/Mirac)\
**Post date:** [September 25, 2018, 10:09pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/14 "2018-09-25T22:09:41Z")

</div>

Hi fefer,

Can you please try this tutorial and see if it works:

[4119370\_mangOH Green Tutorial - Arduino to AirVantage\_r1.pdf](https://mangoh.discourse.group/uploads/short-url/c6Gg400yCevAzgsuqYEBOFICmwK.pdf) (989.6 KB)

Let me know if you have further questions.

Thanks,  
Mirac

---

<div class="post-metadata">

**Author:** ![AndrewMawdsley](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AndrewMawdsley](https://mangoh.discourse.group/u/AndrewMawdsley)\
**Post date:** [September 26, 2018, 8:26am UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/15 "2018-09-26T08:26:33Z")

</div>

> [@fefer](#):
>
> AT!MAPUART: 17,16

AT!MAPUART= 17 ,1 to set UART0 (HS0) to Customer Linux Application.  
AT!MAPUART= 16 ,2 to set UART1 (HSL1) to Linux Console.  
AT!MAPUART?

Result is:  
AT!MAPUART: 17,16

The output shows the status of the two serial ports, HS0 followed by HSL1  
17 = ttyHS0 linux application,  
16 = ttyHSL1 linux console.

Service to map to UART:  
0: UART disabled  
1: AT Command service  
2: Diagnostic Message service  
3: Reserved  
4: NMEA service  
5-15: Reserved  
16: Linux Console  
17: Customer Linux application

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 26, 2018, 12:57pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/16 "2018-09-26T12:57:44Z")

</div>

Hi @Mirac,

Thanks for your answer. I´ve seen this tutorial before, but it seems like it´s made for WP8548, while my MangOH contains the WP7702 and a small part of the tutorial uses files specific to WP8548, is it safe to work with those files? Do I need to download similar files but for WP7702? If yes, where should I find them?

Furthemore, by the image it seems like you use an Arduino extension of AirVantage, where should I find the files to install this extension?

Best,  
Daniel

---

<div class="post-metadata">

**Author:** ![fefer](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@fefer](https://mangoh.discourse.group/u/fefer)\
**Post date:** [September 26, 2018, 1:02pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/17 "2018-09-26T13:02:29Z")

</div>

Thank you @AndrewMawdsley, I got it. My question now is how to connect the modem with the Arduino. Asyal and Mirac pointed to really good docs. However, there are still a few gaps in my mind on how to connect them.

---

<div class="post-metadata">

**Author:** ![Mirac](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@Mirac](https://mangoh.discourse.group/u/Mirac)\
**Post date:** [September 26, 2018, 6:31pm UTC](https://mangoh.discourse.group/t/at-mapuart-strange-behavior/1912/18 "2018-09-26T18:31:52Z")

</div>

Hi Daniel,

If you’re talking about compiling mangOH platform, you don’t have to download new files, just use “make green\_wp77xx” instrad of “make wp85” specified in the document (note that do _not_ replace “wp77xx” with the actual module number i.e. “wp7702” etc. )

The arduino bridge files can be found here： [https://github.com/mangOH/ArduinoBridge](https://github.com/mangOH/ArduinoBridge)

Thanks,  
Mirac
