Hi,
I have a project putting MQTT(SN) on moteino's. My setup has 2 moteinos [one switchmote and one with usb] with no other radio devices as yet.
I am nearly complete but am stuck with some phantom packets being received on the mote, or rather the receiveDone() returns true but with no new data [it gives the old data and this throws out the sequencing of the MQTTSN library]. I tried a couple of things and dug a bit to ensure that I am using the RF69 methods correctly, and I think I am [as they are based off the examples]
My main loop scans for io changes in sensors [very quick] and calls "mqttsn.poll()" which in turn calls a method "parse_lpl_rf69()" and in this method I have:
#ifdef USE_LPL_RF69
void MQTTSN::parse_lpl_rf69() {
if(radio.receiveDone()){
dbgF(" mqttsn-messages::parse_rf69: rf69 data = ");
for (byte i=0;i<20;i++){//radio.DATALEN;i++){ //radio.DATA[0]
dbgH(radio.DATA[i],HEX);
dbgF(" ");
}
dbglnF(" ");
//memcpy(response_buffer, (const void*)radio.DATA, radio.RF69_MAX_DATA_LEN < MAX_BUFFER_SIZE ? radio.RF69_MAX_DATA_LEN : MAX_BUFFER_SIZE);
memcpy(response_buffer, (const void*)radio.DATA, 61);//< MAX_BUFFER_SIZE ? radio.RF69_MAX_DATA_LEN : MAX_BUFFER_SIZE);
if (radio.ACKRequested()){
byte theNodeID = radio.SENDERID;
radio.sendACK();
dbglnF(" mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK");
}
flashLed(9, 10);
dispatch();
}
}
My gateway is connected to MQTT RSMB broker whose logs [with hex] can be seen below:
Routing to UDP: 127.0.0.1:1884
0b:04:20:01:00:05:6d:6f:74:65:32
Length 11, CONNECT, {DUP False, QoS 1, Retain False, Will False, CleanSession False, TopicIdType 0}, ProtocolId 1, Duration 5, ClientId mote2
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
03:05:00
Length 3, CONNACK, ReturnCode 0
-----------------------------------------------
Routing to UDP: 127.0.0.1:1884
0b:04:20:01:00:05:6d:6f:74:65:32
Length 11, CONNECT, {DUP False, QoS 1, Retain False, Will False, CleanSession False, TopicIdType 0}, ProtocolId 1, Duration 5, ClientId mote2
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
03:05:00
Length 3, CONNACK, ReturnCode 0
-----------------------------------------------
Routing to UDP: 127.0.0.1:1884
0e:0a:00:00:00:01:32:2f:31:2f:40:49:2f:31
Length 14, REGISTER, TopicId 0, MsgId 1, TopicName 2/1/@I/1
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
07:0b:00:01:00:01:00
Length 7, REGACK, TopicId 1, MsgId 1, ReturnCode 0
-----------------------------------------------
Routing to UDP: 127.0.0.1:1884
0f:0a:00:00:00:03:32:2f:31:2f:40:41:2f:35:31
Length 15, REGISTER, TopicId 0, MsgId 3, TopicName 2/1/@A/51
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
07:0b:00:02:00:03:00
Length 7, REGACK, TopicId 2, MsgId 3, ReturnCode 0
-----------------------------------------------
Routing to UDP: 127.0.0.1:1884
0f:0a:00:00:00:05:32:2f:31:2f:40:41:2f:35:31
Length 15, REGISTER, TopicId 0, MsgId 5, TopicName 2/1/@A/51
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
07:0b:00:02:00:05:00
Length 7, REGACK, TopicId 2, MsgId 5, ReturnCode 0
-----------------------------------------------
Routing to UDP: 127.0.0.1:1884
0f:0a:00:00:00:07:32:2f:31:2f:40:41:2f:35:31
Length 15, REGISTER, TopicId 0, MsgId 7, TopicName 2/1/@A/51
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
07:0b:00:02:00:07:00
Length 7, REGACK, TopicId 2, MsgId 7, ReturnCode 0
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
05:00:01:02:58
Length 5, ADVERTISE GwId 1 Duration 600
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
05:00:01:02:58
Length 5, ADVERTISE GwId 1 Duration 600
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
05:00:01:02:58
Length 5, ADVERTISE GwId 1 Duration 600
-----------------------------------------------
Routing to Serial: /dev/ttyUSB0
05:00:01:02:58
Length 5, ADVERTISE GwId 1 Duration 600
you can see that the exchange sequence is connect with connack reply -> 3 5 0], then some register and regack messages.
But the connack is received twice at the mote but only sent once [from rsmb and gateway]
Here is the gw logs:
[2] Radio Data >>> Serial (broker) Data
B 4 20 1 0 5 6D 6F 74 65 32 - ACK sent.
Serial.available()=3
plength_temp=3 2 1 {0}
>>Serial.available()=0
[2] Serial (broker) Data >>> Radio Data
3 5 0
[2] Radio Data >>> Serial (broker) Data
B 4 20 1 0 5 6D 6F 74 65 32 - ACK sent.
Serial.available()=3
plength_temp=3 2 1 {0}
>>Serial.available()=0
[2] Serial (broker) Data >>> Radio Data
3 5 0
[2] Radio Data >>> Serial (broker) Data
[2] Register Msg received:
Register TopicName = 2/1/@I/1
Register Msg Id = 1
Radio Data >>> Serial (broker) Data
E A 0 0 0 1 32 2F 31 2F 40 49 2F 31 - ACK sent.
Serial.available()=7
plength_temp=7 6 5 4 3 2 1 {0}
>>Serial.available()=0
RegAck Msg received:
RegAck Msg Id = 1
Node Id = 2
Updating nodeTopicTable: [topicId] [nodeId][1][2]
writing to nodeTopic entry to flash....fin
[2] Serial (broker) Data >>> Radio Data
7 B 0 1 0 1 0
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 2
Radio Data >>> Serial (broker) Data
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 3
Radio Data >>> Serial (broker) Data
F A 0 0 0 3 32 2F 31 2F 40 41 2F 35 31 - ACK sent.
Serial.available()=7
plength_temp=7 6 5 4 3 2 1 {0}
>>Serial.available()=0
RegAck Msg received:
RegAck Msg Id = 3
Node Id = 2
Updating nodeTopicTable: [topicId] [nodeId][2][2]
writing to nodeTopic entry to flash....fin
[2] Serial (broker) Data >>> Radio Data
7 B 0 2 0 3 0
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 4
Radio Data >>> Serial (broker) Data
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 5
Radio Data >>> Serial (broker) Data
F A 0 0 0 5 32 2F 31 2F 40 41 2F 35 31 - ACK sent.
Serial.available()=7
plength_temp=7 6 5 4 3 2 1 {0}
>>Serial.available()=0
RegAck Msg received:
RegAck Msg Id = 5
Node Id = 2
Updating nodeTopicTable: [topicId] [nodeId][2][2]
writing to nodeTopic entry to flash....fin
[2] Serial (broker) Data >>> Radio Data
7 B 0 2 0 5 0
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 7
Radio Data >>> Serial (broker) Data
F A 0 0 0 7 32 2F 31 2F 40 41 2F 35 31 - ACK sent.
Serial.available()=12
plength_temp=7 6 5 4 3 2 1 {0}
>>Serial.available()=5
RegAck Msg received:
RegAck Msg Id = 7
Node Id = 2
Updating nodeTopicTable: [topicId] [nodeId][2][2]
writing to nodeTopic entry to flash....fin
[2] Serial (broker) Data >>> Radio Data
7 B 0 2 0 7 0
Serial.available()=5
plength_temp=5 4 3 2 1 {0}
>>Serial.available()=0
[2] Serial (broker) Data >>> Radio Data
5 0 1 2 58
[2] Register Msg received:
Register TopicName = 2/1/@A/51
Register Msg Id = 9
Radio Data >>> Serial (broker) Data
and here is the mote logs
mqttsn-messages:Initialising RF69...
mqttsn-messages:RF69 init done
setup methods done
Mote::init: ...
Mote init done
callbacks done
watchdog enable done
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages::wait_for_response: <<0>>
mqttsn-messages:connect_:Connect msg sent
mqttsn-messages:connect_:mqttsn.connected()=0
first mqttsn connect done
Setup done
Setup didnt connect. Try now...
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages::wait_for_response: <<0>>
mqttsn-messages:connect_:Connect msg sent
mqttsn-messages:connect_:mqttsn.connected()=0
Setup didnt connect. Try now...
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages::wait_for_response: <<0>>
mqttsn-messages:connect_:Connect msg sent
mqttsn-messages:connect_:mqttsn.connected()=0
Setup didnt connect. Try now...
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages::wait_for_response: <<0>>
mqttsn-messages:connect_:Connect msg sent
mqttsn-messages:connect_:mqttsn.connected()=0
mqttsn-messages::parse_rf69: rf69 data = 3 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <connackHandler>
mqttsn-messages:connack_handler: _connected=1
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@I/1
mqttsn-messages::parse_rf69: rf69 data = 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages:dispatch: <connackHandler>
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if met>
mqttsn-messages:regack_handler: not found matching topic so store in topic table
<<<-------------------->>>
topicTable[0].id ; name=1 ; 2/1/@I/1
<<<-------------------->>>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
1==1 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
1==2 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 0 B 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
1==3 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 2 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
3==4 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 0 B 0 2 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
3==5 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 2 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
5==6 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 0 B 0 2 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
5==7 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 2 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if FAILED!!>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
7==8 [message_id match]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51
mqttsn-messages::parse_rf69: rf69 data = 5 0 1 2 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages::parse_rf69: rf69 data = 5 0 1 2 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages::parse_rf69: rf69 data = 5 0 1 2 58 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
you can see that the first [3 5 0] is rx which is fine, but then a [0 5 0] is rx [somehow the first byte is lost also]
And my assumption so far is because the receiveDone() method is returning true although new data is not received by the mote from the gateway. How can this be?
Any help would be greatly appreciated.
Thanks
Jason
My first thought is memory leaks, could that be it? I see some memory ops in your code.
RAM is only 2K on the mega328, sometimes beefy code can throw it off and very strange things start happening.
I will say if Node and Gateway sample sketches work fine then it's gotta be something else, most likely memory leaks or out of bounds issues.
Hey Felix,
The ram with following code snippet sits at 352. I dont know whether this is too little or enuf to be stable.
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
and is called within the main loop for this debug test.
After putting in some more debugs on the mote [NODEID=2]: for the SENDERID which is the gateway [NODEID=1] alternates between 0 and 1. And here is the strange thing: the 0 SENDERIDs are the valid messages and are also the messages that are acked. I also have datalen of 0, but my guess is that I am using c-strings
Free RAM is =352
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages::parse_rf69: rf69 sender ID = 0
mqttsn-messages::parse_rf69: rf69 DATALEN = 0
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 2 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if met>
mqttsn-messages:regack_handler: not found matching topic so store in topic table
<<<-------------------->>>
topicTable[0].id ; name=1 ; 2/1/@I/1
topicTable[1].id ; name=2 ; 2/1/@A/51
<<<-------------------->>>
0==0 [msg->return_code]
2<15 [topic_count<MAX_TOPIC]
2==2 [radio msg id =code msg id]
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:register_topic: waiting_for_response =B
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/52 with code message_id = 3
Free RAM is =352
Free RAM is =352
mqttsn-messages::parse_rf69: rf69 sender ID = 1
mqttsn-messages::parse_rf69: rf69 DATALEN = 0
mqttsn-messages::parse_rf69: rf69 data = 0 13 9C 0 4 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0
Free RAM is =352
I would recommend taking your sketch apart or rebuild it step by step making sure it works at each step along the way.
Definitely feels like some code instability, but I can't prove it without disecting your code.
I've found that putting string constants into flash using the F() macro does wonders in freeing up RAM space...
Example:
dbglnF( F(" mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK") );
Also, which version of the RFM69 library are you using? A few of us had trouble with SENDERID (and datalens) getting wiped out prematurely when an incoming packet occurred before a previous one was completely processed. I believe the latest RFM69 code addresses this, although I personally haven't confirmed that (due to using my own changes to the library).
I am using the latest version. Consider a packet stale/lost/wiped out as soon as a new interrupt from RFM69 happens. It's the host code's job to make sure the packets are processed before another should come in. Sometimes this is unavoidable, but that's why there are retries on the sender side and also ACKs.
Quote from: Felix on January 15, 2015, 11:00:15 AM
I am using the latest version. Consider a packet stale/lost/wiped out as soon as a new interrupt from RFM69 happens. It's the host code's job to make sure the packets are processed before another should come in. Sometimes this is unavoidable, but that's why there are retries on the sender side and also ACKs.
@Felix, Sorry, my question was directed to Jasonhector. My bad, I should have flagged it as such.
@Jasonhector, I've found that copying the pertinent data to local variables immediately on return from receiveDone(), before you sendAck(), is the safest (with the latest library).
Tom
Hi,
@Felix:The sketch is actually quote small but the two libraries [Mqttsn and Mote] I am developing are doing most of the heavy lifting. If you are happy to look at it I am happy to send it.
@TomWS: I am exclusively using the F() macro. Here is the snippit of the dbg routines:
#ifdef USE_DBG_UART
#define dbg(input) {Serial.print(input); delay(1);}
#define dbgln(input) {Serial.println(input); delay(1);}
#define dbgH(input, hex){Serial.print(input, hex); delay(1);}
#define dbglnH(input, hex){Serial.println(input, hex); delay(1);}
#define dbgF(input) {Serial.print(F(input)); delay(1);}
#define dbglnF(input) {Serial.println(F(input)); delay(1);}
#endif
I updated on 10 December 2014, but I see there are updates to .h and .cpp from 3 days ago. Ill update tomorrow and see.
I think I will update my code to copy to local vars prior to the ack code as suggested. Ill give some feedback tomorrow
Thanks guys for feedback so far. Much appreciated.
Quote from: Jasonhector on January 15, 2015, 02:11:39 PM
Hi,
@Felix:The sketch is actually quote small but the two libraries [Mqttsn and Mote] I am developing are doing most of the heavy lifting. If you are happy to look at it I am happy to send it.
@TomWS: I am exclusively using the F() macro. Here is the snippit of the dbg routines:
#ifdef USE_DBG_UART
#define dbg(input) {Serial.print(input); delay(1);}
#define dbgln(input) {Serial.println(input); delay(1);}
#define dbgH(input, hex){Serial.print(input, hex); delay(1);}
#define dbglnH(input, hex){Serial.println(input, hex); delay(1);}
#define dbgF(input) {Serial.print(F(input)); delay(1);}
#define dbglnF(input) {Serial.println(F(input)); delay(1);}
#endif
I updated on 10 December 2014, but I see there are updates to .h and .cpp from 3 days ago. Ill update tomorrow and see.
I think I will update my code to copy to local vars prior to the ack code as suggested. Ill give some feedback tomorrow
Thanks guys for feedback so far. Much appreciated.
<g> I was wondering about the naming convention you had for the debug routines. Makes sense, good solution.
Don't use the most recent library posted by Kiwi, this is still under development and in early test phase... No reflection on Kiwi, it's just that it's fresh and subject to change.
Tom
OK, so I updated to the latest RF69 library on github and all seems to be working fine right now:
mqttsn-messages:connect: waiting_for_response =5
mqttsn-messages:connect_:Connect msg sent
mqttsn-messages:connect_:mqttsn.connected()=0
first mqttsn connect done
Setup done
mqttsn-messages::parse_rf69: rf69 sender ID = 1
mqttsn-messages::parse_rf69: rf69 DATALEN = 3
mqttsn-messages::parse_rf69: rf69 data = 3 5 0
mqttsn-messages:dispatch: <connackHandler>
mqttsn-messages:connack_handler: _connected=1
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:register_topic: waiting_for_response =B
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@I/1 with code message_id = 1
mqttsn-messages::parse_rf69: rf69 sender ID = 1
mqttsn-messages::parse_rf69: rf69 DATALEN = 7
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 D 0 1 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if met>
mqttsn-messages:regack_handler: not found matching topic so store in topic table
<<<-------------------->>>
topicTable[0].id ; name=13 ; 2/1/@I/1
<<<-------------------->>>
0==0 [msg->return_code]
1<15 [topic_count<MAX_TOPIC]
1==1 [radio msg id =code msg id]
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:register_topic: waiting_for_response =B
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/51 with code message_id = 2
mqttsn-messages::parse_rf69: rf69 sender ID = 1
mqttsn-messages::parse_rf69: rf69 DATALEN = 7
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 E 0 2 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if met>
mqttsn-messages:regack_handler: not found matching topic so store in topic table
<<<-------------------->>>
topicTable[0].id ; name=13 ; 2/1/@I/1
topicTable[1].id ; name=14 ; 2/1/@A/51
<<<-------------------->>>
0==0 [msg->return_code]
2<15 [topic_count<MAX_TOPIC]
2==2 [radio msg id =code msg id]
mqttsn-messages::parse_lpl_rf69: Sending Rf69 ACK
mqttsn-messages:send_message: Sending to [1]..sent
mqttsn-messages:register_topic: waiting_for_response =B
mqttsn-messages:registertopic_:Register topic sent for: 2/1/@A/52 with code message_id = 3
mqttsn-messages::parse_rf69: rf69 sender ID = 1
mqttsn-messages::parse_rf69: rf69 DATALEN = 7
mqttsn-messages::parse_rf69: rf69 data = 7 B 0 F 0 3 0
mqttsn-messages:dispatch: <regackHandler>
mqttsn-messages:regack_handler: <method start>
mqttsn-messages:regack_handler: <first if met>
mqttsn-messages:regack_handler: not found matching topic so store in topic table
<<<-------------------->>>
topicTable[0].id ; name=13 ; 2/1/@I/1
topicTable[1].id ; name=14 ; 2/1/@A/51
topicTable[2].id ; name=15 ; 2/1/@A/52
<<<-------------------->>>
Thanks for the help.
I will post an update under projects once I am done [which I am nearly now] for running mqtt-sn directly on moteinos.