SenseCAP M1 Gateway to TTN

I’ve just been through this and got it working - ask me anything.
Things I found:
These PIN numbers worked for me:

SX1302_RESET_PIN=17     # SX1302 reset
SX1302_POWER_EN_PIN=18  # SX1302 power enable
SX1261_RESET_PIN=5     # SX1261 reset (LBT / Spectral Scan)
AD5338R_RESET_PIN=13    # AD5338R reset (full-duplex CN490 reference design)

I didn’t see this step in the instructions on the Github page but it seemed to be required:

./reset_lgw.sh start

The strangest thing was that I decided to copy the correct json config file to a new file just called “global_conf” and when I ran the packet forwarded script with this as the filename it sprang into life.

Anyway, as I say - happy to help as this thread is quite stale now.

Jonathan

1 Like

Just remembered - I also added a random EUI generated by a web page I found. I added this to both the TTN portal and to the config file near the end.

The reset pins match the ones which work for me. So I assume that the different pins mentioned by others are for different PI hats. My hat looks like the one on the manufacturer’s site.

Did you also get the error “TLS server certificate verification failed”? I had to download up-to-date certificates into tc.trust.

Unfortunately, I haven’t written down all the steps necessary to get it working :frowning:

I did the whole procedure but the gateway only comes online on TTN if I leave the command ./lora_pkt_fwd -c global_conf.json.sx1250.US915.USB
running in PUTTY, if I close the program it stops going online, what am I doing wrong?

The process is running in your login - when you quit, it quits.

You need to read up about launching processes in the background or using screen or setting it to start up on boot.

image

Any tutorials on how to do this? I activated this option but it didn’t work, I started learning this yesterday to transform my M1 into a TTN hahaha

Nothing to do with the raspi-config programme. You were in right direction when you were running Putty and starting the process manually. Once started just close your Putty connection (close the window) without breaking out of the programme and it should keep running. Problem will be if you shutdown as it sounds like you havent set the script to run it on start-up?

Exactly I don’t know how to run the script so it starts automatically

I hope someone can help me

There’s three ways of doing this.

  1. Use the command line with a & at the end to launch the process in the background
  2. Use something like screen to launch it and run it in the background
  3. Or set it up to run on startup which is the best option.

All of which are very extra extensively documented on Linux / RPi sites. There isn’t a quick “do this, do that” as it depends on your Pi, the distribution version, how your startup is set, what you are starting up - you need to read some tutorials and then apply it to your config.

Hello!

I am trying to repurpose Sensecap M1, with WM1303 EU868 GPIO seems smae, comaprng image.
https://usermanual.wiki/Seeed-Technology/WM1303A
and guides, combination this:

and

and output that I got:

INFO: [down] PULL_ACK received in 54 ms
INFO: [down] PULL_ACK received in 54 ms
INFO: [down] PULL_ACK received in 55 ms
INFO: [down] PULL_ACK received in 54 ms

##### 2024-02-15 20:49:03 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 0
# CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 0 (0 bytes)
# PUSH_DATA datagrams sent: 0 (0 bytes)
# PUSH_DATA acknowledged: 0.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 6 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
### SX1302 Status ###
# SX1302 counter (INST): 30717730
# SX1302 counter (PPS):  0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
#--------
src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
### Concentrator temperature: 27 C ###
##### END #####

on TTN console it is offline, any hings where could be problem, reading this forum back and forth… Thanks!

None, the status is not in real time and there are no errors in the log, you just need a device to get some traffic moving.

The picture is very nice but generally we can look at them on the vendors website. Unless you’ve modified it in some way?

1 Like

Thanks, for comment. Ok I will leave overnight and check tomorrow. Thanks!
picture… I added that as replay to one of posts, but made mistake, then deleted txt and left just pic. Pardon… let it be as FYI, to let other see that M1 comes also with WM1303

Do you have a device (a node) running that the GW will hear? Otherwise you will see no traffic being forwarded.

Can you show details? How have you set up/registered otherwise it is all speculation.

Can you show the GW json/config file… is it even connected to the Internet? If so is it pointed at the TTN server for your area? etc. (we assume the eu1 server at this point?) What backhaul are you using from Latvia, which packet-forwarder are you running, GW ID? GW EUI?.. and so on…

Hello!
thanks for replay.

a) No node, idea was to start gateway and then make node. But seem I can switch my learning path to node now and utilize gateways thata re nearby (I saw on map, that there are few);

b)
config file, standard this one →

with edited server part →

"gateway_conf": {
        "gateway_ID": "gaa-m1-868",
        /* change with default server address/ports */
        "server_address": "eu1.cloud.thethings.network",
        "serv_port_up": 1700,
        "serv_port_down": 1700,
        /* adjust the following parameters for your network */
        "keepalive_interval": 10,
        "stat_interval": 30,
        "push_timeout_ms": 100,
        /* forward only valid packets */
        "forward_crc_valid": true,
        "forward_crc_error": false,
        "forward_crc_disabled": false,
        /* GPS configuration */
        "gps_tty_path": "/dev/ttyS0",
        /* GPS reference coordinates */
        "ref_latitude": 56.946682874635975,
        "ref_longitude": 24.247206786396664,
        "ref_altitude": 6,
        /* Beaconing parameters */
        "beacon_period": 0,
        "beacon_freq_hz": 869525000,
        "beacon_datarate": 9,
        "beacon_bw_hz": 125000,
       "beacon_power": 14,
        "beacon_infodesc": 0
    },

    "debug_conf": {
        "ref_payload":[
            {"id": "0xCAFE1234"},
            {"id": "0xCAFE2345"}

I also tried jsut these lines as in one of examples, same, but currently those are commented out

//    "gateway_conf": {
//     "server_address": "eu1.cloud.thethings.network",
//     "serv_port_up": 1700,
//     "serv_port_down": 1700,
//     "servers": [
//      {
//       "server_address": "eu1.cloud.thethings.network",
//       "serv_port_up": 1700,
//       "serv_port_down": 1700,
//       "serv_enabled": true
//      }
//     ]
//#    }

c)
GPIO pins:

SX1302_RESET_PIN=17 # SX1302 reset
SX1302_POWER_EN_PIN=18 # SX1302 power enable
SX1261_RESET_PIN=5 # SX1261 reset (LBT / Spectral Scan)
AD5338R_RESET_PIN=13 # AD5338R reset (full-duplex CN490 reference design)

d) Global configuration
global_conf.json
global_conf.json (3.5 KB)

would be good for noobs to have Docker for gateway setup, like zigbee2mqtt, just point " antenna" and it work :smiley:

Nope, IMO that just shifts the ‘assumed’ knowledge and skill set required! And introduces a new class of Noob! I’m not a noob wrt LW or use of GW’s (dont think) but having to get into knowing about or using ‘Dockers’ would be a whole new area for many to have to get into! HW engineers, hackers, RF knowlegeable people, folk who just want to use COTS offerings etc. even sales, marketing and biz dev folks may all want to try and set up a GW - especially as we recommend having your own if looking to start playing with LW and use cases and there is no guarantee of a local community GW being available (access to GW console useful e.g. for debug) - but they may have zero interest or motivation in having to go off and learn how to use docker(s) 1st! :slight_smile: That said its always good to have a number of options and remember WE/YOU are the network…so if its a good idea perhaps you take the initiative and go create Docker implementation(s) and share for others with docker knowledge or interest in going down that route! :+1:

Having a Node generating traffic that is heard by your GW will certainly help you in setting up and seeing if/what is working…

1 Like

Lurching from one possible disaster to another - no one gets to make a node without having an active gateway.

I think both myself in the first reply and @Jeff-UK have made it clear that without a device to see some uplink action you’re not going to see much going on in the console.

But at minimum, do you see “Receive gateway status” in the gateway console?

The main database is reporting the id “gaa-m1-868” as not found - so something isn’t quite right.

Did you download the official global_conf.json from the gateway setup - that general ‘just works’.


By all means proceed with making a node, but do not rely on other peoples gateways because when making a node (and I’ve made a couple in my time) you need to be able to see the gateway console.

Also, using reverse psychology, you absolutely must find something on the internet that you like the look of and seems really cool and very probably the best thing ever and comes with a money off voucher or a discount or some other marketing led sales incentive. Then in a months time, come here to ask for help. The really dumb people are the ones that ask for advice on what to buy - so silly of them, they just don’t get the pleasure of endless frustration. Just say’n.

2 Likes

Evening.
this is how it looks from console, no update sin live data.

TTN

no offence, I did not meant to say bad, just comparing my beginner experiance, Docker is easy, all my home lab services are on Docker, clink-n-play :wink: no offence! And I both this Sensecap M1 just for Raspberry… but somehow I leaded here, learning evening… that is good!:slight_smile:

image
Short question: after updating my Raspian system on my Sensecap M1 , i get now most of the time this failure - but not always - sometimes i get the very normal circumstance. Due to the fact, that i did not change the network or ISP, i dont find the root cause - can anybody please give me a hint, where i could search for the solution?

The forum?

That error message was talked about a few days ago and comes up a couple of times a month.

The only solution is to move to Dublin on GigaBit Fibre.