temporaerhaus / ttn-ulm-feinstaub

TTN Ulm particulate matter sensor for Arduino (luftdaten.info project)
https://lora.ulm-digital.com
GNU Affero General Public License v3.0
18 stars 7 forks source link

error reading data! / One or more keys are of invalid length. #3

Closed tho-wa closed 6 years ago

tho-wa commented 6 years ago

Used AppEUI and Key from Console. In Serial Output following error is shown: "One or more keys are of invalid length". Regarding to google the key should be only 32 lenght, but the key in TheThings console is longer. Sensor data from SDS011 can also not be read successful, tried different sensors and cables. Any idea how to fix? Thanks Thomas

Started! EUI: 000xxx Battery: 3223 AppEUI: 0000000000000000 DevEUI: 000xxxx Data Rate: 5 RX Delay 1: 1000 RX Delay 2: 2000 Model: RN2483 Version: 1.0.1 Sending: mac set deveui 0004xxx Sending: mac set adr off One or more keys are of invalid length. Waking up SDS... Letting fan speed up and clean itself for a minute... Humidity: 36.60 Temperature: 29.10 Reading 10 samples of sensor data (some may fail)... error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! P2.5 median: 0.00 P10 median: 0.00 Sending data to TTN... Sending: mac tx uncnf 1 000000000xxx Response is not OK: not_joined Send command failed Sending SDS to sleep...

tho-wa commented 6 years ago

"One or more keys are of invalid length" solved. EUI was wrong.

dermatthias commented 6 years ago

Hard to debug withour any more information. What node are you using?

"The error reading data" looks like some connectors are not attached correctly or to a wrong serial port.

tho-wa commented 6 years ago

Hi Matthias, using TheThings Uno, SDS011 and DHT22. TTN connection is now fine, dht22 reading is ok, but no data from SDS011. Already used other SDS, used other cables, configured other TX/RX pins... SDS seems to have power, red led is blinking and fan is running permanent.

Serial output: Started! EUI: 000.... Battery: 3223 AppEUI: 70.... DevEUI: 00... Data Rate: 5 RX Delay 1: 1000 RX Delay 2: 2000 Model: RN2483 Version: 1.0.1 Sending: mac set deveui 000xxxx Sending: mac set adr off Sending: mac set deveui 000xxxxx Sending: mac set appeui 70xxxx Sending: mac set appkey 89xxxx Sending: mac save Sending: mac set rx2 3 869xxxx Sending: mac set ch drrange 1 0 6 Sending: mac set ch dcycle 0 799 Sending: mac set ch dcycle 1 799 Sending: mac set ch dcycle 2 799 Sending: mac set ch dcycle 3 799 Sending: mac set ch freq 3 867100000 Sending: mac set ch drrange 3 0 5 Sending: mac set ch status 3 on Sending: mac set ch dcycle 4 799 Sending: mac set ch freq 4 867300000 Sending: mac set ch drrange 4 0 5 Sending: mac set ch status 4 on Sending: mac set ch dcycle 5 799 Sending: mac set ch freq 5 867500000 Sending: mac set ch drrange 5 0 5 Sending: mac set ch status 5 on Sending: mac set ch dcycle 6 799 Sending: mac set ch freq 6 867700000 Sending: mac set ch drrange 6 0 5 Sending: mac set ch status 6 on Sending: mac set ch dcycle 7 799 Sending: mac set ch freq 7 867900000 Sending: mac set ch drrange 7 0 5 Sending: mac set ch status 7 on Sending: mac set pwridx 1 Sending: mac set retx 7 Sending: mac set dr 5 Sending: mac join otaa Join accepted. Status: 00000401 DevAddr: 260xxxx Waking up SDS... Letting fan speed up and clean itself for a minute... Humidity: 37.00 Temperature: 22.30 Reading 10 samples of sensor data (some may fail)... error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! error reading data! P2.5 median: 0.00 P10 median: 0.00 Sending data to TTN... Sending: mac tx uncnf 1 000000000E7408B6 Successful transmission Sending SDS to sleep...

tho-wa commented 6 years ago

Its now working. Seems to be related to defective wires in the frist attemp.