Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

This is an old revision of the document!


Mqtt

This is a bit of a stub for MQTT but it'll help you get going, on Ubuntu at least.

First, you'll need sbbs v320a_dev from git. This is documented elsewhere.

Once compiled and installed, run scfg, make some small change and then save. This will now add a mqtt section to main.ini. Change the host and port (default to 127.0.0.1 port 1883)

 apt install mosquitto mosquitto-clients

Additionally, if you wish to use an X based mqtt client to receive messages, install libnss3 and xdg-utils

Mosquitto will install and start automatically but you won't see any messages. If you wish to see them, then stop the broker

 systemctl stop mosquitto

and run it manually

 mosquitto -v

Now start sbbs and you should see the following lines in your log

 Dec 12 02:13:08 bbs synchronet[1188320]: #015#015Reading /sbbs/ctrl/sbbs.ini
 Dec 12 02:13:08 bbs synchronet: MQTT lib: mosquitto 1.6.9
 Dec 12 02:13:08 bbs synchronet: MQTT connecting to broker 127.0.0.1:1883
 

If you see a “failure: 14” message then your broker isn't running.

At this point you should see messages from sbbs being passed into the Mosquitto broker

``` 1670834270: Received PUBLISH from auto-FEB8177A-5A3E-5EE9-6AA3-9CE9BE593CA3 (d0, q0, r0, m0, 'sbbs/EOTLBBS/bbs.endofthelinebbs.com/web/log/7', ... (74 bytes)) 1670834270: Received PUBLISH from auto-FEB8177A-5A3E-5EE9-6AA3-9CE9BE593CA3 (d0, q0, r0, m0, 'sbbs/EOTLBBS/bbs.endofthelinebbs.com/web/log', ... (74 bytes)) ```

Now, to install a client to view the messages.

 wget https://www.emqx.com/en/downloads/MQTTX/v1.9.0/MQTTX_1.9.0_amd64.deb

then

 dpkg -i v1.9.0/MQTTX_1.9.0_amd64.deb

run mqttx to start the package.

Create a new connection to 127.0.0.1 port 1883 - you can keep everything else as defaults, though you may want to change the Client ID.

You should be connected to the broker. If you're not connected, click the “Connect” button. Now you can subscribe to messages.

Click “New Subscription”

Now enter the path which will be sbbs/ followed by your BBS's short name, EOTLBBS in my case. You'll find it on your logs.

 sbbs/EOTLBBS/#

The # at the end like similar to a wildcard and will show you all the messages.

Once they start flowing, you can narrow them down a little. Try this subscription.

sbbs/EOTLBBS/bbs.endofthelinebbs.com/client_count,sbbs/EOTLBBS/bbs.endofthelinebbs.com/socket_count,sbbs/EOTLBBS/bbs.endofthelinebbs.com/served

Replace EOTLBBS and bbs.endofthelinebbs.com accordingly with your own board's information.

As you can see, mqtt generates a lot of messages so if you need to save bandwidth, it is best to run the broker and clients on the same server.

This is just a quick and dirty howto to get you going if you want to try out mqtt in sbbs. Feel free to edit and refine.

One more tip, if you're starting sbbs from systemd (and why wouldn't you be?) you will want to ensure mosquitto starts before sbbs. There are several ways to accomplish this.

Changing the sbbs service file “Unit” entry for Wanted= is how I will do it, though not tested as yet).

 [Unit]
 Description=Synchronet BBS service
 Documentation=man:sbbs
 After=syslog.target network.target mosquitto.service
 

After making changes to your sbbs service file, Be sure to run

 systemctl daemon-reload

See Also