# UART on IoT Connector

**URL:** <https://mangoh.discourse.group/t/uart-on-iot-connector/1246>\
**Category:** IoT Cards\
**Created:** [March 15, 2018, 6:31pm UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246 "2018-03-15T18:31:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mangoh.discourse.group/u/Alex)\
**Post date:** [March 15, 2018, 6:31pm UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/1 "2018-03-15T18:31:20Z")

</div>

I am trying to talk UART to an HL 7748 on the mangOH red board via an external MCU. My goal is to send AT commands to the HL. I’m trying to do this via the IoT connector breakout board. UART looks to be pins 12 and 13. Will only connecting these work? What about the n\_card\_detect ? Are those signals to the IOT connector only enabled if the n\_card\_detect is low ?

---

<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:** [March 16, 2018, 3:07am UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/2 "2018-03-16T03:07:16Z")

</div>

maybe you need to talk to @davidc

@davidc did you want to showcase what you just built?

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mangoh.discourse.group/u/Alex)\
**Post date:** [March 16, 2018, 3:39am UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/3 "2018-03-16T03:39:13Z")

</div>

Hi David. So I am evaluating the WP8548 and the HL7800 (i think we have a 7748 now until 7800 becomes available). I’m wanting to send AT commands from an external microcontroller to the HL chip. I’m not receiving anything back on the HL. I am using UART1 in the IOT connector. Also tried the rasp pi connector. Swapped out the HL for the WP and did get data back from WP, but it is “garbage”. I am still digging through all the datasheets. AT!MAPUART tells me that UART1 is mapped to AT commands, so I still need to do some debugging.

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://mangoh.discourse.group/u/davidc)\
**Post date:** [March 26, 2018, 5:06am UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/4 "2018-03-26T05:06:01Z")

</div>

Hi Alex,

Sorry for delay. I’ve PM’d you with more info.

ciao, Dave

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mangoh.discourse.group/u/Alex)\
**Post date:** [April 23, 2018, 10:55pm UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/5 "2018-04-23T22:55:46Z")

</div>

For those who may read this post in the future, here are some tips to get UART1 working:

I have got the UART1 working on the Raspberry Pi header to send and receive AT commands to the cellular chips. I am using an external microcontroller to talk UART to both the WP and HL chips. There is a level shifter on the mangOH Red board for the RPi header, so this is the reason I am using it (CF3 modules are 1.8V, but my uC is 3.3). David will have his board soon that will be able to connect to the IoT slot and use the UART on that connector. I did not have to configure the WP or HL chip to get UART1 working on RPi header. On the WP chip, when I type at!mapuart?, I get 1,16, I think this was the configuration when I first got the chip. This says UART1 is configured for AT and UART2 is for console. I also had to change the UART settings on my microcontroller. I could not find much information about the settings online but the most important one was parity bit set to none. When using the HL chip, since I am only using 2 wire UART, I had to tie the RTS and CTS together. The HL chip would not respond without this. The WP chip did not require tying RTS and CTS together for some reason. Also if sending AT commands to these chips with a microcontroller, keep in mind the cellular chip might echo your command back to you. This can be turned on and off via ATE0/1 command.

---

<div class="post-metadata">

**Author:** ![hitheshkaranth](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/hitheshkaranth/32/443_2.png) [@hitheshkaranth](https://mangoh.discourse.group/u/hitheshkaranth)\
**Post date:** [April 26, 2018, 12:21pm UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/6 "2018-04-26T12:21:30Z")

</div>

@Alex

In accordance to your above statement is there a way to configure the CN307(Rpi Header) especially(Pin 10,8) as UART ports and use it for any external micro controller usage. I do belive that the above statment meets my necessity too so can you explain in detail how did you acheive this one? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mangoh.discourse.group/u/Alex)\
**Post date:** [April 26, 2018, 3:14pm UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/7 "2018-04-26T15:14:05Z")

</div>

Yes, that is exactly what I am doing. I am sending AT commands with an external MCU. If your MCU uses 3.3V, it should work fine via RPi. When David’s board is available for purchase, you can then use it for IOT connector if mcu voltage is \> 1.8V. There is not much to it for RPi. Connect the Rx and Tx lines, as well as a ground. If you are using an HL chip, tie the Rts and Cts together (I did this on the IOT connector ). Make sure th MCU uart settings are 115200 baud rate , no parity , and one stop bit. Though I do need to look into this and figure out how to get error checking working. When I had parity set, my MCU would receive incorrect responses, so I need to figure out how to set it on the HL and WP. But this will get you started. When I start working on it again I will report back. Let me know if you have any questions. I started out just sending “AT\r”. And I would get an “OK” as a response. It will echo the command you sent to it as that setting is on by default , so keep this in mind. On the HL i am getting a few “extra” carriage returns and line feeds, but it is consistent in this. Something else I need to look at. The WP will respond with carriage return , new line , OK, which is more of what I expect. I have sent many other commands too, like at!mapuart? And get good responses.

---

<div class="post-metadata">

**Author:** ![hitheshkaranth](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/hitheshkaranth/32/443_2.png) [@hitheshkaranth](https://mangoh.discourse.group/u/hitheshkaranth)\
**Post date:** [April 28, 2018, 7:16am UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/8 "2018-04-28T07:16:10Z")

</div>

@Alex

> I belive /dev/ttyHS0 is the directory under taken to use UART0 which is on port 10,8 of CN307 right?

> This is also considered as uart1 when enabling using “uartMode set 1 app” am i wrong in this one?

> is linux application mode is considered for usage of uart using application developed via developer studio ?

---

<div class="post-metadata">

**Author:** ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://mangoh.discourse.group/u/Alex)\
**Post date:** [May 4, 2018, 5:14am UTC](https://mangoh.discourse.group/t/uart-on-iot-connector/1246/9 "2018-05-04T05:14:01Z")

</div>

Worked more on the UART1 via Raspberry Pi connector today. I am able to use my microcontroller to send SMS messages on the mangOH board with the WP chip. I am using the WP first because I can easily bring up tera term to send AT messages and verify my work. I hope the HL chip behaves the same way, but I will try it out soon. I have been told that they should be exactly the same in this regard ie. If I have code to work with the WP, I should be able to swap out to the HL and it will behave the same. We will see…

Edit : I am not able to just simply switch out the WP and HL chip and send AT commands to get the SMS and cellular to work. The WP 8548 chip is 3G technology and will work with many different SIM cards. The HL 7748 uses LTE CAT M1, thus needs a CAT M1 SIM card. Finding a CAT M1 SIM card has been harder than I thought. But I do have some on their way from ATT.
