1. Home
  2. Knowledge Base
  3. SureMDM
  4. How to Connect to a WiFi Using RunScript on WearOS
  1. Home
  2. Knowledge Base
  3. Wearable Management
  4. How to Connect to a WiFi Using RunScript on WearOS

How to Connect to a WiFi Using RunScript on WearOS

Purpose

SureMDM administrators may require WearOS devices to connect to a WiFi network automatically using RunScript.

Prerequisites

  • CA certificate and Client certificate are required
  • SureMDM Agent version should be higher than 2.01.07
  • Device must be enrolled in Device Owner mode

Steps

  1. Push the CA certificate and the client certificate to the following location using a File Transfer job:

/data/data/com.nixwear/files

  1. After the certificates are pushed to the device, apply the following RunScript to configure the WiFi.

Note: This RunScript works only when Nix is set as Device Owner.

  1. Log in to the SureMDM Console
  2. Navigate to Jobs → New Job → Android → Run Script
  3. Enter a Job Name
  4. Add the following script:

#!suremdm

ConfigureWifiSettings({

“SSID”: “Rail”,”securityType”: “WPA/WPA2/WPA3 – Enterprise”,”identity”: “anonymous”,”CaCertificatePath”: “msnett-rootca-4116.cer”,”domain”: “msnett.railbb.be”,”UserCertificatePath”: “<clientcert>.pfx”,”UserCertificatePassword”: “<clientcert.pfx-password>”})

Runscript Key Descriptions

  • SSID : The Wi-Fi network name to connect to.
  • securityType : Security type used by the Wi-Fi network.
  • identity : User identity/username for EAP-TLS authentication.
  • CaCertificatePath : File name of the CA (Certificate Authority) certificate.
  • domain : Domain suffix for certificate hostname matching.
  • UserCertificatePath : File name of the client certificate (.pfx file).
  • UserCertificatePassword : Password protecting the client certificate (.fx file).

Additional Notes

  • Replace <clientcert>.pfx with the actual client certificate file name.
  • Replace <clientcert.pfx-password> with the password protecting the client certificate.
  • Ensure both the CA certificate and client certificate are available under:

/data/data/com.nixwear/files

  1. Save and deploy the job to the required device(s)

Conclusion

Using RunScript in SureMDM allows administrators to automate WiFi configuration on WearOS devices securely and efficiently.

This approach simplifies enterprise WiFi deployment using certificate-based authentication and ensures devices connect automatically without manual user intervention.

Need more help? Here’s how to get help from our experts. 

CONTACT US 

Was this helpful?
YesNo
Updated on June 2026
Need Support?
Can't find the answer you're looking for?
Contact Support