Skip to content
/ sx127x Public

📡 Radio driver for the Semtech SX127X LoRa transceiver working on contiki-ng operating system.

License

Notifications You must be signed in to change notification settings

tperale/sx127x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SX127X LoRa transceiver driver for contiki-ng OS

This driver was developped as a means of studying the effectiveness of the TSCH protocol in conjunction with LoRa.

Install

This driver is aimed to be included as a submodule of your contiki-ng project and must be refered in your project Makefile.

Run the following command in the folder where you want to include the driver.

git submodule add https://github.com/tperale/sx127x.git

How to use

If you add this driver in the /arch/dev/ folder of contiki-ng (where all the device driver should be) as a submodule, add the following line to your Makefile.

MODULES += $(CONTIKI_NG_DRIVERS_DIR)/sx127x/src

But you can add it whereever you want as long as you refer it from the makefile.

If you are using this driver in conjunction with contiki mac protocol you should make the driver available through the contiki NETSTACK and refer it in your project-conf.h file.

#define NETSTACK_CONF_RADIO sx1272_radio_driver

Using this driver with TSCH

This driver was developped to be used with the TSCH MAC protocol. Since LoRa is not supported out of the box by contiki some modification to the protocol were needed and are available in this patched version of contiki (tperale/contiki-ng) that allow longer timeslot to be used with precise transmission duration calculation.

#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE (uint8_t[]){ 0, 1, 2 }
extern int tsch_packet_duration(size_t len); 
#define TSCH_PACKET_DURATION(len) tsch_packet_duration(len) 

So far only three channels are implemented, see the wiki page for more informataion on channels.

Supported hardware

This driver was developped to work with the Zolertia RE-MOTE devboard but should work with any platform supported by contiki-ng. If you are using this driver with a different board make sure to modify the platform specific variable.

#define SX1272_SPI_CONTROLLER_CONF ...
#define SX1272_SPI_SCK_PORT_CONF ...
#define SX1272_SPI_SCK_CONF ...
#define SX1272_SPI_MISO_PORT_CONF ...
#define SX1272_SPI_MISO_CONF ...
#define SX1272_SPI_MOSI_PORT_CONF ...
#define SX1272_SPI_MOSI_CONF ...
#define SX1272_SPI_CS_PORT_CONF ...
#define SX1272_SPI_CS_CONF ...

More information on the Zolertia RE-MOTE platform specific pinout in the wiki page.

Credits

  • RIOT-OS providing bulletproof SX127X radio driver that served as inspiration while implementing this project.
  • contiki-ng
  • contiki-ng-lora project following the same goal as mine (test TSCH over LoRa)

About

📡 Radio driver for the Semtech SX127X LoRa transceiver working on contiki-ng operating system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages