ExecuteShellCommand: Difference between revisions

From Opale Wiki
Jump to navigation Jump to search
(Created page with "This places an AT Command to the specified modem port. '''COMMAND:''' {| class="wikitable" !Command !Input Arguments !Returns |- |SendAtCommand |Port index ATCommand (*) |Issue an AT Command to the specified module. |} (*) Note that the ATCommand must be entered with quotes if the AT Command itself includes double quotes or spaces. See below. '''OUTPUT:''' Response from the modem to the AT command. '''EXAMPLE:'''<syntaxhighlight lang="text"> ~# SendAtCommand 0, "A...")
Tag: 2017 source edit
 
No edit summary
 
Line 1: Line 1:
This places an AT Command to the specified modem port.  
This command executes a child application or script locally on the Mobile Robot.


'''COMMAND:'''  
This command runs in blocking mode and returns only after completion. 
 
'''COMMAND'''  
{| class="wikitable"
{| class="wikitable"
!Command
!Command
Line 7: Line 9:
!Returns
!Returns
|-
|-
|SendAtCommand
|'''ExecuteShellCommand'''
|Port index ATCommand (*)
|CommandPath, CommandArgs
|Issue an AT Command to the specified module.
|Command Return
|}
|}


(*) Note that the ATCommand must be entered with quotes if the AT Command itself includes double quotes or spaces. See below.
'''OUTPUT'''


'''OUTPUT:'''
Command status in the following format:


Response from the modem to the AT command.
"%s\n", script_result


'''EXAMPLE:'''<syntaxhighlight lang="text">
'''EXAMPLE'''<syntaxhighlight lang="text">
~# SendAtCommand 0, "ATI4"
~# ExecuteShellCommand /mnt/sdcard/tmp/power_calculation.sh 5
ATI4
25
Quectel
RM500Q-AE
Revision: RM500QAEAAR13A03M4G
OK
</syntaxhighlight>'''OR'''<syntaxhighlight lang="text">
~# SendAtCommand 0,'AT+QCALLCFG="voice_enable"'
+QCALLCFG: "voice_disable",1
OK
</syntaxhighlight>
</syntaxhighlight>
[[Category:GENERAL]]
[[Category:GENERAL]]
[[Category:R2D2]]
[[Category:R2D2]]

Latest revision as of 20:35, 1 April 2025

This command executes a child application or script locally on the Mobile Robot.

This command runs in blocking mode and returns only after completion.

COMMAND

Command Input Arguments Returns
ExecuteShellCommand CommandPath, CommandArgs Command Return

OUTPUT

Command status in the following format:

"%s\n", script_result

EXAMPLE

~# ExecuteShellCommand /mnt/sdcard/tmp/power_calculation.sh 5
25