[Update] I got it working for the European Frequencies
After comparing both the codes and libraries I notice that jpmeijers’s example code used Arduino D12 pin to reset the RN module but nothing like that was found in the TheThingsNetwork library so I added the below code
pinMode(12, OUTPUT);
digitalWrite(12, LOW);
delay(500);
digitalWrite(12, HIGH);
right after initializing the setup() and before the serial begin lines.
This made the program work and I was able to get the output on the device page. But I tried the same for Indian frequency by changing TTN_FP_EU868
to TTN_FP_IN865_867
and then things dint work.
However, the serial monitor shows everything to be working fine
So I believe this has something to do with my gateway (Liard RG186). So Maybe I should start a separate thread for that