Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Please Try Out the MQTT-SN Gateway

Hi Paul,

Thank you for your good suggestion.

> digi recommends API mode 1 for most uses.
I didn't know that.  

MQTT & MQTT-SN should transport a binary payload.
therefore, I thought simply escape mode is only way out to get the real start byte, not 0x7e in a payload, for a stable communication.
so, I have never tested API mode 1 from the beginning.
I'm expecting your XBee testing of API mode 1.

> This should probably be configurable.
It's easy to change the code for TEST.

Just comment out as follows:
=========================================
void XBee::send(uint8_t c)
{
  // if(c == START_BYTE || c == ESCAPE || c == XON || c == XOFF){
  //    _serialPort->send(ESCAPE);
 //     _serialPort->send(c ^ 0x20);
 // }else{
      _serialPort->send(c);
  //}
}

int XBee::recv(uint8_t* buf)
{
    if (_serialPort->recv(buf) )
    {
       // if ( *buf == ESCAPE)
      //  {
      //      _serialPort->recv(buf);
      //      *buf = 0x20 ^ *buf;
      //  }
        return 0;
    }
    return -1;
}

==========================================
XBee programs as far as I know are just sending with out Frame ID. It's unstable same as QoS0.
In my experience, A point of stable communication of XBee API mode is that  using a Frame ID in Transmit Request and get Transmit Status.

I will change it configurable after my struggling with client certificate required TLS connections.

Thank you for your cooperation.



Tomy Technology
Tomoaki  YAMAGUCHI

2016-09-20 23:09 GMT+09:00 Paul Kierstead <paulkierstead@xxxxxxxxx>:
One hitch in the XBee code is that (as far as I can tell) it assumes API mode 2 (escape mode), which is not the generally recommended mode for XBee; digi recommends API mode 1 for most uses. This should probably be configurable.

Hopefully I'll get some time soon to hack it back to API mode 1 and run a couple of little trials. I have a simple remote power switch I need and was going to do with an ESP8266/MQTT (it is what I have used in the past), but could try it out with an XBee/MQTTSN, as it would be nice if it could run off battery for a while. What I really need is MQTTSN over BLE ... someone needs to write that up!

On Tue, 20 Sep 2016 at 00:47 Tomoaki Yamaguchi <tomoaki@xxxxxxxxxxxxx> wrote:
Ian,

Sorry, I miss understood your intension.
Link is correct.

Tomy Technology

Tomoaki  YAMAGUCHI

2016-09-20 13:39 GMT+09:00 Tomoaki Yamaguchi <tomoaki@xxxxxxxxxxxxx>:
otherwise,  Makefile is missing in github.

Tomy Technology
Tomoaki  YAMAGUCHI

2016-09-20 7:04 GMT+09:00 Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxx.uk>:
Hello all,

Tomoaki is kindly working on and contributed an MQTT-SN transparent gateway.  You can find it here:

https://github.com/eclipse/paho.mqtt-sn.embedded-c/tree/gateway/MQTTSNGateway

in the gateway branch.  I had been waiting for a few more updates to go in before asking for interested parties to try it out for themselves, but I've not found the time I was hoping for.

The instructions for building and using it are in the Readme. I've been using the MQTTSNPacket client to test it out.  I'm hoping a few more people can use it and open issues for bugs or suggestions.

Thanks!

--
Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
 
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top