Single Channel Packet Forwarder part 1 [Deprecated]

Still testing and getting rid of the last watchdog reset messages.
Patience please.

1 Like

thank you ,I’m in china,now the PI gateway works well,

How does the range of such SX1276-based gateway compare to “true” gateways?

(Lacking any TTN in my area, I’m trying to figure out if the bad range I get is caused by my node or my single channel gateway. I tried many spreading factors, all on channel 0, and both gateway and node are using a HopeRF RFM95W with a solid 8.6 cm wire soldered on the board as an antenna, with no explicit ground plane—which might be bad? All fine when in close range, but the maximum range is some 200 to 250 meters… But maybe that’s all to be expected?)

Just got a single chan gateway up and running (801F02FFFF7E56D1) with one node (02E00201) sending “Hello, world!” for a few test packets then turned off.

Node is a mega2650 w/ a Modtronix inair9b and gateway is a RPi model B rev 2 with another inair9b and the single_chan_pkt_fwd from github. Node will soon have a DHT22 temp/% rel humidity sensor for real data. Eventually hope to collect water quality readings from the nearby major river.

Lessons learned - The damnable RPi wiringPi pins (Actually love the RPi :slight_smile: took a while to sort out but ended up using:

// SX1272 - Raspberry connections
int ssPin = 10; // pin24 , SPI_CE0_N is GPIO08 and ‘10’ in gpio readall wPi column
int dio0 = 7; // pin7, GPIO07, 7 in wPi column, also labled GPIO04 in other pinouts
int RST = 0; // pin11, GPIO00, 0 in wPi column, also labled GPIO17 in other pinouts

and had to change ‘eth0’ to ‘wlan0’ in main.cpp and also tcpdump used to verify traffic off to thethingsnetwork. Anyway, getting the proper gpio pins worked out (using the gpio readall and testing with a scope - or an led/limit resistor would work also) was the breakthru in my case.

Hmmm, I did not change that, and uploading to TTN just works fine on WLAN. But I did have an ethernet cable connected at some point in time; maybe that matters.

Hi Arjen,

This depends very much on where the gateway (-antenna) and node are located. Although line of sIght (LoS) is not required for LoRa it does help a lot. My 1ch gateway also using 8,6 cm antenna is placed inside in the attic (about 6 meters above ground level) in a “city area”, also range isn’t that good but I do get up to 2 km when also the node is high (like on a bridge). I now also have an iMST iC800A gateway at the same location with a better antenna. This performs “somewhat” better but not dramatically. I did not get a greater maximum range, but do get little further in some area’s and reception is more reliable in close range (I have put my nodes on 1 channel for comparing this). This limited range is not a limitation of the iMST board, I know it can perform much better with a proper antenna on a good location,

I also see there is some “directional preference” for some area’s (this probably has to do with buildings nearby). My RFM95 based node with wire antenna gets up to 17 km range when talking to a Kerlink gateway (in “almost” LoS conditions).

I plan to get an antenna for the gateway up outside in the next weeks and hope to get some better range.

3 Likes

Hi,

I have published the code for the ESP8266 single channel gateway on the Things4U Github.

The draft documentation of the ESP8266 is also on the Things4U github pages.

Do not forget to use the webserver to monitor the server once it is not connected anymore to the Serial Monitor of Arduino IDE

8 Likes

Niice, wil try this weekend!

This looks really cool! Trying to compile the code … can you point me to where gBase64.h comes from?

me to :smile:
found some spare parts in the junkbox

Stupid me, sorry …

I changed the name from base64 to gBase64 as I had more versions around on my system. The base64 library is made by Adam Rudd, see details below.

So you either change its names to gBase64 like I did, or modify the header file in my sketch from gBase64.h to base64.h :smile: (if that works on your system).

name=base64
version=1.0.0
author=Adam Rudd
maintainer=Adam Rudd
sentence=A base64 library for the arduino platform, written in C
paragraph=
category=Data Processing
url=https://github.com/adamvr/arduino-base64
architectures=*

I made an extra comment in the .ino file

@platenspeler
Indeed really cool! Hardware is in the junkbox so …:grinning:
I am trying to compile the code as well. Your last answer solved the same issue i had, but now i get :

ESP-sc-gway:1122 error: 'setTime’was not declared in this scope
setTime((time_t)getNtpTime());
exit status 1
'weekday 'was not declared in this scope

@PH3V, you probably did not load the Time library.

name=Time
version=1.5
author=Michael Margolis
maintainer=Paul Stoffregen
sentence=Timekeeping functionality for Arduino
paragraph=Date and Time functions, with provisions to synchronize to external time sources like GPS and NTP (Internet). This library is often used together with TimeAlarms and DS1307RTC.
category=Timing
url=http://playground.arduino.cc/code/time
architectures=*

Maarten

Using base64.h didn’t work for me. The recent ESP Arduino code has a base64 with different function signatures which i couldn’t stop conflicting, so i had to rename the adamvr one to gBase64 like you had - in the properties file and rename the .h and .cpp file names, and also in the base64.cpp change include for avr/pgmspace.h to just pgmspace.h. (Doesn’t seem ideal so will look for a better way, maybe use the ESP/Arduino base64 functions?). Anyway, now:

WiFi connect to: BTHub5-72W5
WiFi connected. local IP address: 192.168.1.119
Wlan Connected
Connecting to UDP
Connection successful
MAC: 18:fe:34:9b:1d:e0:
SX1276 detected, starting.
Gateway ID: 18FE34FFFF9B1DE0, Listening at SF7 on 867.70 Mhz.

Woohoo!

1 Like

is there GPIO / memory free for a little I2C display ?

look what i found in some junkbox, the HLK-RM04 , maybe also usefull for a little gateway

There are more gpio pins available than wien using the ESP as an LMIC node. Dio 1 and 2 are not used. So i2c should be possible. I’m not aware of any memory limitations as well.
But as usual with the ESP you have to avoid any spurious watchdog resets in case your I2C code will take a lot of cpu time.

Maarten

Pictures?

Its using one of these SX1276 modules i’d just received in the post.

Nice, I have a pair of these modules as well. Good to know they work!

Maarten

NodeMCU single channel (test) gateway [beware that not all clone nodeMCU boards might fit]

NodeMCU -
RFM95 - http://www.ebay.com/itm/RFM92-RFM95-RFM96-868MHz-915MHz-433MHz-LoRa-TM-Wireless-Transceiver-Stable-/331749297679?var=&hash=item4d3dcc8e0f:m:mWs1_m5lf5MtHmJ3h4pyD7g

2 Likes