Here’s a bit more in-depth information, including about Repeaters, Routers, Antennas and Signal propagation.
The Right Role
Repeater and Router (and Router_Client) are device roles, set in the software of a node, and are not physically different devices. If you have a working meshtastic device, it can be set in either of these modes. That said, it’s generally advisable to only set your device to these roles if it’s in a suitable location, is appropriately set up and powered (see below for why).
A Repeater is a node which receives and passes on information (Rebroadcasts), and doesn’t do anything else. It won’t show up on your list of active nodes, even if you’re in range of it.
A Router/Router_Client can perform the same general function as a repeater but can also do more, including acting as a gateway to the broader network over MQTT. In this way it can be used to link groups of nodes in one area to those in another, by connecting to an online MQTT server (also called a Broker). This is usually done using a device which has built-in wifi. MQTT is explained in more detail here at the bottom of the page.
Repeaters invisible when they’re running – they don’t show up on the node list. Routers and Router_Clients are visible, and a Router_Client may also be acting as an actual Client, so they could have a person connected directly to them, making them a good role choice for a home-based node with a high position and good antenna. The Router_Client role maintains its wifi connection, so it’s the simplest method to create a Gateway to MQTT – The Router role disables wifi so the device would need to be physically connected to a computer or network to act as a gateway.
Both Repeaters and Routers get message priority over Clients – they Rebroadcast preferentially above other devices with she same signal strength.
Message Priority
Priority is not well explained in the docs so it’s worth giving you some idea of how it works.
- Node A sends a message.
- 2 other nodes receive that message. Let’s call them B and C.
- B is close to A, or for other reasons receives a stronger signal than C.
- All receiving nodes, on receiving the message, start a countdown clock… the time on that clock is related to the strength of the signal. The stronger the signal, the longer the clock.
- As node C had the weaker signal, its countdown is shorter, and it rebroadcasts the message first. B hears this rebroadcast and cancels its own plans to rebroadcast the message. If it didn’t hear it, it also rebroadcasts when its timer reaches zero.
- The other modifier to the timer is the device role. The Router role makes the clock shorter, increasing the likelihood that it will rebroadcast first. The Repeater role makes it even shorter again. This is how message priority is organised.
In this way, the message is propagated as far as possible through the mesh, instead of being passed around between multiple nodes which are all close to each other. Multiple receiving nodes in different directions, which all heard the the same original message but can’t hear each other, will not cancel each other’s rebroadcast, so the message will be propagated outwards in all directions.
Repeaters and Routers are preferred rebroadcasters, because it’s assumed they’re in the best locations (and by extension are the best set up in other ways such as power source and antenna) for this purpose. For this reason you should generally only use these roles on devices which have those characteristics, in order to maximise the efficiency of the mesh.
Repeater Setup
There are lots of different devices and combinations of parts you can use to build an effective repeater/router, depending on the specifics of your needs. For example, a perfectly good Router_Client or Client for your house (with wifi) can be put together with simple and cheap device such as a Heltec Stick Lite, especially when you add a better antenna. If you are going to use the Router or Router_client role, ensure you’re using a good antenna and have it as high as possible to provide most benefit to the mesh. Remember the default Client role still rebroadcasts and acts as a gateway to MQTT, so only use the Router_Client role if your setup and location makes this appropriate, especially if there are other fixed nodes near you.
There are other ways to build this, but I’m trying to make it simple, avoid soldering if possible, and keep the whole thing as cheap as I can (around $100 AUD is the target) while maximising the effectiveness of the device. To tide you over until it’s all locked down and tested, the main parts currently being tested are below. Use this list at your own risk – it’s not locked down yet – and double check the polarity of any battery you buy before you plug it in.
- Rak Wisblock starter kit – get AU915 $45 inc post at time of writing (on sale) but search around and see who is offering the best price today.
- Antenna – Cable Length 1m (you want SMA male, not the RP-SMA) $7.
- This has a stated gain of 6dbi which is ideal for a repeater or router, but perhaps not ideal for something on your car (which is interesting given this is made for a car). I explain antenna gain below, so maybe read that before selecting an antenna other than those suggested.
- The antenna the Rak Wisblock kit comes with is actually very good. As long as you don’t obstruct it, you’ll find it is very effective for most purposes. For a repeater, mounted in a fixed position … I’d want more gain than it has, which is why I’ve suggested getting something else.
- With this and many other antennas you’ll also need this:
IPEX to SMA pigtail – 1.13IPXK-SMAK $2 - For this antenna and also some others I use a small metal plate under the antenna – not so the magnet works (I glue it down) but so it has a bit of a ground plane which I found fixes the SWR as this antenna is designed to attach to a car. I use a sheet of thin steel or aluminium, but you can literally use a beer can cut open with scissors, then fold it in half for stiffness, then glue it down flat, horizontal, directly under your antenna.
- Antenna option 2 – or similar (there are lots, but watch you get one suited to 915 Mhz. – $7
This one comes with the IPEX to SMA Pigtail so you save a couple of bucks there too. Probably not iideal for long term outdoor use, not sure how it will like the Aussie sunshine over years, and I found possums may decide to eat it, but for a temporary deployment or to experiment it will be fine. - Antenna option 3 – or this one or this or similar. This type of colinear antenna is bit more expensive at $20-25 (or more) for the antenna, plus cables, but is far more solid than option 2, and well suited to outdoor long term deployment. This is the most common way to build a repeater, because many people who try option 1 (above) skip the ground plane and then complain the SWR is bad.
- IPEX to N-Type pigtail This is the $5 pigtail to fit the n-type connection on the antenna, mentioned above. You’ll want this at a length suitable for the box you’re using, while being as short as possible – I suggest 10 or 15cm.
- Or if you want to put your antenna on a pole instead of direct mounting it to your case you’ll want something like this to connect it (1m or less ideally – at 5m long you’ll lose about 45% of your signal so you’ll want a whole other type of cable for long runs). You will also need the IPEX to SMA pigtail to make this cable work, and then some mounting hardware to attach the antenna or possibly a mounting with a bracket to push it away from a surface. Also check out this and this for the same purpose I am testing a bunch of these to see what works best.
- Battery – 5000mah $15 << watch out, this may arrive with the wrong polarity (mine did) so you’ll need to cut, reverse and re-solder the wires – but I’m not sure how consistent the supply is.
- The RED (+ positive) should be towards the INSIDE of the board, the black towards the edge. With the ridge on the plug at the top as you plug it in, that makes red on the left, black on the right. Another image to help you. Sometimes the glue obscures the + sign on the board but it is there.
- Battery option 2 – as above check the polarity before using this as some of the images on this listing show it being wrong but the batteries that arrived when I bought them were correct and required no cutting or soldering.
- There are other battery options of course, like the ever popular 18650 (+ a holder for it or them in parallel + a JST PH 2.0mm 2 pin Plug (select 2P), and a bit of soldering) but stick to LiPo for simplicity (not LiFePo3 or anything else) because the Rak is designed to charge and run on the voltages a LiPo provides.
- Solar panel or similar – completely with Type C plug, about $17. This will plug straight into your Rak and charge your battery. Simple as that, no wiring required. There are other methods which wire direct to the SOLAR plug on the rak, which is more complex than just using the USB-C port, if you prefer.
- This cheaper, smaller panel at about $6 works great. Together with a little usb-c cable, it needs a bigger hole in the case to get that chunky plug through (or drill right at the seam). 2w might not seem enough but if it’s getting full sun and you don’t mount it vertically it works fine for a RAK device.
- Enclosure – 100-68-50-with ears $8 or similar. The Rak is surprisingly small so it’s mainly about the battery you choose and some space to stuff extra cable in there to get it out of the way. You can also 3d print a case – there are lots around.
- You’ll also need a drill, some glue or silicone, and some screws or whatever to mount the whole thing.
Total: About $100+GST
(depending on the antenna and battery you go for and what sales are on)
Drones and Balloons
I bought a Heltec Capsule (with GPS). For most Meshtastic purposes I have to say it’s complete garbage, as the battery will be dead flat in about an hour (or less). But as a repeater hanging off a kite or a drone, it’s quite useful given how small and light (and water resistant) it is.
I use this bracket to hang it under a DJI Mini 2 and it works quite well … turn it on, set to rebroadcast all, and send the drone up to maximum (legal, practical) height, and you have yourself a short-term repeater in the sky.
I have also used this holder to hang it from a kite which helped me get signal over an annoying hill which was in my way. A solid single string lifting kite with a long tail is the way, and I run mine with an 800m line on a reel so height isn’t really an issue… though reeling it back in takes quite a while. The battery life of the capsule is better suited to the drone, though, and I took to hanging a basic Rak with its patch antenna in a 3d printed case off my kite because it can happily sit up there for multiple hours.
Remote Administration
It is possible to remotely change the settings of a device from another device. You’ll have access to all the configuration and channel settings and can even reboot or shut down the device remotely. This is a must for a repeater or a router you can’t easily get to.
The old way, for firmware up to 2.4 is to create a channel on the device (just add it to the list at the bottom is fine) and call that channel “admin”, with a PSK, and put that same channel on another device. That’s it. You can now control A with B (and B with A) via their entry in the nodes list. Simple. Works great.
The Remote Management switch disables the ability to adjust your configuration from the device itself, allowing only remote administration – not local at all. The device still works as before, you can connect to it and send messages or whatever, but you can’t adjust the settings or channels locally – only remotely from another device. I guess this is good if you give a device to your kid and send them off with it, or maybe if you have a fleet of devices you hand out for an event, and you’re worried people will accidentally change the settings. I guess also if you had a public-access device connected over the web? For a repeater it’s a waste of time because someone stealing it can just do a hard reset.
Newer firmware (2.5+) changed this. With a new fw device, you can still control an old fw device, by adding the same admin channel as above. There is a switch in the Security configuration page to allow Legacy Admin Channel use. This works on SOME devices to allow an old-fw device to control a new-fw device using the admin channel. It is not required to be on for a new device to control an old one. In my testing this is buggy and it works on some devices as advertised, but others will not allow themselves to be controlled like this, even with the same controller device and on the same firmware… good luck.
Between newer fw devices, go to the Security configuration area in the Controller Device (the one you’ll use to control others) and copy out the Public Key. Do not touch the Private key. In the “slave” devices, those you need to remote control, paste that Public key you took into the Admin Key area of their Security configuration, via the Add button. You can only have 3 controller devices and they need to be set up in advance (or you could copy both the public’s and private key from one device to another, and have all your devices, or all of your ‘controller’ devices use the same key combination). If you test it at this point it may fail – here is what to do. Once it’s all set up on both devices, delete the entry for the other device in the other one’s database (both ways), either individually by selecting it and deleting, or by doing a NodeDB reset (big green button at the bottom of the config page). Wait until they reconnect on their own and they are in the node list again – during this ‘initial contact’ they will exchange the required information and it should work after that. Personally I have all the devices I carry forced to use the same public and private key combo, because I use more than 3 and I want them all to be able to remote control all of my repeaters and this is the only way.
Signal & Range
The current range record is 331km, with no more power output than any other device has. That was between two Rak Wisblock based devices, similar to the Repeater design described above.
In the Configuration of your device you’ll find a Range Test function to help you test your own devices in an automated way, by repeatedly sending its location from one device and logging the received messages on another (not all devices are capable of logging).
915Mhz is generally considered a high frequency (in fact an Ultra High Frequency – UHF), and the most effective way to increase range at this frequency is to increase height and maintain Line Of Sight (LOS) – that is, you need a clear, straight path from one device to another. This frequency is bad at crossing over hills and going down the other side, and so to maximise range, height is your friend. From mountain-top to mountain-top is an ideal test scenario for ultra-long-range unless you are into hot air ballooning or paragliding. The type of antenna you use will also be a factor, mainly whether or not yours is properly tuned for 915Mhz, but also your gain (see below for more about gain).
Antennas
This is just a primer – a basic summary. If you’re really into antennas, maybe Amateur Radio would also interest you – you’ll find me around as VK3TMO.
What is Gain?
Antennas are calculated (and sometimes tested) to have a particular gain. In our case this is usually represented by dBi, which will be a number usually between 2 and 13. I won’t go into the technical aspects here, but what you need to know is that gain isn’t free – it doesn’t create more signal – it just changes the ‘shape’ of your signal. Think of it like squashing a rubber ball between two plates, where the ball is the shape of the signal strength. As you increase the force squeezing the ball, while it starts as a sphere, at 2 dBi it’s a bit thicker in the middle, by 5 dBi it’s a hamburger, and by 13 dBi it looks like a frisbee.
At high gain, your signal may travel further (and your sensitivity to received signal may be higher), but the angle of your antenna is more important as it’s more directional. If you tilt your high gain antenna too high or too low, you’ll lose a lot of its effectiveness. This is why low gain antennas are often used on devices which change angle during use, such as those designed to be hand-held or live in a backpack, while high gain is mostly reserved for fixed locations.
Unidirectional antennas (often just called directional) have higher gain on one side than the other, and should be pointed directly at the other node you’re communicating with. They sometimes have arrows on them or even pistol grips to help with this. They’re usually used for direct links between devices in fixed locations, or for specific long-range communication where the relative location of the other node is known.
Omnidirectional antennas have roughly equal gain all the way around so someone behind them will get the same signal as someone in front. They may be a good option for a repeater, but remember if your gain is too high and you’re on top of a mountain, even if you can see down into the valley, you may be sending most of your signal over everyone’s head. Generally a middle-ground is preferred, and most people opt for a gain of between 4 and 8 dBi for a repeater at 915Mhz – 5.8 is a common recommendation and a common enough number you’ll find on outdoor fibreglass antennas.
Types of Antennas
There are lots of different antenna types compatible with your Meshtastic device. They range from small, low gain stumpy aerials just a couple of inches long, to large, high gain collinear fibreglass poles made for permanent outdoor use. There are also patch antennas (sometimes flexible, sometimes small panels which might fit inside the plastic case of your device), various directional antennas including yagis, panels, dishes and moxons, helicals (coils of wire) and even slot antennas which you can build yourself out of a flat sheet of metal as thin as aluminium foil. On top of all that, it’s even more complex than it seems, because there are 10x more antenna types than I’ve listed, more complexity (collinears are basically a bunch of small antennas in a row) and to confuse you further, that little black plastic antenna you’re using could have a simple helical coil of wire inside it, or something else entirely. There it lots more discussion of antennas on the Meshtastic discussion forums, and many people have tested available antennas and published their results.
Connectors
Your device may have has a tiny press-stud-like antenna connection on the circuit board with, confusingly, a lot of different names. IPEX, IPX, U.FL and less commonly MHF – are basically all the same thing. In the event you see IPEX1, IPEX4 etc – for every meshtastic device I know of, you want IPEX1 (1.0). Most people use an IPEX-SMA Pigtail (a pigtail is short cable with a plug on each end) and then connect their antenna to an SMA plug. The most common practice (you’ll find this in most if not all meshtastic devices for sale) is to use SMA-F (female) on the device end, which has threads on the outside, and a hole in the middle. This is then mated to an SMA-M (male) antenna, which has a pin in the centre but is threaded inside and screws onto the outside of the other plug.
To confuse people, the opposite arrangement also exists (thread on the outside but a pin in the middle), which is called RP-SMA (Reverse Polarity) but I suggest you stay away from standardising your gear on these if you can help it. I don’t know why RP-SMA exists and I wish it didn’t.
Instead of IPEX, you may have an SMA connector already on your device. Depending on your device, it may be using an IPEX-SMA Pigtail inside to achieve this (the T-Echo does this), or it may have the SMA soldered directly to the board (the T-beam does this). Every meshtastic device I know of uses standard SMA-F connectors or IPEX1 on the device end.
Indoor and hand-held nodes often use SMA antennas – the antenna itself has SMA-M on one end. Relatively small, magnetic mobile antennas made for cars often come with a length of coaxial cable and an SMA-M plug on the end, ready to go. Using one of these to get the antenna outside the car instead of inside with your device can make a huge difference to your range at a relatively low cost. Keep the cable length as short as practical as thin coax cable has high loss, especially at 915Mhz.
For outdoor and vehicle use, the N-type connector is often used. Like SMA, in most cases the Female type is on the device end, and the Male end is the antenna. N-type antennas include those which look like large fibreglass poles and are made for use in permanent outdoor deployments. Magnetic N-type bases also exist for use on vehicles, some with cable and SMA-M plugs ready to attach directly to your device, just like the magnetic mobile antennas mentioned earlier. IPEX-to-N type pigtails also exist if you’re building a repeater, for example.
Other antenna connection types also exist, including (although it’s very rare to see one at 915Mhz) this PL259 example (which is so rare it disappeared into the mists of time while I was editing this page, but I’ll leave the link up in case it comes back. Dammit I should have bought one when I saw it).
Any and all site feedback is welcome … [email protected]
Also check out my other free public projects including Getlost Maps – free topo maps of Australia.