guild icon
Toit
#LoRa/LoRaWAN finding the right devices to use
Thread channel in help
diego.ar
diego.ar 03/03/2023 06:21 PM
Hi there, thanks in advance for any help
I need to run some tests to evaluate the LoRa protocol, and i have been checking a bit on Toit language and i see it would be great to use it on the project. I dont see at a first glance any device ESP32 based that could be used, to run Toit on it and also with LoRa capabilities, is this possible? can you suggest any PCB that could be used for this purpose? On the other hand, i have some TTGO boards that implement LoRa and even are based on ESP32, i guess i cant run Toit over this kind of boards, this correct?
Thank you, looking forward to an answer.. cheers
Oliver M
Oliver M 03/03/2023 07:41 PM
The TTGO T-BEAM has both an ESP32 and LoRa.
Oliver M
Oliver M 03/03/2023 07:41 PM
And I'm running Toit on one. Though not using LoRa myself atm
floitsch
floitsch 03/03/2023 07:56 PM
We had LoRa running at some point, but there aren't any public drivers at the moment.
I don't think the protocol is particularly difficult though.

And as @Oliver M said: pretty much all ESP32 boards should run Toit. It's then just a matter of getting the LoRa part to work.
diego.ar
diego.ar 03/03/2023 09:30 PM
thank you, i'm using TTGO TBEAM as well, great to hear toit runs ok
ill keep doing
bitphlipphar
bitphlipphar 03/04/2023 08:54 AM
I think we have some (pretty old) LoRa driver code somewhere. Probably for the RFM95. It might serve as inspiration.
bitphlipphar
bitphlipphar 03/04/2023 08:55 AM
At least that is also a SPI-based driver IIRC.
diego.ar
diego.ar 03/07/2023 06:18 PM
thanks for the response, good to hear there is a LoRa driver, even it is for a RFM95, would be really helpful.. i guess ttgo tbeam comes with a semtech SX127x .. pls let me know if this driver is avaialble for download
bitphlipphar
bitphlipphar 03/07/2023 06:20 PM
@diego.ar I'll find the bits tomorrow and see if they still compile :🙂:
diego.ar
diego.ar 03/07/2023 06:29 PM
sure great @bitphlipphar
looking forward to your comments
bitphlipphar
bitphlipphar 03/08/2023 01:25 PM
GitHub Gist: instantly share code, notes, and snippets.
diego.ar
diego.ar 03/08/2023 11:10 PM
great @bitphlipphar ill see what becomes easier.. tweak the code to make it work on a semtech sx127x or get a esp32 board with a rfm95 and try this driver as it is now
ill let you know either way, thks
diego.ar
diego.ar 03/11/2023 08:07 PM
hey @Oliver M after doing the right configs ive got toit running on the TTGO TBeam boards.. thks
👍3
diego.ar
diego.ar 05/09/2023 02:38 AM
Hey guys, i would like to give it a try to the SX1276 chip, in order to send/recevice messages using LoRa on a toit program.. i have been checking the code you provided for the RFM95 chip, i detail (below) the code analysis i could perform, really i dont know where to start to adapt the code and make it work for the SX1276; any help and/or guidance is very much appreciated

Here my comments/notes after reading the code:


RFM95 Toit driver

Code overview:

361 lines of code
Uses gpio, monitor, serial and spi librarys

- line 9, main block configures spi, device and lora device
- line 23, read task, just prints/acknowledges whatever is received
- line 28, main loop, sends "hello world" + counter, sleeps 1sec
- line 35 to 89, constants config
- line 98: constructor device/serial.Device
- line 135: setmode method
- line 142: write method
- line 172: read method

- line 204 to 361, the rest of the methods of the RFM95 class

istransmitting:
set_coding_rate4 denominator:
set_preamble_length length:
set_spreading_factor sf:
set_signal_bandwidth sbw:
get_signal_bandwidth:
enable_crc:
disable_crc:
get_spreading_factor:
explicit_headermode:
implicit_headermode:
set_txpower level boost:
setfrequency hz:
setOCP mA:
set_ldoflag:
sleep_:
(edited)
diego.ar
diego.ar 05/15/2023 01:39 AM
hello @bitphlipphar @floitsch @Oliver M after making some small adjusts on the code of the RFM95 driver, it works fine for a SX1276 based PCB.. thank you regards
💪1
bitphlipphar
bitphlipphar 05/15/2023 03:55 AM
That's great, @diego.ar!
🙌1
16 messages in total