tuxphone / CubeCellRepeater

Small repeater node for the meshtastic project.
35 stars 6 forks source link

Lora.h compatibility support #2

Closed retrodime closed 2 months ago

retrodime commented 3 years ago

Hello, I personally don't have a CubeCell.I was thinking about making one version that can support the universal LoRa.h library as many devices use it and I think is not a big deal.

I want to run it on this board https://www.banggood.com/LILYGO-TTGO-ESP32-SX1276-LoRa-915MHz-bluetooth-WIFI-Lora-Internet-Antenna-Development-Board-Module-p-1545114.html?rmmds=search&cur_warehouse=CN

Basically I don't know how to program because I would do it myself.......

Anyway the final version is so cool.I wish I can make it work on my TTGO

ghost commented 3 years ago

Yeah, I am also looking for a LoRa.h universal library support

ghost commented 3 years ago

https://pastebin.com/N8vwy78t I tried, I really tried, but I also don't know how to make this work. -I don't know how to put a ttgo in a battery sleep state

And I get an error that I know that is a piece of cake to solve, but is out of my knoledge.Maybe the author can look at my code and give him so ideeas(But I am sure he knows way too much and won't need it)

tuxphone commented 3 years ago

You can't see it in the code, but it depends on the the radio.h (and radio.c) driver of the original cubecell board. The OnRxDone, OnTxDone and OnTxTimeOut functions are "callbacks" of events of this specific code. The radio.h is already included by the arduino standard environment, so i just have to init the Radio and configure it.

The LoRa.h is a different driver for the LoRa hardware.

If you just need a repeater for meshtastic to extend your range and you have a spare ESP32 T-Beam or Heltec - just put the original meshstastic firmware on it and drop it where you need it. The mesh in itself will repeat your messages.

My code is for the case that you dont want to use a full fledged ESP32 with 100% mesh functionality, but instead just want to extend the range of your meshtastic board by putting a cubecell repeater in a spot with good reception.

It just takes the packet and re-send it. No more, no less. A mesh node will look into the packet and possibly answer with information about known other hosts and such. The CubeCell Repeater just re-sends the packages without knowledge of the content.

I think the TTGOs are supported by the Meshtastic project, so give it a try.

ghost commented 3 years ago

1.Some TTGO's do not have an Oled, however it's supported by meshtastic(I think).The thing is that I need a remote-configured repeater and basically it should change channels on the go.Basically you will be able to change settings throught lora messages.

2.The LoRa.h supports all the sx 127x chips.Your code supports all the sx 126x lora chips.I personally use an sx 127x board that is not supported by meshtastic and it uses SX 127x lora module.

So yeah, I think it would be cool to have the repeater code to work with LoRa.h lib for the boards that are not supported by meshtastic.

tuxphone commented 3 years ago

Hello, just to let you know: i did see your post. I do not have a quick fix for your problem.

  1. I do have a T-Beam without OLED - it's running meshtastic. You have to extract the Bluetooth pairing code from the serial output of the T-Beam. Once paired with the phone it's just running without need of an OLED.

  2. I do believe the Meshtastic IS supporting sx1276.

  3. The lora.h : I guess you are right. A "universal" repeater (with a bit support for Meshtastic regarding the finding of the correct settings) would be a good idea. I do think the "universal" repeater part is alreday done by someone somewhere, but why not doing it again :-) BUT it would be a different project. I'm not exactly planning it for the near future, but i will think about doing it.