Day: March 2, 2020

TCP Checksum Calculation

I recently started with networking and tcp/ip.
The RFC 793 document tells the checksum is made of:
pseudo header+tcp header+tcp payload+zeroes(if not divisible by 16).
So I have to take 16bit fragments and sum them. And a final ones-comple…

How to access a broker from outside the local network

<***>

Hello everyone. I just started working with MQTT to incorporate its use in my IoT project and I am totally new to this stuff.

What I have done so far:

I have installed Mosquitto. In the configuration file, I have changed the IP address/hostname to the IP address of my windows 10 PC that I found in the router settings.

I open cmd and change the directory to where Mosquitto is installed and type:

mosquitto -v

And it shows:

mosquitto version 1.4.14 (build date 2017-07-10 23:55:18+0100) starting

1583181194: Using default config.

1583181194: Opening ipv6 listen socket on port 1883.

1583181194: Opening ipv4 listen socket on port 1883.

I open another cmd window to the same directory and subscribe as:

mosquitto_sub -t topic

I publish a message from another cmd window as:

mosquitto_pub -t topic -m message

And thus I get to see the message in the subscriber window.

What I want to know is:

How can I subscribe or publish to this MQTT broker from a device (eg. Laptop or Nodemcu) that is not connected to my router and is rather connected to some other router at a different place?

I apologize in advance as it is a long post and I’m really an amateur.

Thank you in advance!

submitted by /u/cyanogen1912
[link] [comments]