Only receiving on channel 1 and 2 (WARN MAC command buffer not fully answered error on other channels)

Hi

i have installed the things stack 3.7.1 on a debian vm.
my mikrotik test gateway forwards all data to ttn and my vm.

now to the problem:
all data is received by ttn but my vm with the things stack only is receiving packets on channel index 1 and 2. my vm and the gateway are on the same subnet so no internet between.

if i switch my local vm to a vm with chirpstack installed, chirpstack is receiving all packets like ttn.

the gateways and nodes are in the EU868 frequency plan

the gateway receives all packets and forwards them to ttn.
but only packets on 868,3 and 868,5MHz are coming through to my tt stack vm.
packets on 867.3 or 867.5MHz are not seen

please help.
right now the tt stack server is useless but i dont want to go back to my chirpstack servers.

just found this error for the frequencies that are not shown:

stack_1 | WARN MAC command buffer not fully answered ack=false adr=true adr_ack_req=false bandwidth=125000 class_b=false dev_addr=26011061 device_uid=modularnode.modularnode001abp f_cnt_gap=3 f_cnt_reset=false f_opts_len=0 f_port=2 frequency=867300000 full_f_cnt_up=967 grpc_method=HandleUplink grpc_service=ttn.lorawan.v3.GsNs last_f_cnt_up=964 m_type=UNCONFIRMED_UP mac_count=0 mac_version=1.0.1 major=LORAWAN_R1 match_attempt=0 max_transmissions=3 namespace=networkserver pending_session=false phy_payload_len=42 received_at=2020-04-22 19:50:56.189607951 +0000 UTC request_id=01E6HQ2ZDXNDFH9JGCWG1RX9RN spreading_factor=7 supports_32_bit_f_cnt=true transmission=1 unanswered_request_count=8 uplink_f_cnt=967
stack_1 | INFO Finished unary call duration=1.208183ms error=error:pkg/networkserver:device_not_found (device not found) error_correlation_id=693344d005d6498398c1f74fc2f975e1 error_name=device_not_found error_namespace=pkg/networkserver grpc_code=NotFound grpc_method=HandleUplink grpc_service=ttn.lorawan.v3.GsNs namespace=grpc request_id=01E6HQ2ZDXNDFH9JGCWG1RX9RN

please help.
why only channel index 1 and 2 are working and 0, 3-7 not?

if i use telegraf and mqtt i only get packages for channel index 1 and 2

my telegraf job writes to a influxdb, this is the mqtt config:

[[inputs.mqtt_consumer]]
servers = [“tcp://domain:1883”]
qos = 0
connection_timeout = “30s”
topics = [ “v3/+/devices/+/up” ]
client_id = “ttnstack”
username = “xxx”
password = “XXX”
data_format = “json”

domain, username and password are ok in the real config

just tested mqttbox with the same results as using telegraf.
it looks like tt stack does not send all data via mqtt.

anyone with the same problem here?

how can i have a look in the tt stack what packages have been received?
my data and event boxes are all not working

in the webui i get:

image

the same package is going to TTN and a chirpstack server and is decoded without problems

the things stack gets this packages:
image

the gateway has more received:
image

if the package is not shown (channel index 3-7) i get a device not found error
image
why is the device not found when i see the id of the device in the log?

in the web ui i see this:
image
followed by this:
image

do i read i right?

the max datarate defined for EU868 is 5?
our nodes uses datarates up to 7.

why is the things stack reduced to only DR5?

Where are you reading that? And wouldn’t that better be posted as a new topic, or is it related to the other problem?

reading it here:

func init() {
	defaultChannels := []Channel{
		{
			Frequency:   868100000,
			MaxDataRate: ttnpb.DATA_RATE_5,
		},
		{
			Frequency:   868300000,
			MaxDataRate: ttnpb.DATA_RATE_5,
		},
		{
			Frequency:   868500000,
			MaxDataRate: ttnpb.DATA_RATE_5,
		},

it looks like that this WASN MAC failure only appears when sending with datarate higher than 5

That only defines the 3 default channels, as per the specifications:

The first three channels correspond to 868.1, 868.3, and 868.5 MHz / DR0 to DR5 and MUST be implemented in every end-device. Those default channels cannot be modified through the NewChannelReq command and guarantee a minimal common channel set between end devices and network gateways.

But if all is well, I assume your configuration defines more? (Please do, as otherwise the 3 default channels in your neighbourhood get far more traffic than the other channels.)

Note: I’ve not used V3. (It seems even the code defines more?)

That is interesting as I haven’t seen any nodes using dr6 (sf7/250khz) or sf7 (fsk) yet.
What are your experiences?

1 Like

Good catch, @kersing :slight_smile: The logs above show DR0…

Does that mean that, for DR6 or DR7 (or maybe you meant DR0 and DR1…?), channel 1 and 2 still work for you? Or don’t these work neither then?

Also: if related to the default channels, wouldn’t you expect things to work for all 3 of those, not 2 out of 3?

thank you all for your help.
the default datarate was set to DR0 in the node source code.
now i have it set to DR5 and all is working

But you might still be on to some bug for lower data rates?

i am testing right now with 3 nodes here.
until now all looks promising.

still having device not found error:

image
image

why do i get a device not found error when the DevAddr is the right one

That can happen if the MIC calculation for that device using the key doesn’t match. The uplink packet is not corrupted?

crc check for that package on the gateway is ok.
the same package is send to TTN, TheThingsStack and Chirpstack.

all servers except thethingsstack can use the package