Single Channel Packet Forwarder part 1 [Deprecated]

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:

Yes, please keep it available as modifying the hardware is a pain with wires terminating underneath the RFM adapter board.

I got a working gateway and a working node. I do receive packets from a unknown node but:

Why is my gateway not visible with the API or Mqtt on thethingsnetwork?
What can be the reason that I canā€™t see any packets from my working node?

Any help will be appreciated

Network seems to be down since yesterday evening

Continuing the discussion from Migrated demonstration back-end: restart packet forwarders:

So the single channel gateway needs a code change:

Change #define SERVER1 "54.229.214.112" to
#define SERVER1 "54.72.145.119" 

The code will probably be adjusted to use name resolving.

Note: I adjusted this post to contain the ā€œfinalā€ IP address so people donā€™t get confused by a post containing an adjustment that was only valid for an hour or so. A version of the single channel gateway with name resolving is on the way.

1 Like

Yes I changed the IP address and compiled againā€¦but at the moment it doesnā€™t work.
By the way I canā€™t ping that ip address

Shortly after I posted my message the IP address changed again :smirk:, it is now an ā€œelastic IPā€ which can be reused for future instances too. So the line should become:
#define SERVER1 "54.72.145.119"

Note that at the moment the API is not able to connect to the database:
> HTTP 200 OK
> Content-Type: application/json
> Allow: GET, HEAD, OPTIONS
> Vary: Accept
> {
> ā€œerrorā€: ā€œCannot connect to database!ā€
> }