'프로그램 사용/mosquitto'에 해당되는 글 6건

  1. 2025.04.18 mosquitto qos
  2. 2025.02.18 mosquitto for windows 계정추가
  3. 2025.02.18 mosquitto service for windows
  4. 2025.01.07 CC2531 zigbee - mqtt
  5. 2024.05.23 ubuntu MQTT(mosquito)
  6. 2019.05.15 mosquitto - MQTT broker

ROS 보다보니 QoS 이야기가 나와서 조사

그런데 정작 찾아봐도 적용방법이 잘 안보인다.

conf 파일에서는 max_qos와 topic patern에 추가하는 정도?

 

topic pattern [[[ out | in | both ] qos-level] local-prefix remote-prefix]

max_qos value
Limit the QoS value allowed for clients connecting to this listener. Defaults to 2, which means any QoS can be used. Set to 0 or 1 to limit to those QoS values. This makes use of an MQTT v5 feature to notify clients of the limitation. MQTT v3.1.1 clients will not be aware of the limitation. Clients publishing to this listener with a too-high QoS will be disconnected.

Not reloaded on reload signal.

[링크 : https://mosquitto.org/man/mosquitto-conf-5.html]

 

QoS는 0,1,2가 존재한다. 그런데 기본값이 멀까..?

Quality of Service
MQTT defines three levels of Quality of Service (QoS). The QoS defines how hard the broker/client will try to ensure that a message is received. Messages may be sent at any QoS level, and clients may attempt to subscribe to topics at any QoS level. This means that the client chooses the maximum QoS it will receive. For example, if a message is published at QoS 2 and a client is subscribed with QoS 0, the message will be delivered to that client with QoS 0. If a second client is also subscribed to the same topic, but with QoS 2, then it will receive the same message but with QoS 2. For a second example, if a client is subscribed with QoS 2 and a message is published on QoS 0, the client will receive it on QoS 0.

Higher levels of QoS are more reliable, but involve higher latency and have higher bandwidth requirements.

0: The broker/client will deliver the message once, with no confirmation.
1: The broker/client will deliver the message at least once, with confirmation required.
2: The broker/client will deliver the message exactly once by using a four step handshake.

[링크 : https://mosquitto.org/man/mqtt-7.html]

 

초당 32000 메시지라.. 느린거 걱정안해도 될 것 같기도 하고?

[링크 : https://hel-p.tistory.com/18]

 

[링크 : https://dalkomit.tistory.com/111]

[링크 : https://www.ibm.com/docs/ko/ibm-mq/9.2.x?topic=concepts-qualities-service-provided-by-mqtt-client]

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

mosquitto for windows 계정추가  (0) 2025.02.18
mosquitto service for windows  (0) 2025.02.18
CC2531 zigbee - mqtt  (0) 2025.01.07
ubuntu MQTT(mosquito)  (0) 2024.05.23
mosquitto - MQTT broker  (0) 2019.05.15
Posted by 구차니

결국은(?) password_file을 지정해서 mosquitto_passwd 명령을 통해 계정을 추가해주면 끝 인듯

 

1. password.txt 이름으로 비어있는 파일을 생성하여 Mosquitto가 설치된 폴더에 저장
2. 계정 추가
C:\mosquitto>mosquitto_passwd -b password.txt admin password

3. mosquitto.conf 파일 수정
allow_anonymous false
password_file C:\Program Files\mosquitto\password.txt

[링크 : https://hays99.tistory.com/189]

[링크 : https://mosquitto.org/man/mosquitto_passwd-1.html]

 

+

2025.02.21

"Program Files" 때문에 공백이 있어서 "로 묶어 줘야 할 줄 알았는데, 해주면 안되도록 구현이 되어있나 보다.

C:\Program Files\mosquitto>mosquitto -c mosquitto.conf -v
1740101165: mosquitto version 2.0.20 starting
1740101165: Config loaded from mosquitto.conf.
1740101165: Error: Unable to open pwfile ""C:\Program Files\mosquitto\password.txt"".
1740101165: Error opening password file ""C:\Program Files\mosquitto\password.txt"".

 

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

mosquitto qos  (0) 2025.04.18
mosquitto service for windows  (0) 2025.02.18
CC2531 zigbee - mqtt  (0) 2025.01.07
ubuntu MQTT(mosquito)  (0) 2024.05.23
mosquitto - MQTT broker  (0) 2019.05.15
Posted by 구차니

공식 다운로드는 아래인데

[링크 : https://mosquitto.org/download/]

 

받아도 방화벽 설정은 하나도 안되고 내부에서만 허용되는 설정으로 설치가 된다.

그러니 외부 접속이 필요하면 아래 내용을 참고하여 인바운드 1883/tcp를 허용해주어야 한다.

[링크 : https://velog.io/@foxiq/MQTT-사용]

 

윈도우 64bit로 설치했을 경우 C:\Program Files\mosquitto\mosquitto.conf 에 설정 파일이 저장된다.

굳이 listener 1883 0.0.0.0 으로 해주진 않아도 외부 접속을 허용하게 되는 것으로 보인다.

# =================================================================
# Listeners
# =================================================================

# Listen on a port/ip address combination. By using this variable
# multiple times, mosquitto can listen on more than one port. If
# this variable is used and neither bind_address nor port given,
# then the default listener will not be started.
# The port number to listen on must be given. Optionally, an ip
# address or host name may be supplied as a second argument. In
# this case, mosquitto will attempt to bind the listener to that
# address and so restrict access to the associated network and
# interface. By default, mosquitto will listen on all interfaces.
# Note that for a websockets listener it is not possible to bind to a host
# name.
#
# On systems that support Unix Domain Sockets, it is also possible
# to create a # Unix socket rather than opening a TCP socket. In
# this case, the port number should be set to 0 and a unix socket
# path must be provided, e.g.
# listener 0 /tmp/mosquitto.sock
#
# listener port-number [ip address/host name/unix socket path]
#listener
listener 1883
allow_anonymous true

 

+

2025.02.21

포트를 바꿀 경우 -p 로 바꾸어 주고

다른 서버일 경우 -h ip를 추가해주면 된다.

C:\Program Files\mosquitto>mosquitto_sub -p 27839 -t topic -u username -P password

 

C:\Program Files\mosquitto>mosquitto_pub  -p 27839 -t MY -u username -P password -m asdf

+

 

allow_anonymous true가 없으면 아래 에러가 발생한다.

Connection error: Connection Refused: not authorised.

 

전체 테스트 과정은 아래와 같다.

윈도우 (서버) 다른 PC/linux (클라이언트)
1. 프로그램 설치  
2. 방화벽 설정  
3. conf 파일 수정 및 서비스 재기동  
4. client 접속
C:\Program Files\mosquitto>mosquitto_sub.exe -t MY_TOPIC
4. client 접속
$ mosquitto_sub -v -h 192.168.0.11 -t MY_TOPIC
5. publish
C:\Program Files\mosquitto>mosquitto_pub.exe -t MY_TOPIC -m HELLO
 
  6. 메시지 확인
HELLO

-v 시에는
MY_TOPIC HELLO

 

---

Just edit Mosquitto configuration file ( /etc/mosquitto/conf.d/mosquitto.conf ) adding these lines...
allow_anonymous true
listener 1883 0.0.0.0

[링크 : https://stackoverflow.com/questions/24556160/mosquitto-client-obtain-refused-connection]

[링크 : https://iotmaker.kr/2021/08/23/mosquitto-remote-access-for-windows/]

[링크 : https://blog.naver.com/loyz/222654739136]

[링크 : https://pros2.tistory.com/137]

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

mosquitto qos  (0) 2025.04.18
mosquitto for windows 계정추가  (0) 2025.02.18
CC2531 zigbee - mqtt  (0) 2025.01.07
ubuntu MQTT(mosquito)  (0) 2024.05.23
mosquitto - MQTT broker  (0) 2019.05.15
Posted by 구차니

굽는것도 라즈베리 통해서 저 1.27mm pitch의 망할(!) 커넥터를 해야할 것 같은데 이래저래 좀 귀찮을 듯

일단은 구워져 있고 PC에 연결하면 시리얼 포트로 뜨긴 한데

콘솔에서 먼가 입력해도 baudrate를 115k로 해서 그런가 응답이 없다.

 

[링크 : https://blog.naver.com/fromzip/222009276457]

[링크 : https://m.blog.naver.com/ohminy11/222520636013]

[링크 : https://psychoria.tistory.com/m/692]

 

[링크 : https://github.com/Koenkk/Z-Stack-firmware]

[링크 : https://www.ti.com/product/ko-kr/CC2531]

[링크 : https://www.ti.com/lit/ds/symlink/cc2531.pdf]

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

mosquitto qos  (0) 2025.04.18
mosquitto for windows 계정추가  (0) 2025.02.18
mosquitto service for windows  (0) 2025.02.18
ubuntu MQTT(mosquito)  (0) 2024.05.23
mosquitto - MQTT broker  (0) 2019.05.15
Posted by 구차니

mosquitto 는 broker(서버 역할)

mosquitto-client는 client 역할을 하는 프로그램이다.

$ apt-cache search mosqui
libmosquitto-dev - MQTT version 5.0/3.1.1/3.1 client library, development files
libmosquitto1 - MQTT version 5.0/3.1.1/3.1 client library
libmosquittopp-dev - MQTT version 3.1 client C++ library, development files
libmosquittopp1 - MQTT version 5.0/3.1.1/3.1 client C++ library
mosquitto - MQTT version 5.0/3.1.1/3.1 compatible message broker
mosquitto-clients - Mosquitto command line MQTT clients
mosquitto-dev - Development files for Mosquitto

 

 

publish는 메시지를 송신하고, subscribe는 메시지를 수신한다.

 

$ mosquitto_pub -h [호스트] -t [토픽] -m [메시지]
$ mosquitto_sub -h [호스트] -t [토픽]

[링크 : https://sonjuhy.tistory.com/34]

[링크 : https://changun516.tistory.com/201]

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

mosquitto qos  (0) 2025.04.18
mosquitto for windows 계정추가  (0) 2025.02.18
mosquitto service for windows  (0) 2025.02.18
CC2531 zigbee - mqtt  (0) 2025.01.07
mosquitto - MQTT broker  (0) 2019.05.15
Posted by 구차니

일종의.. 서버 역활을 하는 녀석

eclipse 재단에서 만든건가?

 

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

[링크 : https://midnightcow.tistory.com/36]

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

mosquitto qos  (0) 2025.04.18
mosquitto for windows 계정추가  (0) 2025.02.18
mosquitto service for windows  (0) 2025.02.18
CC2531 zigbee - mqtt  (0) 2025.01.07
ubuntu MQTT(mosquito)  (0) 2024.05.23
Posted by 구차니