I am new to Lora technology. I am using a sx1272 Lora Module and I am trying to send and receive data to a Dragino Gateway. The problem is the sx1272 and Dragino use two different libraries and hence two different examples of codes. As a result, I can't send or receive data from the Gateway. This is the library I use for Dragino: https://github.com/Yveaux/RadioHead/tree/master/RadioHead and for the node, I am using: https://github.com/matthijskooijman/arduino-lmic I hope you help me with this.
RadioHead and LMiC are not meant to work together.
If you are trying to do a point to point connection, you may be able to use the RadioHead code on both devices (RadioHead is available for Arduino as well).
To build a WAN over LoRa, you should be using LoRaWAN code on both devices, ie, LMiC (LoRa MAC in C) on the node and LoRaWAN gateway software (typically called a "packet forwarder") on the Gateway.
However I believe the Dragino is not capable of being a true LoRaWAN gateway, as it has only a single channel node-class radio rather than a multi-channel gateway class radio. This may complicate things substantially. Still if you do some searching you'll find now aged examples for building a single channel LoRaWAN testbench gateway on a Raspberry Pi, which you should be able to port to your platform. The problem will be that you cannot use it in a specification-compliant manner, and would need to modify your node software to defeat the usual frequency hopping and reduce the output and/or duty cycle to fit under the greater restrictions typically applied to non-hopping devices.
Essentially, you're purchased two nodes but no gateway - although the larger of your nodes happens to be built into a Linux-based OpenWRT router, it still uses an Arduino-like ATmega328p to control a single-channel node-class radio chip.