eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
314 stars 179 forks source link

Can i run this on Windows? #200

Closed kevin0598 closed 4 years ago

kevin0598 commented 4 years ago

I want to use Windows for my OS can i run it at Windows and Can i use MS Visual Code for my text editor??

kevin0598 commented 4 years ago

I already tried using Cygwin,and when i try to

$ make [SENSORNET={udp6}]

then this error came up,is there something wrong with the file?? because from what i know Cygwin can make we work on Linux environment

image

ty4tw commented 4 years ago

Hi, Exec make without argument.

By default, a gateway for UDP is built. In order to create a gateway for UDP6 or XBee, SENSORNET argument is required.

kevin0598 commented 4 years ago

i already tried

$ make SENSORNET=udp6 / $ make SENSORNET=xbee

but still came out that error,so what should i do?

and i think there is no experiment branch

because you use

git clone -b experiment ...

ty4tw commented 4 years ago

Hi, master and develop are current existing branches as you said. Try develop branch and if you can’t build it, it must be a problem of Cygwin build environment. I’ve never tried Cygwin environment before. It’s out of my scope.

kevin0598 commented 4 years ago

Hi

Thank you for answering

i already use Linux at Virtual Box but it seem the gateway can't publish from mqtt-sn client to mqtt broker but for the mqtt-sn client i can do sub and pub

are this gateway support for mosquitto broker? because the broker doesn't get any message from the mqtt-sn client pub image

and this is the prove that there is no error for mqtt-sn client pub/sub

pub as mqtt-sn client image

sub as mqtt-sn client image

ty4tw commented 4 years ago

Hi Can I see the log of gateway?

kevin0598 commented 4 years ago

i have found some error like this,is this the problem? image

is this right? for the log image

ty4tw commented 4 years ago

It works fine.
====> and <==== arrow mean message to/from the broker. ——> and <—— arrows mean message to/from clients.

kevin0598 commented 4 years ago

Hi

But why is my broker that use mosquitto doesn't receive any data that i send from mqtt-sn client even though at the mqtt-sn gateway it said success to send data?? Is there a problem with my broker? Or this gateway doesn't support mosquitto broker??

And i can said that my mqtt-sn client and my mqtt-sn gateway is success right??

ty4tw commented 4 years ago

Did you change gateway.conf to set your own broker?

kevin0598 commented 4 years ago

What should i change sir?

I'm new here and I need some guidance image

and here is the error on the gateway image

kevin0598 commented 4 years ago

gateway.conf have a broker name,if i use mosquitto broker then what should i name it? or mqttcloud?

ty4tw commented 4 years ago

Write IP address instead of host name.

kevin0598 commented 4 years ago

Yeah it worked

Now last question, is this library i can implemented it on Arduino nano that using NRF24L01 as the gateway?

ty4tw commented 4 years ago

If you can run Linux os on those machine answer is yes.

kevin0598 commented 4 years ago

thank you sir i will try it