ZED Mini not detected on power up

Hi,
When I boot my jetson agx xavier it’s not detecting zed mini camera but after removing the camera and plugging it back in, it starts to detect.

lsub after boot:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter Bus 001 Device 002: ID 2b03:f681 STEREOLABS ZED-M Hid Device Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

After replugging:
Bus 002 Device 002: ID 2b03:f682 Technologies, Inc. ZED-M Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter Bus 001 Device 004: ID 2b03:f681 STEREOLABS ZED-M Hid Device Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Jetson Agx Xavier (JetPack 5.0.2)
Zed Mini (SDK 3.8.1)
Using Usb C port on xavier
Autoboot on power jumper installed.

Hi,
It looks like the enumeration fails in booting. A possible solution is to disable/enable the regulator to trigger re-enumeration after booting. Please refer to
Switch on and off usb ports programmatically on AGX - #5 by DaneLLL

Downloaded:
https://forums.developer.nvidia.com/uploads/short-url/aSZujZz9LQUtN3aS8fuZnByxYtm.zip
And followed the steps:

Copy realtek_hub_power_cycle.c to Jetson
$ sudo apt-get install libusb-1.0-0-dev
$ gcc -o power_cycle realtek_hub_power_cycle.c -lusb-1.0
$ sudo ./power_cycle

But getting an error :

[error]:open device 0bda:5411 fail.

Hi,
realtek_hub_power_cycle.c is for Jetson Nano A02 developer kit. For Xavier, please run the command like:

root@nvidia-desktop:/sys/class/regulator/regulator.13# echo disabled > state
root@nvidia-desktop:/sys/class/regulator/regulator.13# echo enabled > state

Yo would need to change to correct regulator.

How can I get permission to edit this file ? I tried with chmod and chown but no luck.

When I type:
/sys/class/regulator/regulator.13# echo disabled > state
I get
--bash: /sys/class/regulator/regulator.13#: Permission denied

Hi,
This probably is same as this post:
ZED Camera not detected on power up - #12 by G.Foyle

There is a quick solution. May give it a try.

As stated in zed API, reboot function doesn’t work with zed mini

def reboot	(	int 	sn,
bool  	fullReboot = True 
)	

Note This function only works for ZED2 and ZED2i cameras.
https://www.stereolabs.com/docs/api/python/classpyzed_1_1sl_1_1Camera.html#a3b8ebb0f00ca71636407170780720281

Hi,
It still not working can you help me out ? @DaneLLL

Hi,
There are two type-C ports J512 and J513. Please try both. And can try the type-A port with type-C to A adapter.

Since the USB ports on Xavier developer kit are performed compliance test, it is more like an issue specific to the device. Please check if it is possible to power off/on the device after booting. Looks like the vendor has designed fullReboot function but it cannot be applied to the device. not sure if there is other way of doing it.

I contacted the vendor they said the only way is The USB power trick. But I can’t disable/enable the regulator on agx xavie is there any documentation abouth it ? As i mentioned above:

When I type:
/sys/class/regulator/regulator.13# echo disabled > state
I get
--bash: /sys/class/regulator/regulator.13#: Permission denied

You would use sudo for elevated privileges:

sudo su

cd /sys/class/regulator/regulator.13
echo disabled > state
cat state
echo enabled > state
cat state

exit

I also tried with sudo su it doesn’t help.

I wrote following bash script and named regulator.sh:

#!/usr/bin/env bash

for i in {0..30}
do
        echo "regulator:" $i
        cd /sys/class/regulator/regulator.$i
        echo disabled > state
        cat state
        echo enabled > state
        cat state
        cd ..
done
exit

Than I run it with following commands

sudo su
bash regulator.sh

Output:

regulator: 0
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 1
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 2
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 3
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 4
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 5
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 6
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 7
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 8
regulator.sh: line 7: state: Permission denied
cat: state: No such file or directory
regulator.sh: line 9: state: Permission denied
cat: state: No such file or directory
regulator: 9
enabled
enabled
regulator: 10
enabled
enabled
regulator: 11
enabled
enabled
regulator: 12
enabled
enabled
regulator: 13
enabled
enabled
regulator: 14
enabled
enabled
regulator: 15
enabled
enabled
regulator: 16
enabled
enabled
regulator: 17
enabled
enabled
regulator: 18
enabled
enabled
regulator: 19
enabled
enabled
regulator: 20
enabled
enabled
regulator: 21
enabled
enabled
regulator: 22
enabled
enabled
regulator: 23
disabled
enabled
regulator: 24
disabled
enabled
regulator: 25
disabled
enabled
regulator: 26
disabled
enabled
regulator: 27
disabled
enabled
regulator: 28
disabled
enabled
regulator: 29
disabled
enabled
regulator: 30
disabled
enabled

Permission denied for regulator 0 to 9
State not changing to disabled for regulator 9 to 23
Only works properly for regulator 23 to 30

What should i do? @DaneLLL @Honey_Patouceul

Sorry my AGX Xavier is running an older JP-4.6 version and with that I can confirm that regulator.13 acknowledges the disable state and I then lost USB keyboard and mouse.

For JP-5.0.2, this may have changed. Sorry I’m unable to try this case, yet. Someone else may better advise.

Hi,
The guidance is for type-A port and not applicable to type-C ports. Are you able to try the type-A port? See if you have type A to C adapter and can give it a try.

It works with type- A port.

But i can’t use Type-A port for my application it’is inaccessible due to tight space (Jetson mouned on a small robot car).

Any other suggestions ? @DaneLLL

Hi,
We are checking it. The type-C ports are designed with PD controller and may not be able to manually disable/enable it. Would need to check with our teams.

Hi,
Please connect the device to J512 port and try the command:

root@tegra-ubuntu:/sys/devices/platform/3520000.xusb_padctl/usb2-0/usb_role/usb2-0-role-switch# echo none > role
root@tegra-ubuntu:/sys/devices/platform/3520000.xusb_padctl/usb2-0/usb_role/usb2-0-role-switch# echo host > role

See if the device can be re-enumerated to SuperSpeed.

Is there a way for testing it via J513 Port? I have to disassemble the robot for accessing J512 port.