How to reset a OAK4-D PRO?
The camera is new. I try to set it up as a OAK4-D. It didnt work. Now the led is blue (device is ready). How can i do a factory reset?
How to reset a OAK4-D PRO?
- Edited
Thank you for the answer. I was able to login via adb and made a factory-reset. So it was possible to configure the device manually (with agentconfd, configuration via browser was not possible). Login via network is possible, but the examples from an extern host is not able to find the device. What can be done?
Is wlan on this device (at least "ip a" returns it)?
- Edited
Thank you for the answer. But it didnt work.
Setting
export DEPTHAI_DEVICE_NAME_LIST=10.10.XX.XX
and running the following script:
#!/usr/local/bin/python3
import depthai as dai
from typing import List
print('Searching for all available devices...\n')
infos: List[dai.DeviceInfo] = dai.DeviceBootloader.getAllAvailableDevices()
if len(infos) == 0:
print("Couldn't find any available devices.")
exit(-1)
for info in infos:
state = str(info.state).split('X_LINK_')[1]
print(f"Found device '{info.name}', MxId: '{info.mxid}', State: '{state}'")
print(f"\nBooting the first available camera ({infos[0].name})...")
with dai.Device(dai.Pipeline(), infos[0], usb2Mode=False) as device:
print("Available camera sensors: ", device.getCameraSensorNames())
calib = device.readCalibration()
eeprom = calib.getEepromData()
print(f"Product name: {eeprom.productName}, board name {eeprom.boardName}")
gives the following output:
root@fdc56e272bbd:/depthai-core/examples/python# ./get_cameras.py
Searching for all available devices...
Found device '10.10.XX.XX', MxId: '2140128077', State: 'GATE_BOOTED'
Booting the first available camera (10.10.XX.XX)...
Traceback (most recent call last):
File "/depthai-core/examples/python/./get_cameras.py", line 13, in <module>
with dai.Device(dai.Pipeline(), infos[0], usb2Mode=False) as device:
RuntimeError: No available devices (1 connected, but in use)
root@fdc56e272bbd:/depthai-core/examples/python#
PS: Was trying the oakctl tutorial. got this problem:
root@f2b2a854af50:/# bash -c "$(curl -fsSL https://oakctl-releases.luxonis.com/oakctl-installer.sh)"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19.4M 100 19.4M 0 0 31.6M 0 --:--:-- --:--:-- --:--:-- 31.5M
Downloading data
[00:00:00] [████████████████████████████████████████] 6.49 MiB/6.49 MiB (0.0s)Os { code: 2, kind: NotFound, message: "No such file or directory" }
- Edited
On the camera:
~ # systemctl | grep depthai
depthai_gate.service loaded active running DepthAI Gate
On the host:
root@81615ac68cfd:/depthai-core/examples/python# python3 Camera/camera_output.py
Traceback (most recent call last):
File "/depthai-core/examples/python/Camera/camera_output.py", line 7, in <module>
with dai.Pipeline() as pipeline:
RuntimeError: No available devices
root@81615ac68cfd:/depthai-core/examples/python# export DEPTHAI_DEVICE_NAME_LIST=10.10.XX.XX
root@81615ac68cfd:/depthai-core/examples/python# python3 Camera/camera_output.py
Traceback (most recent call last):
File "/depthai-core/examples/python/Camera/camera_output.py", line 7, in <module>
with dai.Pipeline() as pipeline:
RuntimeError: No available devices (1 connected, but in use)
root@81615ac68cfd:/depthai-core/examples/python# python3 Camera/camera_output.py
Traceback (most recent call last):
File "/depthai-core/examples/python/Camera/camera_output.py", line 7, in <module>
with dai.Pipeline() as pipeline:
RuntimeError: No available devices (1 connected, but in use)
root@81615ac68cfd:/depthai-core/examples/python#
Nmap returns:
root@81615ac68cfd:/depthai-core/examples/python# nmap -sT -p- 10.10.XX.XX
Starting Nmap 7.80 ( https://nmap.org ) at 2025-02-04 11:25 UTC
Nmap scan report for 10.10.XX.XX
Host is up (0.0029s latency).
Not shown: 65528 closed ports
PORT STATE SERVICE
22/tcp open ssh
3030/tcp open arepa-cas
5000/tcp open upnp
8080/tcp open http-proxy
8765/tcp open ultraseek-http
9998/tcp open distinct32
11492/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.78 seconds
root@81615ac68cfd:/depthai-core/examples/python#
systemctl status depthai_gate returns:
[[0;1;32m●[[0m depthai_gate.service - DepthAI Gate
Loaded: loaded ([]8;;file://kalama/lib/systemd/system/depthai_gate.serviceG/lib/systemd/system/depthai_gate.service[]8;;G; e
nabled; vendor preset: enabled)
Active: [[0;1;32mactive (running)[[0m since Wed 2025-02-05 11:20:20 CET; 1min 11s ago
Main PID: 60277 (python3)
Memory: 19.6M
CGroup: /system.slice/depthai_gate.service
└─[[0;38;5;245m 60277 /usr/bin/python3 /usr/bin/depthai_gate[[0m
Feb 05 11:20:20 kalama depthai_gate[60277]: ERROR:root:[(<class 'depthai_gate.exceptions.PublicError'>, <function main.<locals>.h
andle_exception at 0x7fbac2be20>)]
Feb 05 11:20:20 kalama depthai_gate[60277]: * Serving Flask app 'depthai_gate' (lazy loading)
Feb 05 11:20:20 kalama depthai_gate[60277]: * Environment: production
Feb 05 11:20:20 kalama depthai_gate[60277]: WARNING: This is a development server. Do not use it in a production deployment.
Feb 05 11:20:20 kalama depthai_gate[60277]: Use a production WSGI server instead.
Feb 05 11:20:20 kalama depthai_gate[60277]: * Debug mode: off
Feb 05 11:20:20 kalama depthai_gate[60277]: INFO:werkzeug: * Running on all addresses (0.0.0.0)
Feb 05 11:20:20 kalama depthai_gate[60277]: WARNING: This is a development server. Do not use it in a production deployment.
Feb 05 11:20:20 kalama depthai_gate[60277]: * Running on http://127.0.0.1:11492
Feb 05 11:20:20 kalama depthai_gate[60277]: * Running on http://10.10.33.55:11492 (Press CTRL+C to quit)
isk
Maybe the netmask and/or gateway were incorrectly set during setup?
check ifconfig
and https://rvc4.docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/#OAK4%20Getting%20Started-Advanced-Set%20static%20IP
systemctl restart depthai_gate
should reset the "one in use" issue.
Thanks,
Jaka
The network mask is correct. Restarting the depthai_gate service gives the error from above.
- Edited
Hi,
thanks. This is the result:
~ # export DEPTHAI_DEVICE_NAME_LIST=10.10.XX.XX
~ # ping 10.10.XX.XX
PING 10.10.XX.XX (10.10.XX.XX): 56 data bytes64 bytes from 10.10.XX.XX: seq=0 ttl=64 time=0.037 ms
--- 10.10.XX.XX ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 0.037/0.037/0.037 ms
~ # ssh root@10.10.XX.XX
root@10.10.XX.XX's password:
~ # systemctl status depthai_gate
● depthai_gate.service - DepthAI Gate
Loaded: loaded (file://kalama/lib/systemd/system/depthai_gate.serviceG/lib/systemd/system/depthai_gate.service[]8;;G; enabled; vendor preset: enabled)
Active: mactive (running) since Fri 1970-01-02 00:57:23 CET; 55 years 1 month ago
Main PID: 843 (python3)
Memory: 272.8M
CGroup: /system.slice/depthai_gate.service
├─[[0;38;5;245m 843 /usr/bin/python3 /usr/bin/depthai_gate[[0m
└─[[0;38;5;245m 1477 /tmp/gate_fw_t35vy56i/e6cfebb5814a2095c4d882259b140e294a22a19aa56150a7dc802524725b9f90/depthai-device-rvc4[[0m
Jan 02 00:57:24 kalama depthai_gate[843]: WARNING: This is a development server. Do not use it in a production deployment.
Jan 02 00:57:24 kalama depthai_gate[843]: * Running on http://127.0.0.1:11492
Jan 02 00:57:24 kalama depthai_gate[843]: * Running on http://127.0.0.1:11492 (Press CTRL+C to quit)
Jan 02 00:57:26 kalama depthai_gate[843]: INFO:werkzeug:127.0.0.1 - - [02/Jan/1970 00:57:26] "POST /api/v1/sessions HTTP/1.1" 200 -
Jan 02 00:57:27 kalama depthai_gate[843]: INFO:werkzeug:127.0.0.1 - - [02/Jan/1970 00:57:27] "POST /api/v1/sessions/1/fwp HTTP/1.1" 200 -
Jan 02 00:57:27 kalama depthai_gate[1471]: modprobe: FATAL: Module kmb_flash not found in directory /lib/modules/5.15.144-qki-consolidate-android13-8-g5ce1e4b1db15-dirty
Jan 02 00:57:27 kalama depthai_gate[1473]: modprobe: FATAL: Module kmb_lens not found in directory /lib/modules/5.15.144-qki-consolidate-android13-8-g5ce1e4b1db15-dirty
Jan 02 00:57:27 kalama depthai_gate[1474]: modprobe: FATAL: Module kmb_cam not found in directory /lib/modules/5.15.144-qki-consolidate-android13-8-g5ce1e4b1db15-dirty
Jan 02 00:57:27 kalama depthai_gate[1475]: modprobe: FATAL: Module pwm_keembay not found in directory /lib/modules/5.15.144-qki-consolidate-android13-8-g5ce1e4b1db15-dirty
Jan 02 00:57:27 kalama depthai_gate[843]: INFO:werkzeug:127.0.0.1 - - [02/Jan/1970 00:57:27] "POST /api/v1/sessions/1/start HTTP/1.1" 200 -
root@0961345efa71:~# oakctl app list
Connecting to agent ...
No devices found.
No devices found.
Failed to connect to agent: "\"There are no available connections.\""
root@0961345efa71:~#
- Edited
Hi,
Thank you for the answer. But nothing changed. It was also after a factory reset, the device had to be configured manually ( root passwd and ip). systemctl status oak-agent gives:
systemctl status oak-agent
● oak-agent.service - OAK Agent
Loaded: loaded ([]8;;file://kalama/etc/systemd/system/oak-agent.serviceG/etc/systemd/system/oak-agent.service[]8;;G; enabled; vendor preset: ena
bled)
Active: activating (auto-restart) (Result: exit-code) since Thu 1970-01-01 00:58:03 UTC; 3s ago
Process: 1655 ExecStartPre=/usr/bin/test -f /etc/agentconfd/.setup_complete (code=exited, status=0/SUCCESS)
Process: 1656 ExecStart=/usr/bin/oak-agent /etc/oak-agent/oak-agent.toml [[0;1;31m(code=exited, status=1/FAILURE)[[0m
Main PID: 1656 (code=exited, status=1/FAILURE)
systemctl status depthai_gate
[[0;1;32m●[[0m depthai_gate.service - DepthAI Gate
Loaded: loaded ([]8;;file://kalama/lib/systemd/system/depthai_gate.serviceG/lib/systemd/system/depthai_gate.service[]8;;G; enabled; vendor prese
t: enabled)
Active: [[0;1;32mactive (running)[[0m since Thu 1970-01-01 00:57:35 UTC; 55 years 1 month ago
Main PID: 909 (python3)
Memory: 40.9M
CGroup: /system.slice/depthai_gate.service
└─[[0;38;5;245m 909 /usr/bin/python3 /usr/bin/depthai_gate[[0m
Jan 01 00:57:36 kalama depthai_gate[909]: ERROR:root:[(<class 'depthai_gate.exceptions.PublicError'>, <function main.<locals>.handle_exception at 0x7
f9a54be20>)]
Jan 01 00:57:36 kalama depthai_gate[909]: * Serving Flask app 'depthai_gate' (lazy loading)
Jan 01 00:57:36 kalama depthai_gate[909]: * Environment: production
Jan 01 00:57:36 kalama depthai_gate[909]: WARNING: This is a development server. Do not use it in a production deployment.
Jan 01 00:57:36 kalama depthai_gate[909]: Use a production WSGI server instead.
Jan 01 00:57:36 kalama depthai_gate[909]: * Debug mode: off
Jan 01 00:57:36 kalama depthai_gate[909]: INFO:werkzeug: * Running on all addresses (0.0.0.0)
Jan 01 00:57:36 kalama depthai_gate[909]: WARNING: This is a development server. Do not use it in a production deployment.
Jan 01 00:57:36 kalama depthai_gate[909]: * Running on http://127.0.0.1:11492
Jan 01 00:57:36 kalama depthai_gate[909]: * Running on http://127.0.0.1:11492 (Press CTRL+C to quit)
Switched to dhcp. Thus the ip address seems not to be correct.
- Edited
From this part of your output I suppose that the oakctl
commands did not work correctly:
root@0961345efa71:~# oakctl app listConnecting to agent ...
No devices found.
No devices found.
Failed to connect to agent: "\"There are no available connections.\""
To disable+stop the default app you do this before factory-reset:
systemctl --plain --legend=false | grep oak-agent | grep "/" | awk "{print \$NF}" | xargs -I {} systemctl stop {};
Then do the factory reset - after that, then do following oakctl
commands from your PC (I'm also pasting expected output):
# 1. Self-update oakctl
oakctl self-update
# Output:
# Already up to date
# 2. Connect to the device
oakctl connect <ip> --with-password
# Output:
# Password is not going to be saved securely!
# Use at your own risk
# > Camera password ********
# Initiating storing connection to 10.0.1.24:9998
# Connection to 10.0.1.24:9998 successfully stored
# 3. Check list of apps
oakctl app list
# Output:
# +---+--------------------------------------+---------------------------+---------+
# | E | Container Id | Identifier | Status |
# +================================================================================+
# | * | 2d272224-82e5-414d-b7a3-4cdd344fe04d | com.luxonis.default:0.4.1 | running |
# +---+--------------------------------------+---------------------------+---------+
# 4. Disable app
oakctl app disable <ID> # e.g. 2d272224-82e5-414d-b7a3-4cdd344fe04d
# Output:
# Disabling app 2d272224-82e5-414d-b7a3-4cdd344fe04d ...
# App has been disabled! App will not be started automatically on the next device boot.
# 5. Stop app
oakctl app stop <ID>
# Stopping app 2d272224-82e5-414d-b7a3-4cdd344fe04d ...
# App has been stopped!
# 6. Reboot
reboot
# 7. Check list of apps again
oakctl app list
# Output:
# +---+--------------------------------------+---------------------------+---------+
# | E | Container Id | Identifier | Status |
# +================================================================================+
# | | 2d272224-82e5-414d-b7a3-4cdd344fe04d | com.luxonis.default:0.4.1 | stopped |
# +---+--------------------------------------+---------------------------+---------+
Then - to be sure - try this:
systemctl restart agentconfd
systemctl restart oak-agent
Now - wait for a while and send us ouput from this two commands if something is still wrong:
oakctl device info
oakctl list
Then you can proceed to run your app.
Thank you for the answer. But after
systemctl --plain --legend=false | grep oak-agent | grep "/" | awk "{print \$NF}" | xargs -I {} systemctl stop {};
and factory reset, nothing changed.
I tried to do a full os recovery (https://rvc4.docs.luxonis.com/software/depthai-components/luxonis-os/
). I got confused
with the sentence: "You also need to replace the [DEVICE_ID] with the correct xml file for your device".
- Where to replace it?
- Where get the code for a OAK4-D PRO AF CR1?
Thank you for the answer. But after
systemctl --plain --legend=false | grep oak-agent | grep "/" | awk "{print \$NF}" | xargs -I {} systemctl stop {};
and factory reset, nothing changed.
Please try to proceed with all the steps described here: https://discuss.luxonis.com/d/5765-how-to-reset-a-oak4-d-pro/14. The issue you're facing is not a bug that you can solve by a factory reset. You need to:
- Do the factory reset - that brings you to a common entry state
- Then - do all the other steps I described above to stop the default app.
- If you have still some issues - try to run
oakctl device info
andoakctl list
and paste here the output.
- Edited
Sorry, what was wrong here?
isk@wolgang:~$ adb shell
/ $ systemctl --plain --legend=false | grep oak-agent | grep "/" | awk "{print \$NF}" | xargs -I {} systemctl stop {};
/ $ agentconfd factory-reset
isk@wolgang:~$ oakctl self-update
Already up to date
isk@wolgang:~$ oakctl connect 10.10.2.108 --with-password
Agent not running
Initiating storing connection to 10.10.2.108:9998
Agent not running
Connection to 10.10.2.108:9998 successfully stored
isk@wolgang:~$ ping 10.10.2.108
PING 10.10.2.108 (10.10.2.108) 56(84) bytes of data.
64 bytes from 10.10.2.108: icmp_seq=1 ttl=63 time=6.27 ms
64 bytes from 10.10.2.108: icmp_seq=2 ttl=63 time=3.87 ms
^C
--- 10.10.2.108 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 3.870/5.071/6.272/1.201 ms
isk@wolgang:~$ adb shell
/ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether ce:8e:47:6f:b5:f0 brd ff:ff:ff:ff:ff:ff
3: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
link/ether ea:a0:52:25:af:cc brd ff:ff:ff:ff:ff:ff
4: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
link/ether ee:34:33:ac:ed:4f brd ff:ff:ff:ff:ff:ff
5: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
6: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default qlen 1000
link/gre 0.0.0.0 brd 0.0.0.0
7: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
8: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/ipip 0.0.0.0 brd 0.0.0.0
10: ip6_vti0@NONE: <NOARP> mtu 1364 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
12: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd ::
13: ip6gre0@NONE: <NOARP> mtu 1448 qdisc noop state DOWN group default qlen 1000
link/gre6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
14: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 0e:74:bf:72:c1:94 brd ff:ff:ff:ff:ff:ff
15: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 52:fe:c6:3b:a3:48 brd ff:ff:ff:ff:ff:ff
16: hwsim0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ieee802.11/radiotap 12:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
17: enP1p1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 44:a9:2c:3f:94:0c brd ff:ff:ff:ff:ff:ff
inet 10.10.2.108/16 brd 10.10.255.255 scope global noprefixroute dynamic enP1p1s0
valid_lft 3966sec preferred_lft 3966sec
inet6 fe80::fdd5:ef7f:7fa5:dfe3/64 scope link noprefixroute
valid_lft forever preferred_lft forever
18: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,PROMISC,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 82:57:a7:38:54:ef brd ff:ff:ff:ff:ff:ff
inet 192.168.225.1/24 brd 192.168.225.255 scope global bridge0
valid_lft forever preferred_lft forever
inet6 fe80::8057:a7ff:fe35:51ec/64 scope link
Here the outputs of the commands you requested:
`
isk@wolgang:~$ oakctl device info
Connecting to agent ...
Failed to connect to agent: StreamError(Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })
isk@wolgang:~$ oakctl list
No devices found.
`
- Edited
That's weird - try to send this additional info:
cat /etc/os-release
systemctl status oak-agent
- ifactive
, then:- at least part of
journalctl -xeu oak-agent
(make sure you don't share sensitive data) journalctl -u oak-agent | grep -e "ERROR"
might show something to us (although some error lines are expected)
- at least part of
systemctl status depthai-gate
- Does the camera have access to the public network? (
ping google.com
) - Is the LED blue (not blinking) after the factory reset?
- Edited
`
/ $ cat /etc/os-release
ID=luxonisos-rvc4
NAME="Luxonis OS RVC4"
VERSION="1.3.0"
VERSION_ID=r851-1.3.0
PRETTY_NAME="QTI Linux robotics platform distro targeting performance builds. Luxonis OS RVC4 1.3.0"
IMAGE_REV="380402180d3b54c460aaa36b0ba5d4c3a930a8f6"
MANIFEST_REV_REV="LE.PRODUCT.6.0.r1-11900-9x07.0"
BUILD_ID="20250128180200"
/ $ ping google.com
PING google.com (142.250.186.174): 56 data bytes
ping: permission denied (are you root?)
/ $ agentconfd setup -p caracol
Success!
isk@wolgang:~$ ssh root@10.10.2.108
The authenticity of host '10.10.2.108 (10.10.2.108)' can't be established.
ED25519 key fingerprint is SHA256:cN6l3QfurCQniLN7Lg7VUpDabVxz5FN2yk0sUYjRQFU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.10.2.108' (ED25519) to the list of known hosts.
root@10.10.2.108's password:
~ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=59 time=13.695 ms
64 bytes from 8.8.8.8: seq=1 ttl=59 time=15.090 ms
C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 13.695/14.392/15.090 ms
`
After factory reset the led is blinking blue. It changes when something is configured (setting root password).
- Edited
- Best Answerset by jakaskerl
I see - we're moving forward!
Once the LED is blinking blue, try the configuration using https://setup.luxonis.com/ (use local setup) instead of agentconfd setup
. Then use oakctl
to stop the default app.
(If you don't have this link already - here is more information about getting started: https://rvc4.docs.luxonis.com/hardware/platform/deploy/oak4-deployment-guide/ )