Can't put UART2 in mode 17 on mangOH (Legato 16.07, WP85)

Hi there,

I am rather new to using Legato and the WP85xx modem, though I am a fairly reasonable user of Embedded Linux.

I SSH into Legato and tried changing UART2 for type 17 (Custom Linux application), but it does not seem to be working. I have a serial connected to the serial port of the mangOH. Here are the steps I took and the results I got:

  1. Entered echo -e “AT!MAPUART=17,2” > /dev/ttyAT
  2. Entered reboot
  3. Legato shows the shutdown process in the serial terminal and SSH connection is lost
  4. Bootup message starts displaying on the serial terminal! The last lines being

run_getty.sh: UART2 (=/dev/ttyHSL0) reserved for CONSOLE


Poky (Yocto Project Reference Distro) 1.7.2 swi-mdm9x15 /dev/ttyHSL1

  1. entering dmesg | grep tty returns

[ 0.000000] Kernel command line: console=ttyHSL0,115200 console=ttyHSL1,115200 fudge_ro_rootfs=true rootfs_ro=true mtdparts=msm_nand:0x00100000@0x051c0000(bootloader),0x01400000(kernel),0x03140000(rootfs),0x02780000(user0),0x08b80000(user1),0x00500000(user2),0x00200000(user3) androidboot.serialno=MDM9615 lkversion=1.3.0_a50272dbb2 androidboot.baseband=msm
[ 0.209583] msm_serial_hsl_probe: detected port #0 (ttyHSL0)
[ 0.209644] msm_serial_hsl_probe: ttyHSL0, function 0, not allowed to control by A5.
[ 0.209949] msm_serial_hsl_probe: detected port #1 (ttyHSL1)
[ 0.209980] msm_serial_hsl_probe: ttyHSL1 is reserved for CONSOLE service
[ 0.210254] msm_serial_hsl.1: ttyHSL1 at MMIO 0x16440000 (irq = 186, base_baud = 460800) is a MSM
[ 0.855821] console [ttyHSL1] enabled

Q1) Isn’t ttyHSL0 supposed to be connected to UART1 by default?
Q2) Why is UART2 still showing the console information?

Q3) If UART2 is correctly operating in mode 17, would printfs be shown here?

A similar question was mentioned at Mangoh UART communication issue - #4 by rio99 but a suitable answer was not given. Hope to get an answer here.

Thanks a lot.

Royan

Well, echo -e "AT!MAPUART=17,2" > /dev/ttyAT didn’t change anything for me neither, before executing any AT command try to connect to ttyAT port:

microcom -E /dev/ttyAT

and only then enter AT command, hope it helps.

Hello rio99.

Thanks a lot for your help. Works a treat :). Legato should update their documentation.

Here are the complete steps:

  1. enter microcom -E /dev/ttyAT
  2. type AT!MAPUART=17,2

or whatever other AT commands.

  1. press CTRL-X to exit microcom and return to the command prompt.

Thanks again.

how to check ussd code via legato application
example *!23# → to check balance.

Any one guide me how to use this

You can send AT command inside unsandboxed legato application

Or you can see the sample code to send AT!BSGPIO below via /dev/ttyAT port: