Single Channel Packet Forwarder part 1 [Deprecated]

I could not wait for the other boards, so I built one with the xbee board. now I can change the radios easily.
thanks @Thomas for the code
but it forwards packages only all 8 minutes. is that working as designed???
it would also be nice if the message would be visible in plain in the local output.

1 Like

@Thomas or somebody else familiar with the code …
following the (shortened) output from my gateways console and from the node REST.
as mentioned above, I see all 30 seconds a status update but only all 8 minutes a package receive although I send with my node each minute.
could please somebody give me an explanation or an advice/instruction to patch the code?
I didn’t there seen any “delay” .
Thanks!
.
indent preformatted text by 4 spaces

stat update: {“stat”:{“time”:“2015-12-17 07:23:30 GMT”,“lati”:47.43000,“long”:8.54000,“alti”:450,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:0.0,“dwnb”:0,“txnb”:0,“pfrm”:“Single Channel Gateway”,“mail”:“mail@me.ch”,“desc”:“my private development server”}}
Packet RSSI: -97, RSSI: -116, SNR: 9, Length: 63
rxpk update: {“rxpk”:[{“tmst”:3869498330,“chan”:0,“rfch”:0,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9,“rssi”:-97,“size”:63,“data”:“QKoBSFoA7wEB8N5cvB9g2WCKU0aGAS/o7Z5HiolUjz8LaqQCH7yhHBvFGlonf6lButBuLxcha6flouZ0AFI0”}]}
stat update: {“stat”:{“time”:“2015-12-17 07:24:00 GMT”,“lati”:47.43000,“long”:8.54000,“alti”:450,“rxnb”:1,“rxok”:1,“rxfw”:0,“ackr”:0.0,“dwnb”:0,“txnb”:0,“pfrm”:“Single Channel Gateway”,“mail”:“mail@me.ch”,“desc”:“my private development server”}}

{
    "time": "2015-12-17T08:10:13.699Z",
    "data_plain": "2015/12/17 08:11 4725.764N  832.437E              ",
    "gateway_eui": "B827EBFFFFE05FEF",
    "data": "MjAxNS8xMi8xNyAwODoxMSA0NzI1Ljc2NE4gIDgzMi40MzdFICAgICAgICAgICAgICA=",
    "data_raw": "QKoBSFoAHwIB/aBdU8ruNpft4Ev1jUbwYPrqVTcsLkdQ8l16mNY2KLwGUYR7idwVy6mhMLXaFmtJZgdFlhw2",
    "node_eui": "5A4801AA"
},

Hi @ursm

It might help if you provide (a link to) the source code you are using.

Ar you using sendReqAck or send, what channel/frequency are you using?

node: https://github.com/tftelkamp/arduino-lmic-v1.5 with reading/sending GPS-position
gateway: https://github.com/tftelkamp/single_chan_pkt_fwd unmodified
to make it clear: on a “real” gateway I see all messages (each minute), only with this Single Channel Gateway was this phenomena
node log from a real gateway in Zurich:
indent preformatted text by 4 spaces

{
    "time": "2015-12-15T18:09:53.460Z",
    "data_plain": "2015/12/15 18:11 4723.521N  830.888E              ",
    "gateway_eui": "FFFEB827EBA00A83",
    "data": "MjAxNS8xMi8xNSAxODoxMSA0NzIzLjUyMU4gIDgzMC44ODhFICAgICAgICAgICAgICA=",
    "data_raw": "QKoBSFoAKQAB//+vfSjIJGNG0vrZFQYZkyFRGcmXmR65+Qzx46JXWNCzcuwZApjUvzxdu7ZrN0qw+p4YFHUF",
    "node_eui": "5A4801AA"
},

Are you able to monitor the serial port output? If your sketch is based on thethingsnetwork-send-v1.ino then it will log the channel on which it is sending. My guess is that it uses several frequencies. As this is a Single Channel Gateway only 1 frequency is monitored / received.

Your node is sending at 8 frequencies, your gateway is receiving at only 1, hence the one packet per 8 minutes.

This is not a real gateway, it is for testing purposes. It is LoRaWAN compatible, but not compliant.

1 Like

reading and understanding the headline is always a good idea.
and I did not recognize that the node changes the channel each time it sends a packet.
thanks @Thomas , @Batilan for their explanation

