How to get list of azsphere device wifi show-status?

Madanraj A 20 Reputation points
2023-01-12T12:47:00.4966667+00:00

I am getting for single device for below command

azsphere device wifi show-status

SSID : xxxxxxx

Configuration state : enabled

Connection state : connected

Security state : psk

Frequency : 2xxx

Mode : station

Key management : WPA2-PSK

WPA State : COMPLETED

IP Address : 195.xxxxxxx

MAC Address : 26:xxxxxxxxx

Command completed successfully in 00:00:0xxxxxxx.

How to get for list of multiple device mac ?

Azure Sphere
Azure Sphere
An Azure internet of things security solution including hardware, operating system, and cloud components.
157 questions
Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
384 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,131 questions
{count} votes

2 answers

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,621 Reputation points
    2023-01-16T18:46:27.17+00:00

    The command azsphere device wifi show-status is meant to show the status of the Wi-Fi interface on the attached device.

    Even if there are multiple devices connected to the Windows machine, the command line enforces you to specify the device ID, IP address or the Local Connection ID of the attached device. Please refer the below image for more details on the parameters of the command.

    User's image

    Here is the link to the official documentation on Azure Sphere CLI command interface. Even if you have multiple connected devices, the only way to achieve what you are looking for, with the current implementation, is to run the command against each connected device individually.

    Please let us know if the above shared information answers your question.


  2. QuantumCache 20,031 Reputation points
    2023-03-10T01:21:50.2766667+00:00

    Hello,

    Adding few more additional info on this topic,

    To get the list of Wi-Fi networks that an Azure Sphere device can see, you can use the azsphere device wifi show-status command. This command shows the device's Wi-Fi status, including the list of visible Wi-Fi networks.

    To use this command, you will need to have the Azure Sphere SDK installed on your development machine and have the device connected to your computer via USB. Here are the steps to get the list of Wi-Fi networks:

    1. Open a command prompt or terminal window on your development machine.
    2. Connect to the Azure Sphere device using the following command:
        azsphere device show-attached
        ```
        
        
        This will display information about the attached device, including its ID and IP address.
    1. Run the following command to get the device's Wi-Fi status:
        
        
    
    azsphere device wifi show-status
    ```
    
    
    This will display the device's current Wi-Fi status, including the list of visible Wi-Fi networks.
    

    If the device is not connected to Wi-Fi, the azsphere device wifi show-status command will not return any results.

    There could be several reasons why you are facing issues when using device ID instead of connection path for multiple devices in Azure. Here are some potential reasons and troubleshooting steps:

    1. Device ID is not unique: Ensure that each device ID is unique within the scope of the IoT hub. If multiple devices have the same device ID, it can cause issues when trying to connect and communicate with them.
    2. Incorrect device ID format: Ensure that you are using the correct format for the device ID. Device IDs in Azure IoT Hub must be alphanumeric and can only contain the characters "-", ".", "_", and ":".
    3. Network connectivity issues: Ensure that all devices have a stable network connection and are able to connect to the Azure IoT Hub. Check for any network issues, such as firewall restrictions or blocked ports, that may be preventing devices from connecting.
    4. Authentication issues: Ensure that devices are properly authenticated and authorized to connect to the IoT hub. Check that the device connection string contains the correct credentials and permissions.
    5. Code issues: Review your code to ensure that it is correctly handling device connections and message routing for multiple devices. Check for any bugs or errors that may be causing issues.
    0 comments No comments