Aa command in openwrt

I used to send AT command at openwrt in the old version,
for example, using the command aa / dev / ttyusb3 at+csq
with aa command
But I do not know the name of the package
Is this package available in new releases?
What command can I use to send AT command, i no need to chat command but cant save resualt in bash var

1 Like
  • What old version?
  • I can't find a Linux manual that describes an aa command

Try this:

echo -e '\r' 'at+csq' '\r' > /dev/ttyusb3

1 Like

Linux OpenWrt 3.10.44 #503 Fri Jun 29 17:48:02 CST 2018 mips GNU/Linux
i try this : echo -e '\r' 'at+csq' '\r' > /dev/ttyusb3
but not working

this is response of aa command

'Aa' may be just a manufacturer-specific binary, shell script file, or shell alias or function.

You might run "which aa" to find the binary or script file.
Or alternatively look for for alias definitions in your profile.

2 Likes

I check this
the result of '' which aa '' is
/bin/aa
what is your opinion ?

So, it is a binary or shell script. Not an alias.

You should check the details with "ls -l" so that you see if it is a symlink that leads to another file.

You should check if it is a script by looking at its contents with cat and hexdump

1 Like

Exactly before this, I did the same
But not leads to another file

Then you can continue to the second phase of my advice above, and try to find out if it is script (that you can copy), or if it is binary (which would then require sources and compiling)

If it is binary, you might need to look for your device's OEM GPL sources.

1 Like

my device is zbt we826 . how look OEM GPL source ?

Depends where you have got the old build...
So far it is unclear if you have been using somebody's private build of OpenWrt, some manufacturer's slightly modified OpenWrt based build, or something else.

So far you have only told a kernel date time stamp, but nothing about the actual OpenWrt version.
What does /etc/banner and /etc/openwrt_release tell ?

I never said you'd get a response. You only asked how to send the command. The echo command does not listen to the serial port.

EDIT: You can install the minicom package.

As @hnyman suggested, does cat /bin/aa look like a script, or is it binary code? A script will all be readable text, and the first line will be something like #!/bin/sh. Binary code will have garbled characters.

If it is a script you can just copy the file to /bin of any version (and give it execute permission) and it will likely work.

1 Like

Can i send at command on minicom fully to the modem and save the result in bash as a variable?

  • Since you see the result, you can copy/paste whatever you wish.
  • If you're referring to scripting or automating this, I have no clue.

Per the manual, you can save to a capture file using the -C argument:

https://linux.die.net/man/1/minicom