Getting Started with SiWx91x AT Commands#
This guide provides a technical overview for developers to set up, configure, and interact with SiWx91x devices using the AT command interface.
Prerequisites/Setup Requirements#
Hardware Requirements#
A Windows PC.
802.11 ax/b/g/n Access Point for signaling mode or end-to-end mode testing.
Spectrum Analyzer for TX RF measurement (PER-TX) for non-signaling mode testing.
Signal Generator for RX RF measurement (PER_RX) for non-signaling mode testing.
A Micro-coaxial connector plug to SMA-female cable (RF connector) for connecting the U.Fl port of the Si917 radio board to the Spectrum Analyzer or Signal Generator.
SoC Mode:
Standalone
BRD4002A Wireless Pro Kit Mainboard [SI-MB4002A]
Radio Boards
BRD4338A [SiWx917-RB4338A]
BRD4339B [SiWx917-RB4339B]
BRD4340A [SiWx917-RB4340A]
BRD4343A [SiWx917-RB4343A]
Kits
SiWx917 Pro Kit Si917-PK6031A
SiWx917 Pro Kit [Si917-PK6032A]
SiWx917 AC1 Module Explorer Kit (BRD2708A)
Software Requirements#
Simplicity Studio
A Serial terminal software such as Serial Debug Assistant
Note : You can use the Simplicity Studio's console window to send and receive CLI commands; however, using the Serial Debug Assistant is recommended for easier command usage.
Getting Started#
Refer to the instructions here to:
Create a Studio project with the AT Command Processor example
For project folder structure details, see the WiSeConnect Examples page.
Application Build Environment#
You can configure this application to suit your requirements and development environment.
The application uses the default configurations as provided in the wifi_commands.c file. You can choose to configure these parameters as needed.
Test the Application#
See the instructions to:
Initial Communication Test#
Open the terminal and press Enter. You should see a prompt or be able to type commands.
Send the readiness check:
at+ready?
Expected response:
OK
If no response:
Double-check serial settings, cabling, and power.
Try resetting the device or toggling power.
AT Command Syntax and Usage#
Format:
All commands start withat+
(case-insensitive).Parameters:
Comma-separated, no spaces. Example:at+echo=1
Response:
Each command returns eitherOK
(success) orERROR <code>
(failure).Workflow:
Wait for a response before sending the next command.Case Sensitivity:All commands are case insensitive. You can enter the command using lowercase, uppercase, or mixed-case characters.
AT Command Examples#
Basic Commands#
at+ready?
OK
at+echo=1
OK
at+soft-reset
OK
Advanced Scan#
at+wifi-scan-advconf=-10,0,30,40,0,0
OK
at+wifi-start-scan=1,,2
OK
at+WIFI_SCAN_RESULTS=11,,1,6,-57,1,TestAP_2G,56:37:bb:9f:87:dd,,1,6,-57,1,TestAP,54:37:bb:ef:87:dd,,4,2,-65,1,Manu,50:91:e3:27:3c:c0,,10,6,-67,1,Airtel_mall_3107,54:37:bb:7f:0d:6d,,2,6,-68,1,Airtel_Ravikiran Dev,90:67:17:ae:3c:4d,,10,2,-68,1,SVN301RajeevJio2ghz,94:fb:a7:60:08:ec,,1,2,-69,1,JeshJeswi_2G,7a:90:0a:f7:a0:27,,6,2,-69,1,JioFiber-Bg7OR,62:90:0a:c6:75:f1,,11,2,-69,1,Diyansh_2G,8c:a3:99:bf:16:fc,,1,2,-70,1,JioFiber-qq576,f0:ed:b8:43:9a:2c,,1,2,-71,1,My home _2.4G,a8:da:0c:2a:45:7d,,
at+wifi-scan-rslts=6
OK 6 1 2 -50 1 "TestAP_5G" 56:37:bb:9f:87:dd 1 2 -50 1 "TestAP" 54:37:bb:ef:87:dd 7 2 -66 1 Naresh_5g e6:fa:c4:09:22:79 2 2 -67 1 "Silabs_TestAP" Dev,90:67:17:ae:3c:4d 10 2 -68 1 SVN301RajeevJio2ghz 94:fb:a7:60:08:ec 2 2 -70 1 "Silabs_ps_987" 18:45:93:6a:2b:29
TCP Socket#
// Initialize Wi-Fi client interface
at+net-init=8
OK
// Set PSK and save under Credential ID 1
at+net-cred-wifipsk=1,"Silabs_123"
OK
// Set SSID and saved credential and save under Profile ID 0, with default authentication and encryption
at+net-sta-cred=0,"Silabs_AP",1
OK
// Join AP over Wi-Fi client interface using saved profile
at+net-up=8,0
OK
// Open a TCP socket
at+socket=2,1,6
OK 1
// Set keep alive to 30 seconds
at+setsockopt=1,65535,8,30
OK
at+connect=1,192.168.1.20,5001
OK
at+send=1,,,5,hello
OK
at+close=1
OK
Creating a new command handler#
Command handlers consist of two parts:
A function that prepares the function arguments and calls the target API.
Metadata that goes into the SLC component file that is used to generate the command database. You specify the metadata in the template_contribution section of the SLCC file under the name console_commands.
Sample command handler metadata:
template_contribution:
- name: console_commands
value:
my_command: # This is the string used to identify the command
handler: my_command_handler # This is the name of the command handler function
arguments:
# Arguments can be as simple as specifying the type
- int32
# Arguments can also be provided with 'type'
- type: uint8
# This represents all remaining data on the command line
- "*"
The command handler function must have the following syntax:
sl_status_t my_command_handler(const console_args_t *arguments)
Argument types#
String | Representation |
---|---|
uint8 | unsigned integer |
uint16 | unsigned integer |
uint32 | unsigned integer |
int | signed integer |
int8 | signed integer |
int16 | signed integer |
int32 | signed integer |
string | string |
hex | Data represented is hexadecimal |
* | All remaining command line data |
Troubleshooting#
No response:
Check serial port, cable, and power.
Confirm baud rate and terminal settings.
Try a hardware reset or use
at+soft-reset
.
Garbled output:
Mismatched baud rate or incorrect terminal settings.
Next Steps#
Explore the AT Commands Reference Guide