Software Stack
DepthAI
  • DepthAI Components
    • AprilTags
    • Benchmark
    • Camera
    • Calibration
    • DetectionNetwork
    • EdgeDetector
    • Events
    • FeatureTracker
    • HostNodes
    • ImageAlign
    • ImageManip
    • IMU
    • Misc
    • Model Zoo
    • NeuralNetwork
    • RecordReplay
    • RGBD
    • Script
    • SpatialDetectionNetwork
    • SpatialLocationCalculator
    • StereoDepth
    • Sync
    • SystemLogger
    • VideoEncoder
    • Visualizer
    • Warp
    • RVC2-specific
  • Advanced Tutorials
  • API Reference
  • Tools

ON THIS PAGE

  • Device Information
  • Code
  • Output example
  • RVC2
  • RVC4

Device Information

This example demonstrates how to retrieve and display information about connected DepthAI devices, including their camera sensors and internal data such as revision number and product name.This example requires the DepthAI v3 API, see installation instructions.

Code

Python
1import depthai as dai
2from typing import List
3
4print('Searching for all available devices...\n')
5infos: List[dai.DeviceInfo] = dai.Device.getAllAvailableDevices()
6
7if len(infos) == 0:
8    print("Couldn't find any available devices.")
9    exit(-1)
10
11
12for info in infos:
13    # Converts enum eg. 'XLinkDeviceState.X_LINK_UNBOOTED' to 'UNBOOTED'
14    state = str(info.state).split('X_LINK_')[1]
15
16    print(f"Found device '{info.name}', DeviceID: '{info.deviceId}', State: '{state}'")
17
18
19# Connect to a specific device. We will just take the first one
20print(f"\nBooting the first available camera ({infos[0].name})...")
21with dai.Device(infos[0]) as device:
22    print("Available camera sensors: ", device.getCameraSensorNames())
23    calib = device.readCalibration()
24    eeprom = calib.getEepromData()
25    
26    print(f"Product name: {eeprom.productName}, board name {eeprom.boardName}")
27    print(f"Board revision: {eeprom.boardRev}")

Output example

RVC2

Command Line
1Searching for all available devices...
2
3Found device '1.1', DeviceID: '18443010211F850E00', State: 'BOOTLOADER'
4
5Booting the first available camera (1.1)...
6Available camera sensors:  {<CameraBoardSocket.CAM_C: 2>: 'OV9282', <CameraBoardSocket.CAM_A: 0>: 'OV9782', <CameraBoardSocket.CAM_B: 1>: 'OV9282'}
7Product name: OAK-D-PRO-W-97, board name DM9098
8Board revision: R6M2E6

RVC4

Command Line
1Searching for all available devices...
2
3Found device '10.12.118.95', DeviceID: '3604808376', State: 'GATE'
4
5Booting the first available camera (10.12.118.95)...
6Available camera sensors:  {<CameraBoardSocket.CAM_C: 2>: 'OV9282', <CameraBoardSocket.CAM_B: 1>: 'OV9282', <CameraBoardSocket.CAM_A: 0>: 'IMX586'}
7Product name: OAK4-D, board name NG9498-ASM
8Board revision: R1