How do I view Device Logs?

View internal device logs, to troubleshoot your device.

To view your device logs, you can use the Device Manager or do the same using an API request to the device.

Method 1 - Device Manager

Step 1: Open NexStem Device Manager, click on your registered devices on the left navigation bar.

Step 2: Select your device id from the drop down, check the enable logging button and click on Connect Device.

Step 3: On a successful connect, click on the View Device Logs button.

Method 2 - API Request

Step 1: Open a terminal and type ifconfig(on macOS and Linux)/ipconfig(on Windows), and get your local IP address.

Step 2: Make the following API request using cURL or Postman-

curl --location --request POST 'DEVICEID.local/enable_logging' \
--header 'Content-Type: application/json' \
--data-raw '{
    "logging": "enable",
  "ip": "YOUR LOCAL IP",
    "port": 7878
}'

Remember to replace the DEVICE ID and YOUR LOCAL IP in the above request.

Step 3: Create a new python file, and paste the following code snippet in the same.

import socket
import datetime

UDP_IP = "0.0.0.0"
UDP_PORT = 7878

sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
sock.bind( (UDP_IP, UDP_PORT) )

print("+============================+")
print("|  NEXSTEM UDP Logging Server  |")
print("+============================+")
print("")

while True:
    data, addr = sock.recvfrom(1024)
    print(datetime.datetime.now(), data.decode(errors='replace'), end='')

Step 4: Run the python script and you should start seeing the device logs.

If both the methods fail, or you don't receive a success message from the API Request, first make sure you are in the same network as the device (i.e. you are connected to the same router to which you configured the device to connect to).

If it still fails, reach out to us by clicking on the Contact Us button on the top.