星期二, 5月 21, 2019

TX2 GPIO





  1. sudo  cat /sys/kernel/debug/gpio
  2. echo 314 > /sys/class/gpio/export
  3. echo in >direction

星期二, 5月 14, 2019

Cuda+Cudnn + open3.4+contrib3.4 + camke + VS2017 +Win10


Cuda+ Cudnn

  1. https://dotblogs.com.tw/cylcode/2018/09/20/163005
  2. CUDA下載:https://developer.nvidia.com/cuda-toolkit-archive
  3. cuDNN下載:https://developer.nvidia.com/rdp/cudnn-download
  4. visual studio下載https://my.visualstudio.com/Downloads/Featured
  5. env Path
  6. C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
    D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
  7. nvcc -V


opencv3.4+contrib3.4+cmake+VS2017+win10

Prepare:

  1. opencv3.4源码https://github.com/opencv/opencv/archive/3.4.0.zip 
  2. opencv_contrib3.4源码https://github.com/opencv/opencv_contrib/archive/3.4.0.zip 
  3. cmake https://cmake.org/download/ 
  4. visual studio 2017 
  5. win10
Cmake:
  • Configure check 
    • NVIDIA CUDA: YES (ver 10.1, CUFFT CUBLAS)
  • Generate
  • open project (Current Generator: Visual Studio 15 2017)
    • 用這個




星期五, 5月 10, 2019

Setup static network on the Jetson TX2

Setup static network on the Jetson TX2

sudo ifdown eth0
/etc/network/interfaces.d/eth0
sudo ifup eth0

mosquitto MQTT





  1. sudo apt-get install mosquitto mosquitto-clients
  2. service mosquitto status
    1. /etc/mosquitto/mosquitto.conf


星期三, 5月 01, 2019

Xen server add new HBA storage


Xen server add new HBA storage 

Show storage device ID
  1. ll /dev/disk/by-id
  2. scsi-SATA_TOSHIBA_DT01ACA_395JNRRFS -> ../../sdc
  3.  scsi-SATA_TOSHIBA_MG03ACA_26P4KK76F -> ../../sdb
  4. Host-T5600-S0-103   6688a26f-1746-419d-b49a-157bb85e4418


create new SR
  1.  xe sr-create content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_TOSHIBA_DT01ACA_395JNRRFS host-uuid=6688a26f-1746-419d-b49a-157bb85e4418 name-label="96new_storage" shared=false type=ext

星期五, 4月 26, 2019

raw camera image


pybind and python-opencv-gstreamer-examples

C++ 回傳mat 給Python





gst-launch-1.0



gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, format=YUY2, width=1280, height=800'
, pixel-aspect-ratio=1/1, interlace-mode=progressive, framerate=15/1' ! xvimagesink -ev




TX2 onboard ok
 gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),width=640, height=480, framerate=30/1, format=NV12' ! nvvidconv flip-method=2 ! nvegltransform ! nveglglessink -e



  1. custom camera driver with gstreamer v4l2src
    1. https://devtalk.nvidia.com/default/topic/1038169/jetson-tx1/custom-camera-driver-with-gstreamer-v4l2src/
  2. How to use Gstreamer1.0 V4L2src to capture on-board ov5693 sensor
    1. https://devtalk.nvidia.com/default/topic/929493/jetson-tx1/how-to-use-gstreamer1-0-v4l2src-to-capture-on-board-ov5693-sensor/

星期四, 4月 25, 2019

python call C

https://www.zhihu.com/question/23003213

如何实现 C/C++ 与 Python 的通信?

GST rtsp server





  1. sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev
  2. test-launch.c @ https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c
  3. gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)
onboard:
  1. ./test-launch "videotestsrc ! omxh265enc ! rtph265pay name=pay0 pt=96"
usb:
  1. ./test-launch "v4l2src device=/dev/video1 ! video/x-raw,format=YUY2 ! nvvidconv ! video/x-raw(memory:NVMM),width=2560,height=720,format=I420 ! omxh265enc ! rtph265pay name=pay0 pt=96"



Reference: