CostaT
June 12, 2019, 12:21pm
1
Hi,
I configurated the bridge, and now I need send the tag positioning and the Uplink/Downlink information(bidirectional) to process this data on my desktop by ssh.
My question is where I can handle this information?
By SPI or I need know the deamon code?
I try with the serial port, but the commands lep, lec… don’t work when the module is configurated as bridge.
thanks
Best Regards
CostaT
1 Like
Asmita
July 26, 2019, 1:34am
2
Hello,
I am also struggling with the same issue, did you get the solution for this.
If yes, kindly suggest. It would be of great help.
Thanks & Regards
Asmita
CostaT
August 5, 2019, 8:58am
3
Hi, you should use the mqtt.fx on windows.
https://mqttfx.jensd.de/index.php/download
If you are programing in c# exist a library to get tag configuration an positioning, the Plt.M2Mqtt.
You need subscribe all of devices that you need.
code example:
clientId = new MqttClient(IPAddress.Parse(“169.254.106.238”));
string stid = Guid.NewGuid().ToString();
byte code = clientId.Connect(stid);
if(code==0)
{
connection.Open();
using (SqlCommand command2 = new SqlCommand(“SELECT * FROM Node”, connection))
{
using (SqlDataReader reader = command2.ExecuteReader())
{
if (reader.HasRows)
{
while (reader.Read())
{
ID = reader.GetString(0);
NodeType = reader.GetBoolean(1);
if (NodeType == true)//is tag
{
Topic = "dwm/node/" + ID + "/uplink/location";
msgId = clientId.Subscribe(new string[] { Topic }, new byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
clientId.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
Topic = "dwm/node/" + ID + "/uplink/data";
msgId = clientId.Subscribe(new string[] { Topic }, new byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
clientId.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
// Topic = "dwm/node/" + ID + "/uplink/config";
//msgId = clientId.Subscribe(new string[] { Topic }, new byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
//clientId.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
}
}
/* else//anchor
{
Topic = "dwm/node/" + ID + "/uplink/config";
msgId = clientId.Subscribe(new string[] { Topic }, new byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
clientId.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
}*/
}
}
}
Hope to have helped
Best Regards
CostaT
CostaT
August 5, 2019, 9:01am
4