Skip to content

FEAT | TNC over SPIΒ #48

@Habbie

Description

@Habbie

πŸš€ Feature Proposal

Have MeshTNC act

  • as an SPI peripheral to the controller (say, a raspi), speaking TNC in some useful framing that fits SPI
  • as an SPI controller to the LoRa chip (assuming it uses SPI, like most do)

So that devices in which SPI is available for addon hardware but serial is not, can speak to LoRa radios over SPI.

Motivation

Some devices (Lorawan/Helium gateways) have mini PCIe slots that expose SPI and maybe one more pin. To conveniently use an SX1262 with software like pyMC_Repeater, we need 3 more pins (RST, IRQ/DIO1, BUSY). But MeshTNC can be used by pyMC_Repeater over just 2 pins (serial), if I pretend flow control is not a thing. However, a raspi (which is in most of those gateways) cannot do HW UART over all SPI pins. While SW UART might work, I don't think it is very clean.

SPI, meanwhile, has built-in framing (even if that's a solved problem in TNC), so it seems like an interesting fit for the protocol. Between (say) pyMC_Repeater and MeshTNC, we'd need exactly 4 pins (MISO/MOSI/CLK/CS), and between MeshTNC and (say) SX1262, we can wire whatever pins we need on a single addon board.

This thought is not entirely finished. Questions and further thoughts very welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions