AR9331 no communication using UART


I am trying to perform UART communication on AR9331 module
I have SSH access to run UART code

In UBOOT I have used bootargs command as,
setenv bootargs "board=OOLITE-V1 console=ttyATH0,115200 root=/dev/mtdblock2 rootfstype=squashfs,jffs2"

Openwrt details are:
Image name: MIPS OpenWrt Linux-4.14.221
Build date: 2021-02-15 15:22:37 UTC
Architecture: MIPS
OS/image type: Linux Kernel
Compression: LZMA
Data size: 1.4 MB (1500591 bytes)
Load address: 0x80060000
Entry point: 0x80060000

In my code I am opening UART and trying to read data from UART

I am running it on SSH access terminal and sending data using one terminal with serial connection.

But the data is getting lost.

Is there any way to read data successfully using above configuration?

Please let me know how can I get the data without lost on UART when terminal access is enable in AR9331 module if possible?

Thanks in advance
Dhawal Lad

to work with UART, I was starting on luci-app-ser2net to verify hw/sw problems.

Thanks for your quick response.

Here, Our question like is it possible to access UART to read data when you are accessing same UART through Terminal? Theoretically, It is not possible because you are accessing same UART from Process and Terminal which may conflict.

But, We just want to get confirmation from your end.

Because we have another option to disable it from Boot Loader and it can be then accessible from process whenever required.

Ritesh Prajapati

We are facing the terms of Serial/UART/Terminal/Console......

I use:

Ok. Thanks for your prompt response.
We will validate at our end and will let you know if any further query for the same.

Ritesh Prajapati

@RadioOperator ,

Good Morning,

As you have provided Terminate UART console utility which is kind of utility to disable UART console.

Here, We have question like can we use same UART from application process while you are accessing UART console from any utility?

I think it won't be possible because we can't access UART console from both end at a either packet will be missed or dropped which we are facing right now..

Let me explain overall scenario like what we are doing over here.

  1. Board Boot and access UART console using Teraterm or Putty UART Terminal
  2. Then execute one process in which same UART is opened and waiting to get data over same UART
  3. Now, We are sending any command input over UART terminal and at the same time we are reading UART data in which some of packets or characters will be missed

So the main reason to drop or discard packets like same UART we are accessing from UART Terminal and out process running into OpenWRT

Hope above explanation will be sufficient regarding the issue which we are facing at our end.

Ritesh Prajapati

Hi, I do not think so.
UART hardware, works as a communication channel. We have all source code, we could full-control it, also simple.

  1. at the booting stage, we can ignore all startup messages output from UART Tx line.
  2. after our App is runing, App can print out any "ecrypted data" to Tx line, out side device, decrypted the data and response it.
  3. App can capature and analyze "any" input data from Rx line, a filter in App will drop any un-wanted data. We can send Command/Data into openwrt.
  4. App can co-work with openwrt console, or disable the console print out a short time / permanently.

refer to linux UART control sample program, easy.

@RadioOperator ,

Thanks for your prompt response.

Initially we have thought exactly like that but we can have option to disable UART from boot loader because into closed product there is no any usage of UART Terminal to be enabled once it will be boot successfully

Ritesh Prajapati

After SSH serial connected, we can upload SystemUpgrade.bin file into openwrt, reliable.
Suggest your App could get all parameters/configs/commands from a file, and upload the file by SSH terminal.

@RadioOperator ,

Thanks for your quick response.