UART on raspberry pi header


#1

Hello

I’m trying to use the UART on the raspberry pi header.
UART1 is called UART0 on the pi header as I understand it and UART1_TX on the WP is UART0_RX_EXP (pin 10).

But I receive no data! Scoped pin 10 and it is pulled low. (Same as pin 12 on the IOT connector)
Tried setting !MAPUART: 17,1 but it’s still the same.

Can anyone help me please? :sweat_smile:

Maybe it has something to do with wifi using UART1? How do I disable wifi?


#2

WiFi interface is disabled by default. What command are you sending over UART?


#3

Trying to receive some ISM sensordata over UART but will test sending uart data later today.

Have a working app that reads data from ttyUSB0 but want to use UART on the raspberry header instead. Replaced ttyUSB0 with ttyHS0 but receive no data. Also tested with microcom -s 115200 /dev/ttyHS0

Connected our TX line to pin 10 on the raspberry header (+ 3.3V and GND) . While scoping the output of our TX line. Line is high with data sent but when connected to pin 10 the TX line goes permanently low.


#4

can u run at command:
at!entercnd="A710"
at!mapuart?

provide the output for the mapuart command


#5

at!entercnd="A710"
OK
at!mapuart?
!MAPUART: 17,16

OK


#6

ok, so you are set properly on UART.

How long is the cable between the sensor and Pi header? Note, it really cant be longer than a couple of cm.


#7

Yeah it’s just a couple of cm so that’s not the problem. Have tried two different mangoh reds.
Flow control disabled and tried pulling UART1_RTS low but it’s already low.

Not sure what to try next…:sweat:


#8

Do you asyal, or anybody else, get the UART to work on the mangoh red?


#9

yes, the mangoh team has UART working between the WP and WiFi module. So, it does work.


#10

We’ll post a sample app for UART loop back that you can use.

@dclark75 can you post the loop back sample. that way nilsarve can atleast see that part working.


#11

MT7697_WiFi_BT_fw.tar.gz (570.0 KB)


#12

nilsarve the attached project in the above message is set up to loopback on the /dev/ttyHS0 UART port. You will want to run the following before doing the test on the Linux side:

stty -F /dev/ttyHS0 raw 921600 crtscts ignbrk -echo


#13

Thank you.

Ran the command but need some help installing and running this loopback test on the mangoh.


#14

nilsarve,

To install you need to run the MT76x7 Flash Tool.

  1. Hit refresh to select correct COM port
  2. Select 921600 for baud rate
  3. Hit the file open icon by the ‘Download Scatter File’ and select the flash_download.ini file in the
    output folder for the project. This is located in:
    MTPublic4.3.0/out/linkit7697_hdk/MT7697_WiFi_BT_fw

To test I just ran a simple echo cmd to the /dev/ttyHS0 port

dave


#15

Got loopback to work when connecting RX and TX on the pi header and sending data with microcom. Not sure why I didn’t try this earlier.

Will try feeding the UART some data from an arduino.