Simple Repeater Node, using a CubeCell

Hello, you got a bit unlucky, because the issue was only active some hours, then fixed.
Please download the main.cpp and config.h, upload and it should work.

Dont forget to set RegionCode and Channel Name.

FYI: Repeater is now working with the new RegionCodes of Meshtastic, see config.h for values.

Hi,
I’m a newbie here.

With this repeater example basically, you can repeat a specific chat, right? so you need to embed the secret for this chat.

There is no way to make a kind of generic repeater without digging into the detail of the encrypted dataset, right?

Thanks

You repeat a specific Channel, yes. But you do not have to have the secret for it. I set the psk just to remind me, that it would be a good idea to be able to decrypt the messages. Someday :grin:

You can set the psk in config.h to all Zero (after the initial 0x10) and still have a working repeater.

Packet ID and TO / FROM, want ack, hop limit are unencryped values.

2 Likes

Thank you for the updated files. I was able to replace and upload to CubeCell with correct config, however I am still only seeing the Setting up Radio and the config info.
Will the serial monitor show something else when it is repeating correctly?

So I’m confused here, does meshtastic not act as a repeater already? I’ve stationed one on my specific channel high up on a hill a few miles away, waiting on my third device to come today, but i thought i would be bouncing messages off of my node on the hill. Do I have things wrong?

1 Like

I believe you are correct, this is to use a CubeCell as a repeater.

1 Like

@datadrian You are correct. But the problem with CubeCells is, that they can’t run Meshtastic in its full majesty. But! They also do not have the bigger energy footprint of fullblown ESP32 boards with GPS.

So if you have a spare CubeCell and want to extend the range of your Mesh - you could think about using it as repeater station. I guess with the upcoming nrf52 boards it will become even more a special case, but still.

@tonyn79:
What is the exact CubeCell you are using? HTTC-AB01 (dev board), HTTC-AB02 (board with display, but without GPS), HTTC-AB02S (display+GPS) or one of the Capsules? Capsule with Solar Panel or without?

I’m running the code on dev board and a normal Capsule and it’s just working fine. If i know which board you are using i could try to figure out whats wrong.

Ok. I created a new platformio project, put the code in and compiled/uploaded. It works. The default env (devboard) is working for a normal capsule.

Let me walk you through it:

Download the zip from github:

Create a new project in platform.io , choose your board (enter “CubeCell” and search).
CCRepeater2

Open your downloaded zip file, put the platformio.ini and the /src directory in the platformio project directory, overwrite if prompted.
Chose the correct environment for your board (example shown for Capsule with solar panel

CCRepeater4

Upload and activate serial monitor.

I guess you already know all of the above, but i had the time :slight_smile:

PS: uploaded on a capsule_solar. Working… :slight_smile:
PPS: The 20 bytes message is a “im here and my NodeID is…” Message of a meshtastic node.

PPS:
And i put the Payload dump back in. It shows the received (encrypted) bytes hexadecimal

image

3 Likes

Great, let me walk through your instructions and get it reloaded. I am using the AB-02 with OLED, I do not need the OLED to work if that makes a difference.
Thank you for taking the time to help me get this up. I will report back once complete.

Success! It is loaded and passing packets! I guess it was that I was using the Arduino IDE. I did notice the the original ph.b was missing from the current git so I just added it from a previous download that I had. Thanks again. Let me know if there is anything I can do to help testing or furthering of your project.

You could test the /experimental/main.cpp

Added support for the OLED of DevBoard Plus (HTCC-AB02).

Very nice work! Uploaded working and monitoring it now. Very impressive.

A quick question as I can’t find the answer in the cubecell site.

Am I correct that to program the capsule I also need to get a dev board?

What size battery fits in the capsule?

Cheers

I don’t have my CubeCell’s yet but I am learning platformio.org on Visual Studio code.
First questions: in the config.h file,
I assume I modify line 3 per my region?

I assume all my other devices that are to be repeated must be on the same channel “name” – parameters (freq, sf, c/r, bandwidth). Everything looks like RadioInterface.cpp

If I leave all my other devices on default channel, Does line 4 Default repeater keep the same parameters as the default on the other devices? Anyway to change Over the Air ?
char MESHTASTIC_NAME[12] = {“Default”};

Since I don’t need to de-encrypt at the repeater device, Do I set the line 8 per your notes to ?
#define MESHTASTIC_PSK { 0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Yes that is where you want to edit your config. The only thing I changed was my region to US. All other options left as they were. I also left the psk line alone and it is working great. I am not sure about changing the name, I know that will effect your freq. I have to get some more nodes up to play with those settings.

@paulcart1

There is a special board for programming the capsules. You find it under Accessories - “debugging board”.
You could wire the capsule manually, but using the debug boards makes it much easier.

@ac8dg
First you check/modify your region.

Then you change your channel name and speed to the settings in your app. If your channel name is “test” you change it to “test”. If your speed setting ist “long range” you set it to “2”.

No need to change the PSK as it is not used.

And yes, the devices have to have all the same settings. The mesh (and the repeater) is listening to a specific frequency/SpreadingFactor/CodeRate setting. The repeater will only repeat packets which meet that setting.

The mesh will only react to packets meeting the setting AND meeting the PSK. PSK is created automagically by the app (distributed via Link/QR Code).

PS: If it looks like RadioInterface.h - thats fully intentional, because i want to be as close to meshtastic as i can be with the CubeCells. Even if it is not really needed.

1 Like

So far so good. I have had is running for a little over a week and it has worked great. I was only getting 400-450m without the repeater. Then it went up to 650m with the repeater set out.
I have ordered some replacement antennas and will try some more tests this weekend.

3 Likes

You can now store your Meshtastic link in the config.h and the channel settings (frequency, spread factor, code rate) are set automatically. All praise the protobuf!

I’m using CAD (channel activity detection) to determine if the radio should be set to receive mode.

  • check for activity for the time of 3 Lora Symbols (Lora Symbol time depends on the channel settings, for very long range it is 32.768ms, for medium range it is 1.024ms - yes only one milli :slight_smile: ).
  • If activity is detected, set radio to receive mode for the time of 500 lora symbols. That should be long enough for the longest possible transmission.
  • if a packet is received - retransmit it (and give feedback via serial, led, display - if wanted)
  • no activity detected: radio sleep, mcu sleep
  • the whole process will be triggered again by a timer which is set to a length of 10 lora symbols

One more thing:

I’m using my custom deep sleep code to sleep … deeper (and longer) than the factory code. Deep sleep is broken by gpio interrupt (signal from LoRa chip) or by the timer (see above).

https://github.com/tuxphone/CubeCellRepeater

The Repeater is not working for “medium range” setting due to the tight timings. It’s best for very long range and long range, but is working for short range, too.

3 Likes

Hello,

Thank you for your creation, i try tu setup a HTCC-AB01

As Hamradio user, i use non encrypted channels on EU 433
PRIMARY psk=unencrypted { “txPower”: 100, “modemConfig”: “Bw125Cr48Sf4096”, “psk”: “AA==”, “channelNum”: 4 }

The translation of channel URL gives wrong fréquencies / spreading factors / … when i’m in serial monitor mode on plaformio

Any suggestion ?

Have a great lora Day
Fabrice

Welcome to the community @F4GXP

CubeCell support was very limited based on a few users trying to get the minimum required code to fit within the memory limitations.

There has been a major update (1.2.x) that broke compatibility with the 1.1.x version I think this was based on.

I am not aware of anyone that has been keeping the CubeCell code up to date.

2 Likes