Spreading factor, chips y símbolos: por qué mi trama de rastreador de 58 bytes nunca llega desde lejos
Traducido del English por IA ·
Otra vez rastreadores de remolques (los de batería de mi otro hilo ya funcionan, gracias). Estos envían GPS y algunos valores de sensores, 58 bytes, cada 10 minutos, sin confirmación, en EU868, conectados a nuestra pasarela LoRaWAN Hermetry en el techo del depósito.En el patio llega cada trama. Cuando un remolque está a unos pocos km, no veo nada en el registro de tramas, pero otro sensor de temperatura barato a una distancia similar sí llega bien. Su carga útil es de 11 bytes.Intenté documentarme y ahora me he atascado con el vocabulario: spreading factor, chips, símbolos, chirps. ¿Qué es realmente un chip y un símbolo, y por qué el tamaño de la carga útil importa para el alcance?
Trailer trackers again (the battery ones from my other thread are fine now, thanks). These ones send GPS + a few sensor values, 58 bytes, every 10 minutes, unconfirmed, EU868, joined to our Hermetry LoRaWAN gateway on the depot roof.
In the yard, every frame arrives. Once a trailer is a few km out, I see nothing in the frames log at all, but a different cheap temperature sensor at a similar distance gets through fine. Its payload is 11 bytes.
I tried to read up and now I’m stuck on vocabulary: spreading factor, chips, symbols, chirps. What actually is a chip and a symbol, and why would the payload size matter for range?
Traducido del English por IA ·
siguiendo el hilo, tampoco entiendo los chirps
following, I don’t understand chirps either
Traducido del English por IA ·
Pensaba que SF12 es solo una versión más lenta de SF7, lo mismo pero con más tiempo, ¿no?
I thought SF12 is just a slower version of SF7, same thing, more time?
Traducido del English por IA ·
Más o menos, sí Aisha, y ahí es de donde viene el problema de Kevin.LoRa envía un chirp, un tono que barre el canal de 125 kHz. Un símbolo es un chirp; el punto del barrido donde empieza codifica los datos. El factor de dispersión indica cuántos bits lleva un símbolo: SF7 lleva 7 bits y tiene 2^7 = 128 chips (pasos) por barrido, SF12 lleva 12 bits con 4096 chips. Cada paso superior casi duplica el tiempo en el aire, y el receptor dispone de más tiempo para extraer una señal débil del ruido, así que el alcance aumenta.En LoRaWAN son data rates. EU868: DR5 es SF7, DR0 es SF12. Los dispositivos lejanos necesitan DR0 a DR2, y a esas velocidades la carga útil de aplicación máxima es de 51 bytes. DR3 permite 115, DR4 y DR5 222. Tu trama de 58 bytes físicamente no puede salir a las velocidades lentas, así que en cuanto el rastreador baja a SF10 o menos, la pila la rechaza o la trama se pierde, y nada llega al registro de tramas. Tu sensor de 11 bytes cabe en DR0.Dos soluciones. Empaqueta la carga útil por debajo de 51 bytes: lat/lng como int32 escalado en lugar de floats o texto, y la batería como un solo byte. Y para los rastreadores, desactiva ADR en su perfil: el servidor de red ajusta según los últimos 20 uplinks y un dispositivo en movimiento cambia más rápido que eso; configura el data rate en el firmware según la distancia. Tabla en Regions and frequency plans.
Roughly, yes Aisha, and that’s where Kevin’s problem comes from.
LoRa sends a chirp, a tone that sweeps across the 125 kHz channel. A symbol is one chirp; where in the sweep it starts encodes the data. The spreading factor says how many bits one symbol carries: SF7 carries 7 bits and has 2^7 = 128 chips (steps) per sweep, SF12 carries 12 bits with 4096 chips. Each step up roughly doubles the time on air, and the receiver gets more time to pull a weak signal out of the noise, so range goes up.
In LoRaWAN those are data rates. EU868: DR5 is SF7, DR0 is SF12. Far devices need DR0 to DR2, and at those rates the most application payload you can send is 51 bytes. DR3 allows 115, DR4 and DR5 222. Your 58-byte frame physically can’t go out at the slow rates, so as soon as the tracker drops to SF10 or below, the stack refuses or the frame is lost, and nothing reaches the frames log. Your 11-byte sensor fits at DR0.
Two fixes. Pack the payload under 51 bytes: lat/lng as scaled int32 instead of floats or text, battery as one byte. And for trackers, turn ADR off on their profile, the network server adjusts on the last 20 uplinks and a moving device changes faster than that; set the data rate in firmware by distance instead. Table on Regions and frequency plans.
Traducido del English por IA ·
Latitud/longitud como int32 × 1e6 ocupan 8 bytes en total, más que suficiente precisión para un trailer.
Lat/lng as int32 × 1e6 is 8 bytes for both, plenty precise for a trailer.
Traducido del English por IA ·
Vigila también la duración de la batería con SF12, cada trama tarda bastante más de un segundo en el aire.
Watch battery life at SF12 too, each frame is well over a second on air.
Traducido del English por IA ·
Lo reempaqueté a 23 bytes (el truco int32 de Daniel) y desactivé ADR en el perfil del tracker. Un remolque a 9 km llegó con SF11 toda la tarde. También por fin entiendo qué es un chip.
Repacked it to 23 bytes (Daniel’s int32 trick) and turned ADR off on the tracker profile. A trailer 9 km out came through on SF11 all afternoon. I also finally get what a chip is.
Traducido del English por IA ·
Buena explicación Ciaran, la guardo para el próximo nuevo compañero.
Good explanation Ciaran, saving this for the next new hire.
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

