Linux/Ubuntu2022. 4. 25. 19:13

minicom 으로 포트를 열고 stty로 확인하니 아래의 플래그들이 설정된다.

근데 포트를 잘 못열었나.. xon/xoff에 대한건 안보이네..


ignbrk ignore break characters
-brkint breaks cause an interrupt signal
-icrnl translate carriage return to newline
-imaxbel beep and do not flush a full input buffer on a character
-opost postprocess output
-onlcr translate newline to carriage return-newline
-isig enable interrupt, quit, and suspend special characters
-icanon enable erase, kill, werase, and rprnt special characters
-iexten enable non-POSIX special characters
-echo echo input characters
-echoe same as [-]crterase // echo erase characters as backspace-space-backspace
-echok echo a newline after a kill character
-echoctl same as [-]ctlecho // echo control characters in hat notation ('^c')
-echoke same as [-]crtkill // kill all line by obeying the echoctl and echok settings



[링크 : https://linux.die.net/man/1/stty]

'Linux > Ubuntu' 카테고리의 다른 글

cpuid  (0) 2022.10.17
ubuntu 22.04 LTS  (0) 2022.04.27
sudo -k -K  (0) 2022.04.25
ubuntu unity tweak  (0) 2022.04.04
This kernel does not support RARP.  (0) 2022.03.08
Posted by 구차니

쓸일이 생기지 않길..

 

[링크 : https://github.com/rscada/libmodbus]

[링크 : https://hpoption.tistory.com/893]

'프로그램 사용 > libmodbus' 카테고리의 다른 글

libmodbus 예제 프로그램  (0) 2022.05.04
libmodbus tcp 예제  (0) 2022.05.04
libmodbus  (0) 2022.05.03
modbus tcp 테스트 툴  (0) 2022.05.03
modbus 프로토콜  (0) 2015.09.16
Posted by 구차니
Linux/Ubuntu2022. 4. 25. 18:55

sudo의 사용가능 시간을 리셋하는 옵션

-K' The -K (sure kill) option is like -k except that it removes the user's cached credentials entirely and may not be used in conjunction with a command or other option. This option does not require a password. Not all security policies support credential caching.

-k [command]
When used alone, the -k (kill) option to sudo invalidates the user's cached credentialsThe next time sudo is run a password will be required. This option does not require a password and was added to allow a user to revoke sudo permissions from a .logout file. Not all security policies support credential caching.

When used in conjunction with a command or an option that may require a password, the -k option will cause sudo to ignore the user's cached credentials. As a result, sudo will prompt for a password (if one is required by the security policy) and will not update the user's cached credentials.

[링크 : https://linux.die.net/man/8/sudo]

[링크 : https://askubuntu.com/questions/14948/how-to-cancel-the-currently-applied-remaining-sudo-time-out]

 

+ 22.05.03

아래 경로 가니 파일이 존재하는데 -k 로는 파일이 사라지지 않고 -K로는 파일이 사라진다.

/run/sudo/ts/<username>

[링크 : https://www.linux.org/threads/cache-timestamp-file.25274/]

 

sudo 도움말을 보면 -K는 파일을 삭제하고, -k는 타임스탬프 파일을 무효화 한다는데 내용이 변화되는것 같진 않고..

  -K, --remove-timestamp        remove timestamp file completely
  -k, --reset-timestamp         invalidate timestamp file

 

struct timestamp_entry {
unsigned short version;     /* version number /
unsigned short size;        / entry size /
unsigned short type;        / TS_GLOBAL, TS_TTY, TS_PPID /
unsigned short flags;       / TS_DISABLED, TS_ANYUID /
uid_t auth_uid;             / uid to authenticate as /
pid_t sid;                  / session ID associated with tty/ppid /
struct timespec start_time; / session/ppid start time /
struct timespec ts;         / time stamp (CLOCK_MONOTONIC) /
union {
dev_t ttydev;           / tty device number /
pid_t ppid;             / parent pid */
} u;
};

[링크 : https://www.sudo.ws/docs/man/1.8.25/sudoers_timestamp.man/]

 

먼가 딱 하나.. 0에서 1로 바뀌었네

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 22.04 LTS  (0) 2022.04.27
minicom stty  (0) 2022.04.25
ubuntu unity tweak  (0) 2022.04.04
This kernel does not support RARP.  (0) 2022.03.08
우분투 크롬, 구글 로그인이 안됨  (0) 2022.02.14
Posted by 구차니

ssh를 통해 원격명령어 실행하려는데 watch의 경우 실행이 되지 않아 찾아보니

-t 옵션을 주어 pseudo-tty 할당하도록 하면 실행이 된다.

 

ssh -t

[링크 : https://stackoverflow.com/questions/47936491/using-watch-with-ssh]

Posted by 구차니

호스트의 키가 변경되면 ssh 로그인시 경고를 날리는데

-y 같이 해당 옵션을 무조건 yes로 무시하는게 없나 찾아보는 중

$ ssh 192.168.53.144
The authenticity of host '192.168.53.144 (192.168.53.144)' can't be established.
ECDSA key fingerprint is SHA256:
Are you sure you want to continue connecting (yes/no)?

 

개인적으로는 옵션으로 처리가능한게 깔끔해서 좋음.

$ ssh 192.168.53.144 -o StrictHostKeyChecking=no
Warning: Permanently added '192.168.53.144' (ECDSA) to the list of known hosts.
pi@192.168.53.144's password:

[링크 : https://info-lab.tistory.com/254]

Posted by 구차니
개소리 왈왈/블로그2022. 4. 25. 12:35

내가 진짜 돈을 내고 한게 아니면 소득공제 안된대서 시들해졌지만

그럼에도 불구하고 일주일에 한번 클릭으로 몇백원 모아두고

내 돈 안쓰고 기분내는 기부다 보니 꾸준히 하게 되네

 

'개소리 왈왈 > 블로그' 카테고리의 다른 글

근 한달만의 블로그 정리  (2) 2022.07.21
게을러졌어...  (0) 2022.05.16
한달치 글 정리  (0) 2022.03.12
잘가 내 위키  (3) 2022.03.02
홈페이지 호스팅.. 버릴까  (0) 2022.02.27
Posted by 구차니
하드웨어/Storage2022. 4. 25. 10:26

무분이 무분이 되어 돌아온 녀석.

그러고 보니 1.8인치 하드는 처음은 아닌건가..(hp 2710p)

 

성능 사양
순차 읽기(최대) 500 MB/s
순차 쓰기(최대) 260 MB/s

내구성 평가(수명 기록) 140 TBW

패키지 사양
무게 37 grams ± 2 grams
폼 팩터 1.8"
인터페이스 SATA 3.0 6Gb/S

[링크 : https://ark.intel.com/content/www/kr/ko/ark/products/75681/intel-ssd-dc-s3500-series-240gb-1-8in-sata-6gbs-20nm-mlc.html]

 

컨버터

micro SATA to normal SATA

[링크 : https://korean.alibaba.com/product-detail/1-8-SSD-Micro-SATA-to-62079646137.html]

 

컨버터 보드에는 D1117A 라고 써있는데 느낌으로 봐서는 LDO 같은데 데이터 시트까진 못 찾겠네..

 

'하드웨어 > Storage' 카테고리의 다른 글

시놀로지 + iptime + 크롬은 접속 불가  (0) 2023.12.09
DS213j DSM 7로 업데이트  (0) 2023.11.25
lsi cachecade  (0) 2022.02.18
webbios raid 설정.  (0) 2022.02.17
lsi raid sbr?  (0) 2022.02.17
Posted by 구차니
프로그램 사용/kinect2022. 4. 23. 21:32

kinect for window 중고로 구매예정이라

라즈배리 파이나 라눅스애서 사용이 가능한지 검색중

 

[링크 : http://openkinect.org/]

[링크 : https://github.com/OpenKinect/libfreenect]

[링크 : https://m.blog.naver.com/sharonlog/12020745]

 

 

'프로그램 사용 > kinect' 카테고리의 다른 글

kinect + rpi + ros = slam  (0) 2022.04.27
azure kinect  (0) 2022.04.27
kinect 360  (0) 2022.04.27
kinect for windows on ubuntu  (0) 2022.04.26
kinect for window 도착 그리고 윈도우10에서 시도  (0) 2022.04.26
Posted by 구차니
하드웨어/PLC (LSE)2022. 4. 22. 17:30

PLC가 없어도 시뮬레이션을 통해 작화(drawing) 프로그램과 연동실험을 해볼 수 있다.

 

[링크 : https://www.youtube.com/watch?v=WZSGIVq2oNo]

[링크 : https://raesaeng.tistory.com/28]

'하드웨어 > PLC (LSE)' 카테고리의 다른 글

plc toggle  (0) 2022.04.28
PLC 변수(XGK)  (0) 2022.04.27
plc 모듈 제거 부팅  (0) 2022.03.23
QLight ST56LF 사용  (0) 2022.03.21
lse xgk-cpue rs232/modbus 연결  (0) 2022.03.21
Posted by 구차니
embeded/jetson2022. 4. 22. 15:34

deepstream 6.0 부터 NHWC 네트워크 입력을 지원한다고 한다.

그런데 이 NHWC가 먼지 몰라서 헤매는 중...

그러니까.. 이전에는 NHWC는 지원하지 않았으니 NCHW만 지원했던건가?

Support for NHWC network input DS 6.0

 

nvinfer 모듈에서 NCHW가 언급되는 항목은 아래와 같은데

입력 레이어, 출력 레이어의 순서 그리고 uff 관련 입력 차원/순서에 대한 내용인데..

UFF 안쓰면 network-input-order와 segmentation-output-order만 보면 될 것 같긴하다.

network-input-order Order of the network input layer (ignored if input-tensor-meta enabled) Integer 0:NCHW 1:NHWC network-input-order=1 All
Both
segmentation-output-order Segmentation network output layer order Integer 0: NCHW 1: NHWC segmentation-output-order=1 Segmentation
Both
uff-input-dims DEPRECATED. Use infer-dims and uff-input-order instead.
Dimensions of the UFF model
channel; height; width; input-order All integers, ≥0 input-dims=3;224;224;0
Possible values for input-order are:
0: NCHW
1: NHWC
All
Both

 

uff-input-order UFF input layer order Integer 0: NCHW 1: NHWC 2: NC uff-input-order=1 All
Both

[링크 : https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvinfer.html]

 

conv 연산시 nhwc가 nchw에 비해서 빠르다고 하는데 데이터 순서에 따른 인접성 때문에 그런가?

[링크 : https://moon-walker.medium.com/train-faster-텐서플로우-성능-최적화-기법-d67d3faee959]

 

약어는 아래와 같다고.

N: number of images in the batch
H: height of the image
W: width of the image
C: number of channels of the image (ex: 3 for RGB, 1 for grayscale...)

[링크 : https://stackoverflow.com/questions/37689423/convert-between-nhwc-and-nchw-in-tensorflow]

[링크 : https://code-examples.net/ko/q/23f184f]

 

일단.. deepstream 에서 받아들이는 텐서는 3x320x320 인데

INFO: [Implicit Engine Info]: layers num: 4
0   INPUT  kFLOAT image_tensor    3x320x320
1   OUTPUT kHALF  detected_boxes  256x4
2   OUTPUT kINT32 detected_classes 256
3   OUTPUT kHALF  detected_scores 256

 

NCHW를 NHWC로 바꾸니까

1x3x320x320 으로 들어올 것이

1x320x320x3 으로 들어오는지 범위를 벗어났다고 경고를 띄운다.

WARNING: Backend context bufferIdx(0) request dims:1x320x320x3 is out of range, [min: 1x3x320x320, max: 1x3x320x320]
ERROR: [TRT]: 4: [network.cpp::validate::2959] Error Code 4: Internal Error (image_tensor: for dimension number 1 in profile 0 does not match network definition (got min=320, opt=320, max=320), expected min=opt=max=3).)
ERROR: Build engine failed from config file
ERROR: failed to build trt engine.
0:00:05.708555452 30995     0x2a01fa70 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1934> [UID = 1]: build engine file failed
0:00:05.713238769 30995     0x2a01fa70 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2020> [UID = 1]: build backend context failed
0:00:05.713377574 30995     0x2a01fa70 ERROR                nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1257> [UID = 1]: generate backend failed, check config file settings
** ERROR: <main:707>: Failed to set pipeline to PAUSED
Quitting
ERROR from primary_gie: Failed to create NvDsInferContext instance
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(841): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInfer:primary_gie:
Config file path: /opt/nvidia/deepstream/deepstream-6.0/sources/objectDetector_SSD/config_infer_primary_ssd.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED

 

'embeded > jetson' 카테고리의 다른 글

젯슨 레이서 조립 2  (0) 2023.01.21
젯슨 레이서 조립 1  (0) 2023.01.20
FLIR ETS320 / v4l  (0) 2022.04.21
deepstream 구조, gstreamer module 설명  (2) 2022.04.19
deepstream nvinfer  (0) 2022.04.18
Posted by 구차니