AFE R750 Development

From ESS-WIKI
Revision as of 09:01, 1 December 2025 by Ray.su (talk | contribs)
Jump to: navigation, search

Attention

Account & Password

Account number

ubuntu

In device used "sudo" or "sudo su" to root. Password required.

ubuntu

Tools

750agx-1.png

Test Command

JP6.2

CAN

Hardware setting for AGX Orin
750-can-1.png
750-can-2.png

<Receive> In terminal, run below command

$ sudo su
# modprobe can
# modprobe can-dev
# modprobe mttcan
# ip link set can0 type can bitrate 500000
# ip link set can0 up
# candump can0

<Transmit> In other terminal, run below command

$ sudo su
# modprobe can
# modprobe can-dev
# modprobe mttcan
# ip link set can1 type can bitrate 500000
# ip link set can1 up
# cansend can1 123#abcdabcd

WatchDog

$ sudo su
# sync; sleep 2; sync; echo c > /proc/sysrq-trigger

TPM

Pre-install TPM-tools

$ sudo apt install --yes tpm2-tools

(1)產生randon code

$ sudo su
root@linux:/home/ubuntu# tpm2_getrandom --hex 20

(2) 對指定檔案 msg.dat 加密

root@linux:/home/ubuntu# tpm2_createprimary -C p -c platform_primary.ctx
root@linux:/home/ubuntu# tpm2_create -C platform_primary.ctx -G rsa2048 -u key.pub -r key.priv
root@linux:/home/ubuntu# tpm2_load -C platform_primary.ctx -u key.pub -r key.priv -c key.ctx
root@linux:/home/ubuntu# echo "my test" >msg.dat
root@linux:/home/ubuntu# tpm2_rsaencrypt -c key.ctx -o msg.enc msg.dat
root@linux:/home/ubuntu# cat msg.enc
root@linux:/home/ubuntu# tpm2_rsadecrypt -c key.ctx -o msg.ptext msg.enc
root@linux:/home/ubuntu# cat msg.ptext 
root@linux:/home/ubuntu# cat msg.dat

(3) 將資料儲存至 tpm 內存

root@linux:/home/ubuntu# tpm2_nvdefine -Q 0x1500031 -C o -s 32 -a "ownerread|policywrite|ownerwrite"
root@linux:/home/ubuntu# echo "write_tpm_adv" >  adv.data
root@linux:/home/ubuntu# tpm2_nvwrite -Q 0x1500031 -C o -i adv.data
root@linux:/home/ubuntu# tpm2_nvread -Q 0x1500031 -C o -s 32 -o read.data
root@linux:/home/ubuntu# cat read.data

(4) 確認已經寫入儲存區域 

root@linux:/home/ubuntu# tpm2_nvreadpublic > nv.out
root@linux:/home/ubuntu# cat nv.out

Error

ERROR: Esys_NV_DefineSpace(0x14C) - tpm:error(2.0): NV Index or persistent object already defined
ERROR: Failed to create NV index 0x1500031.

fixed

root@linux:/home/ubuntu# tpm2_nvundefine 0x1500031

RTC

1. Please remove all internet.

$ sudo timedatectl

DIO GPIO

750 dio gpio.jpg
750 dio gpio 1.jpg

$ gpioinfo

GPI_1~GPI_8 (gpio300~gpio307) Can only be set input

$ gpioget gpiochip2 0

GPO_1~GPO_8(gpio308~gpio315) Can only be set output

$ gpioset gpiochip2 8=1

UART

AGX-Orin COM1: ttyTHS1 COM2: ttyTHS2
750-com-1.png

Switch to 232, 422, 485

Select the mode and refer to the table
COM1 :
750-com-2.png
COM2 :
750-com-3.png

RS-232

COM1_SW1 OFF-OFF-OFF-OFF

$ sudo su
# stty -F /dev/ttyTHS1 speed 115200 raw -echo
# cat /dev/ttyTHS1 &
# echo "1234" > /dev/ttyTHS1
RS-422

<Receive> In terminal, run below command
COM1_SW1 ON-OFF-ON-OFF

$ sudo su
# stty -F /dev/ttyTHS1 speed 115200
# cat /dev/ttyTHS1 &
# echo "1234" > /dev/ttyTHS1

<Transmit> In other terminal, run below command
COM2_SW1 ON-OFF-ON-OFF

$ sudo su
# stty -F /dev/ttyTHS2 speed 115200
# cat /dev/ttyTHS2 &
# echo "1234" > /dev/ttyTHS2
RS-485

<Receive> In terminal, run below command
COM1_SW1 ON-ON-ON-ON

$ sudo su
# stty -F /dev/ttyTHS1 speed 115200 raw -echo
# cat /dev/ttyTHS1 &
# echo "1234" > /dev/ttyTHS1

<Transmit> In other terminal, run below command
COM2_SW1 ON-ON-ON-OFF

$ sudo su
# stty -F /dev/ttyTHS2 speed 115200 raw -echo
# cat /dev/ttyTHS2 &
# echo "1234" > /dev/ttyTHS2

IMU

BMI088

Please reference : https://docs.nvidia.com/jetson/archives/r36.4/DeveloperGuide/SD/Kernel/Bmi088ImuIioDriver.html?highlight=bmi088

AIW Tool

EWM-W179M201E

First need to install WIFI module

$ cd /usr/local/bin/EWM-W179
$ sudo su
# insmod rtk_btusb.ko
# insmod 8852be.ko
AIW-170

First need to install WIFI module

$ cd /usr/local/bin/AIW-170
$ sudo su
# insmod btbcm.ko
# insmod btintel.ko
# insmod btqca.ko
# insmod btrtl.ko
# insmod btusb.ko
# modprobe cfg80211
# insmod wlan_cnss_core_pcie.ko
# insmod wlan.ko

GMSL

oToBrite Camera

Camera type : oToCAM222-C120M
HW setting : Camera link to GMSL port
AGX Orin :
750agx-gmsl.png
Orin Nx :
750-gmsl.png
Please install camera driver first
Attention : can only be executed once command to setup camera
Then system will reboot

$ cd /usr/local/bin/otocam

Choose your module

$ sudo ./set_otocam_agxorin_64g.sh
$ sudo ./set_otocam_agxorin_32g.sh
$ sudo ./set_otocam_orinnx.sh

Insmod driver

$ cd /home/ubuntu
$ sudo ./insmod-otocam.sh

Check Video channel "video0"...

$ ls /dev/video*

Preview command

$ cd /home/ubuntu
$ sudo ./enable-otocamera.sh


Orbbec Camera

Camera type : Orbbec Gemini 335Lg
Model : G40055-270
HW setting : Camera link to GMSL port
AGX Orin :
Orbcam agx.png
Orin Nx :
Orbcam nx.png
Please install camera driver first

$ cd /usr/local/bin/otocam

Choose your module

$ sudo ./set_gemini335lg_agxorin_64g_32g.sh
$ sudo ./set_gemini335lg_orinnx_16g.sh

Reboot

$ sudo reboot

Check Video channel "video0"...

$ ls /dev/video*

Preview command

$ gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw,width=1280,height=720,framerate=30/1' ! autovideosink

Reference

AFE-R750