티스토리 뷰

IOT

MQTT-1

@서비 2021. 12. 29. 09:23

 

 

오늘은 IOT 통신의 기반이 되는 MQTT 통신을 해 본다.

우선 프로그램을 다운로드하여야 한다. 사용할 프로그램은 mosquitto mqtt 이다.

 

1. 설치

https://mosquitto.org/download/

 

Download

Mosquitto Enhancements These projects can be used to add extra features to Mosquitto. Management Center: A web UI for managing Mosquitto instances. In particular, this offers a convenient UI for managing clients, groups and roles as in the new Dynamic Secu

mosquitto.org

 

 

 

2. 실행

mqtt 통신은 broker subscriber publisher 가 있는데 broker는 중계만 한고 publisher 가 정보를 publish 하고 Subscriber 가 정보를 구독하고 있다가 전달받는다.

 

기본 명령어는 아래와 같다.

 

■ mosquitto broker 실행

mosquitto -v

 

■ mosquitto Subscriber 실행

 

mosquitto_sub -h localhost -t /test

 

■ mosquitto Publisher실행


mosquitto_pub -h localhost -t /test -m "Hello"

 

 

'IOT' 카테고리의 다른 글

MQTT 상호 인증  (0) 2022.01.09
open ssl 로 상호 인증을 위한 인증서 발행하기  (0) 2022.01.09
TLS 기초  (0) 2022.01.04
MQTT 도입  (0) 2021.12.29
MQTT Subscriber 강제 종료를 알 수 있을 까  (0) 2021.12.29
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함