1 Like

@Thomas
Should we give the Testing gateway a specific mac-adress?
https://www.thethingsnetwork.org/forum/t/www-ttnmap-org-alpha/891/3

Maybe something start / end → MAC: “1CHA” ??

@popcorn Please don’t make up your own prefixes. The single channel gateway now uses MAC-48 to EUI-64 conversion for the gateway ID.

Gateways send a platform field in their stat updates, that can be used to identify the type. We should make that available in the API for this purpose.

Thanks. I will wait a bit for that :D.

Hi. Can I adjust it to 915 MHz just editing line 74

from:
uint32_t freq = 868100000; // in Mhz! (868.1)

to
uint32_t freq = 915000000; // in Mhz! (915)

vidal

Hi Vidal,

Yes, that should work. You probably want to set the single channel center to 915.1 Mhz then (it is 125 kHz wide).

Thomas

Another HopeRF SX1276 based packet forwarder is working fine.

One remark regarding wiring. WiringPi takes care of the SPI chip select itsself,
so there is no need to manually handle the chip select, if you connect nss to CE0
or CE1 (corresponds to CHANNEL=0 or CHANNEL=1 in WiringPi).

Found it out by accident, because initially I had connected reset to CE0 (bad idea).

Thanks for the remark, I had noted it too, it is a left-over from experimentation to get this to work. I’ll change it in wiring instructions, with a note, but leave the manual select in the code for a while to not break on existing hardware.

Hi,

Nice project but something wrong with my configuration:

I build the Single Channel Gateway with a RFM95W and a Raspberry Pi B+. The code is from https://github.com/tftelkamp/single_chan_pkt_fwd and running on Raspbian Wheezy.

When I start the package forwarder I get the error:

“Unrecognized Transceiver”

I’ve searched for that error and found in the main.cpp:

#####################
void SetupLoRa()
{

digitalWrite(RST, HIGH);
delay(100);
digitalWrite(RST, LOW);
delay(100);

byte version = readRegister(REG_VERSION);

if (version == 0x22) {
    // sx1272
    printf("SX1272 detected, starting.\n");
    sx1272 = true;
} else {
    // sx1276?
    digitalWrite(RST, LOW);
    delay(100);
    digitalWrite(RST, HIGH);
    delay(100);
    version = readRegister(REG_VERSION);
    if (version == 0x12) {
        // sx1276
        printf("SX1276 detected, starting.\n");
        sx1272 = false;
    } else {
        printf("Unrecognized transceiver.\n");
        //printf("Version: 0x%x\n",version);
        exit(1);
    }
}  

##############################

I thought that HopeRFM95W is compatible with the SX1276.
Any ideas what coud be wrong here?

Hi Marco,

Your setup looks fine, but most likely the wiring is not correct. It simply doesn’t see your RFM95W.

Hi Thomas,

Thank you for the reply,
I’m just going back upstairs to my workbench for checking the wires :joy:

Hi Thomas,

Yes, MISO was broken (the wire ;-).,and my Single Channel Gateway is working now!

OK, I have to admit, there are easier ways to attach a HopeRF module to your RPi but, I got an idea and then it is a nice challenge to design, print and assemble these parts.

whenim641 uploaded this image to

Printed parts

whenim641 uploaded this image to
.
whenim641 uploaded this image to
.
whenim641 uploaded this image to
.
whenim641 uploaded this image to

…and it looks like I’m recieving packets??..is there a node in the area?

rxpk update: {“rxpk”:[{“tmst”:3628397007,“chan”:0,“rfch”:0,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW 125”,“codr”:“4/5”,“lsnr”:10,“rssi”:-68,“size”:63,“data”:“QAE7AQKAJwAFAasyOToyYGXKRgV5eRRCqcwTa2KGQLODV9R1sCFaOnwJ Jg9kAYMboXDmFT9mPkUQkaHQvmTV”}]}

2 Likes

Hi Marco,

It certainly looks like there is a node in your area from your logging (line starting with “rxpk update:” indicate received packets.

Remember that your gateway only listens to one “channel”, while nodes switch channels constantly. This means you will see something like one in ten packets with the single channel gateway.

Nice setup, BTW. Mine looks like this:

Ernst

1 Like

Yeah, I’m curious who is sending. Nice setup…KIS (keep it simple :wink: