SenseCAP M1 Gateway to TTN

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.

May I ask, can you share or confirm that you repurposed M1 according this guide?
GitHub - seeed-lora/WM1302-doc I still killed 7h during weekend tried to get online GW.

there was theory that TTN is not reachable, but it is

nmap eu1.cloud.thethings.network
Starting Nmap 7.93 ( https://nmap.org ) at 2024-02-18 21:29 EET
Nmap scan report for eu1.cloud.thethings.network (63.34.215.128)
Host is up (0.053s latency).
Other addresses for eu1.cloud.thethings.network (not scanned): 52.212.223.226
rDNS record for 63.34.215.128: ec2-63-34-215-128.eu-west-1.compute.amazonaws.com
Not shown: 997 filtered tcp ports (no-response)
PORT     STATE SERVICE
80/tcp   open  http
443/tcp  open  https
8888/tcp open  sun-answerbook

Nmap done: 1 IP address (1 host up) scanned in 5.00 seconds

somehwre read that no need to open any ports, as all " magic" happens auto in bground.

Thanks!

from rpi terminal →

##### 2024-02-18 19:20:57 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: 1 (125 bytes)
# PUSH_DATA acknowledged: 100.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (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): 90726994
# 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] ###
# Invalid time reference (age: 1708284057 sec)
# no valid GPS coordinates available yet
### Concentrator temperature: 27 C ###
##### END #####

JSON up: {"stat":{"time":"2024-02-18 19:20:57 GMT","rxnb":0,"rxok":0,"rxfw":0,"ackr":100.0,"dwnb":0,"txnb":0,"temp":26.9}}
INFO: [up] PUSH_ACK received in 51 ms
INFO: [down] PULL_ACK received in 52 ms
INFO: [down] PULL_ACK received in 54 ms

Looks perfectly healthy.

I guess TTN does not report it to be online? What is the gateway_ID listed in your configuration json file(s)?

Evening… tnx for replay!

I did all from 0 again… this time I made ID as:

“gateway_conf”: {
“gateway_ID”: “gaa-868”,
/* change with default server address/ports */
“server_address”: “eu1.cloud.thethings.network”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,

and I run it with screen in background, as I had theory that I made mistake it by making as sevice, this time ran as “script in bground”

$ screen -ls
There are screens on:
9030.pts-0.m1box (18/02/24 23:52:08) (Attached)
8267.pts-0.m1box (18/02/24 22:03:13) (Detached)
8217.ttn (18/02/24 22:02:56) (Detached)
3 Sockets in /run/screen/S-pi.

my IP ends with XX.XX.3.189 maybe somebody can see it there something coming from it…
Thanks!

That should be the gateway EUI. So a hex number of 16 characters, not an alpha-numeric string.

1 Like

Looking at your post from ~2 days ago (console view) this one? :-
eui=00016c001ff1e21c

Note when registering in TTN Console GW ID cannot be re-used if gateway deleted, the GW EUI can/should be re-used (Devices often use the term “gateway id” or similar in their documentation/gui set up rather than “gateway eui” or wherever which can lead to confusion. In the Console GW ID is user (lower case) text to be used for convenient though at time of registration it will often suggest an option of the form “eui-aabbccddee…” e.g in this case “eui-00016c001ff1e21c”

1 Like