2017-10-13 6 views
0

나는 코드MQTT Tcl API의 버그?

source mqtt.tcl 

proc message_callback { topic message } { 
    puts stderr "message on topic $topic: $message" 
} 

set client [mqtt new] 
$client connect my-client $::addr 
$client subscribe {BCDS/#} message_callback 

vwait _done 

있는 간단한 가입자 클라이언트를 실행하는 Tcl MQTT API을 사용하고 있으며 예를 들어, 로컬 브로커와 잘 작동합니다. 동일한 LAN에서 실행되는 모기 (최소한 나는 그것을 실행하는 동안 아무 문제도 발견되지 않았다).

하지만 인터넷을 통한 브로커의 경우

message on topic BCDS/XDK/single/20:19:AB:F4:04:56/out/stream: 
{"sn":"20:19:AB:F4:04:56","data":{"acc": 
{"x":26,"y":32,"z":1012,"unit":"mG"},"gyro":{"x":1220,"y":-6835,"z":- 
2319,"unit":"mdeg/s"},"mag":{"x":40,"y":1,"z":-4,"unit":"uT"},"light": 
{"value":7466,"unit":"mLux"},"temp": 
{"value":50000,"unit":"mCelsius"},"pressure": 
{"value":98897,"unit":"Pascal"},"humidity":{"value":39,"unit":"%rh"}}} 
message on topic BCDS/XDK/single/20:19:AB:F4:04:53/out/stream: 
{"sn":"20:19:AB:F4:04:53","data":{"acc": 
{"x":26,"y":32,"z":1012,"unit":"mG"},"gyro":{"x":1220,"y":-6835,"z":- 
2319,"unit":"mdeg/s"},"mag":{"x":40,"y":1,"z":-4,"unit":"uT"},"light": 
{"value":13617,"unit":"mLux"},"temp": 
{"value":50000,"unit":"mCelsius"},"pressure": 
{"value":98897,"unit":"Pascal"},"humidity":{"value":39,"unit":"%rh"}}}2ú 
,BCDS/XDK/single/20:19:AB:F4:04:52 
/out/strea{"sn":"20:19:AB:F4:04:52","data":{"acc": 
{"x":26,"y":32,"z":1012,"unit":"mG"},"gyro":{"x":1220,"y":-6835,"z":- 
2319,"unit":"mdeg/s"},"mag":{"x":40,"y":1,"z":-4,"unit":"uT"},"light": 
{"value":7789,"unit":"mLux"},"temp":{"value":50000,"unit":"mCelsius"}, 

iot.eclipse.org, 메시지의 몇 가지를 인쇄 한 후이 스택 추적

1507901608909 (::oo::Obj22_coro): can't read "msgid": no such variable 
while executing 
"dict set rc msgid $msgid" 
    (class "::mqtt" method "receive" line 35) 
    invoked from within 
"my receive" 
    (class "::mqtt" method "listen" line 27) 
    invoked from within 
"my listen" 

내 디버깅으로 10 초 이내에 실패는이 API는 연결을 통해 연결된 메시지를 처리하지 않음을 나타냅니다? 나 맞아? 누가이 API를 사용하여 상당한 것을 처리 했습니까?

+0

기존 클라이언트와 충돌하지 않도록 client-id'my-client'를 무작위로 변경해보십시오. – hardillb

+0

하나의 연결 만 있고 일부 메시지가 인쇄되지만 10 초 이내에 오류가 발생합니다. 내 원래 게시물을 수정했습니다. –

답변

0

버그 일 수 있습니다. 이것은 버그를보고하는 좋은 채널이 아닙니다. 스택 오버플로는보다 일반적인 지원 질문입니다.

그러나 패키지의 Fossil 리포지토리에 편리하게 연결되므로 버그를보고 할 수 있습니다 (화석은 그처럼 멋집니다). 티켓New ticket입니다. 익명으로 로그인하여 그 시점에서 티켓을 신고 할 수 있습니다 (단, 비공개 인 경우 연락처 정보를 남겨 두십시오. 필요한 경우 작성자가 연락을 취할 수 있습니다).

+0

추천 링크를 확인했다면 내 티켓을봤을 것입니다. –