Single Channel Packet Forwarder part 1 [Deprecated]

O, please make sure that you use channel 0 (868.1 Mhz frequency) at your Gateway. That is the most generic frequency, and I’m not sure if all new frequencies gave been added to the node sketch (would be sad if the Gateway is listening to a channel that the node will never send to).

Maarten

Yes. All you see is the software sending its 30 second statistics somewhere, and getting a reply. That would even happen if you’d remove the LoRa chip…

See the notes above about the gateway using a single channel, single spreading factor (yours is saying channel 0, SF7), while your node is sending on multiple channels (I see Send, txCnhl: 0 and Send, txCnhl: 1) and maybe also using a different spreading factor.

Also beware that the node saying Send, txCnhl: 0 does not mean it’s actually using 868.10 MHz; it only counts the configured channels (so, if one would only enable channel 1 and 3, 1 would show as 0 and 3 as 1) before sending, LMIC.txChnl actually refers to the previous channel that was used, 0 if no previous transmission happened yet.

See Matthijs’ example to explicitly set TTN frequencies. And if any channel other than 0 is already configured in some library, then you could disable it using LMIC_disableChannel(i).

Mmm, still no joy. Tried pulling out all the wires one by one. The gateway does seem to happily send the stats every 30 seconds, but it doesn’t start up after a power off/on without the wires plugged in correctly, and the same with the node which will only start up and get the “Event EV_TXCOMPLETE” after a send when the wires btw the SX1276 and ESp are correct. The only ones that don’t seem to matter are SX1276-REST to ESP/GPIO16 which can be left disconnected and SX1276-DIO2 to ESP/GPIO3 which i seem to have to leave disconnected or the ESP wont flash. Also tried swapping around which ESP/SX1276 is the gateway or node and either works the same. So given all that and that the node comes back “Event EV_TXCOMPLETE” when its wired up correctly it seems like the hardware is working ok?

The code for the Gateway and Node is exactly whats in the TTN repo, and as far as I can see both using SF7 - Gateway and Node. And the Gateway channel freq here.

Not sure about the comment “the node saying Send, txCnhl: 0 does not mean it’s actually using 868.10 MHz; it only counts the configured channels” - where do i check that?

With the comment " I found that the antenna pin on the RFM95 was not connected" - do you mean within the SX1276 module itself, so i’d need to remove the metal shielding cap on the module to check that?

No.

I used an adapter board (as you can see in the picture). You should only be concerned about the outer soldering pins.

EV_TXCOMPLETE may not be a guarantee that the message was actually sent over the air, but whenever I made a mistake in cabling or so, then normally I would not get that event.

I do not know what other LoRa devices you have in your area, but I would start making sure that I knew whether it is the node or the gateway that is not functioning properly (or both).

Maarten

No idea what other LoRa stuff is in my area (London, UK). Kind of hooked on this now. Or try some RFM95s like you use? I’ve lots of those white adapter boards, if i bought a couple of these, which would arrive early next week, would those spiral antennas from my China modules work just solder on to that?

I just got my single channel gateway to work. ESP8266 + RFM95W. Thanks a lot @platenspeler for all the effort to port the code to this platform. Very much appreciated. I think a new era in IoT has just dawned on us by providing us with a cheap way of making a LoRa gateway.

Crows nest that first ran a RFM95w TTN node, now running a gateway:

My single channel gateway uses exactly the same hardware as described in my post at: Node with ESP8266 and RFM95W

Indeed, channel 0 (868.1 MHz), SF 7, like your gateway log shows you.

But your node’s log shows it’s transmitting on at least two channels. Given @matthijs’ comment when his example sets up the channels:

Without this, only three base channels from the LoRaWAN specification are used

…and apparently lacking anything similar in @platenspeler’s example, I assume his code relies on those “three base channels”? Assuming that includes channel 0 (868.1 MHz), for testing just add:

LMIC_disableChannel(1);
LMIC_disableChannel(2);

But still then, assuming the base channels include channel 0 (868.1 MHz), some of the node’s transmissions should already use that, and hence be visible in the gateway.

Does the node’s pin mapping match?

Note that many SX127x modules only expose a single antenna connector and then use the SX127x’s RXTX pin and an onboard switcher to wire that single antenna connector to either transmission or reception, hence not needing the LMIC rxtx to control anything. See also Matthijs’ excellent documentation (but note that LMIC_UNUSED_PIN is a recent addition, not yet merged into every clone of Matthijs’ repo).

Note that it’s platenspeler’s repo, not TTN’s. Minor detail.

http://thethingsnetwork.org/map and http://thethingsnetwork.org/c/london with green being online and blue Kickstarter pledges—but the displayed range is just a configuration.

I’m make fork and add NiceRF LoRa1276 supporting (NiceRF modules have 2 additional pins: TXEN and RXEN)
I’m successfully received data from RN2483.

1 Like

@platenspeler
You said that DIO1 and DIO2 of the radio is not needed when setting up a gateway with the ESP module, freeing two pins on the module. The communication with the radio is done via SPI, which is a bus. Do you think we can add two more radio’s to the same bus, using the two free pins as chip-selects?

My thoughts are going in the direction of building a three channel, single datarate (single spreading factor) gateway, using three HopeRF RFM95w’s and one ESP8266. Do you think this will be possible?

Hi,

I was first thinking in the same direction, however I think it will be a major change in the software to keep track of all extra administration. Not only the DIO0 but also the slave select line is in general duplicated for every slave on the bus.

Since the ESP8266 only costs $2.70 or so, the same functionality can be achieved at little extra cost by just having 2 or more single channel gateways work in parallel.

This does mean multiple IP addresses but apart from that it works quite well. (I have 3 now: 2 ESP and one Raspberry).

The ESP-based gateway is super nice, it would make for a very handy testing device. Could you add a HOWTO to the new wiki on the DIY gateway section? https://github.com/TheThingsNetwork/wiki/commits/rewrite (currently, the way to edit this new wiki is to send a pull request)

Are the new address also valid for the Single Channel Gateway ??

  • #define SERVER1 “54.72.145.119” <-- works
  • #define SERVER1 “router.eu.thethings.network” <-- does not work
    I see the node message in the log, bt not in the REST framework

thanks Maarten it should be 40.114.249.243

Just as an FYI - I’ve spent quite a bit of time trying to get those SX1276 modules working, with no joy. Today a couple of RFM95W’s arrive in the post and connecting them up in place of those other modules and it all works fine right away. Yay. Would be interested though if anyone else can manage to get those other modules working.

I guess you do this on the Raspberry based one? It does not have DNS support. You have to add the IP address of the new router. The ESP8266-based single channel gateway does correctly resolve hostnames.

By the way, I have done some coding for the Raspberry version that adds DNS support and some other features. But I think that @Thomas was also planning those functions.

Maarten

@platenspeler Thanks Maarten! now it works

@torntrousers,

I also have very good experience with the simple RFM95 modules. They do what you expect them to do. I found for example the “luxe” Australian InAir9 modules more difficult at times.

Maarten

@ursm,

I guess I have to make a new version of the ESP8266 version on GitHub one of these days (the old name will still work over the next weeks). If you want to make the change yourself: Change the .h file and update the _TTNSERVER like this:

#define _TTNSERVER "router.eu.thethings.network"

(or to your own region of course).

Maarten

1 Like

just on time tnx :sunglasses:

ESP8266 project prototyping board

1 Like

Wow :sunglasses:

Great work. Thanks for sharing.
Do you know how many devices can be managed at the same time by this single channel gateway?