dev_kevin
@kevinanderson25 · Se unió el julio 2025
Backend developer · software · new to IoT
- Temas
- 5
- Respuestas
- 38
- Puntos
- 0
Respuestas de foro creadas
Deployed the median on the boards and this rule on Monday. 3 e-mails all week, each one a dispenser that was actually almost empty. The supervisor asked if she can get the toilet roll ones in the morning only, but that’s a problem for next week.
Traducido del English por IA ·
No soy usuario de Edge, pero ¿no podrías montar una VPN desde el router hasta tu oficina? Eso es lo que hicimos una vez para una aplicación web.
Not an Edge user, but couldn’t you run a VPN from the router back to your office? That’s what we did for a web app once.
Traducido del English por IA ·
Perdón, pregunta de principiante: ¿qué es el catálogo? ¿Es algo que se configura en el perfil?
Sorry, newbie question, what’s the catalogue? Is that something you set up in the profile?
The «8 channels times every SF in parallel» bit is what I was missing. Bought one with Basics Station support, followed the Connect a Basics Station gateway page, it showed Online within a minute. Our two test sensors at the far end of the office come in at around -105 dBm, fine for now.
Traducido del English por IA ·
¿Es seguro pulsar Parada de emergencia una vez para ver qué hace? No quiero que deje de almacenarse los datos de nuestros dispositivos.
Is it safe to press Emergency stop once to see what it does? I don’t want our device data to stop being stored.
Traducido del English por IA ·
Soy nuevo en el lado del hardware, pero llevo años trabajando con protocolos serie por software, y esto se puede simular con paridad. El noveno bit se envía en el lugar donde iría el bit de paridad. Linux admite paridad «stick» mediante el indicador CMSPAR: con PARENB|CMSPAR|PARODD el bit de paridad siempre es 1 (mark); sin PARODD, siempre es 0 (space).Así que: configurar paridad mark, escribir el byte de dirección, esperar a que salga (tcdrain), cambiar a paridad space y escribir los bytes de datos. En Python:
import termios, serial
CMSPAR = 0o10000000000
s = serial.Serial('/dev/ttyAMA0', 9600)
def set_bit9(on):
a = termios.tcgetattr(s.fd)
a[2] |= termios.PARENB | CMSPAR
a[2] = a[2] | termios.PARODD if on else a[2] & ~termios.PARODD
termios.tcsetattr(s.fd, termios.TCSADRAIN, a)
set_bit9(True); s.write(bytes([0x03])); s.flush()
set_bit9(False); s.write(bytes([0x10, 0x00]))
La recepción es la parte más incómoda: active PARMRK e INPCK, y un byte con la paridad «incorrecta» llega precedido por 0xFF 0x00, lo que indica su noveno bit. A 9600 baudios, el tiempo entre el byte de dirección y los de datos tiene una pequeña pausa por el cambio, aunque a la mayoría de los dispositivos antiguos no les importa. Use el UART PL011 (disable-bt), no el mini UART, porque el mini UART no tiene paridad.Luego, cada indicador se envía como un hijo, algo como {«scale-1»: {«values»: {«kg»: 12.45}}} en v1/gw/telemetry.
I’m new to the hardware side but I did serial protocol work in software for years, and you can fake this with parity. The 9th bit is sent where the parity bit would be. Linux supports «stick» parity through the CMSPAR flag: with PARENB|CMSPAR|PARODD the parity bit is always 1 (mark), without PARODD it’s always 0 (space).
So: set mark parity, write the address byte, wait for it to leave (tcdrain), switch to space parity, write the data bytes. In Python:
import termios, serial
CMSPAR = 0o10000000000
s = serial.Serial('/dev/ttyAMA0', 9600)
def set_bit9(on):
a = termios.tcgetattr(s.fd)
a[2] |= termios.PARENB | CMSPAR
a[2] = a[2] | termios.PARODD if on else a[2] & ~termios.PARODD
termios.tcsetattr(s.fd, termios.TCSADRAIN, a)
set_bit9(True); s.write(bytes([0x03])); s.flush()
set_bit9(False); s.write(bytes([0x10, 0x00]))
Receiving is the uglier half: turn on PARMRK and INPCK and a byte with the «wrong» parity arrives prefixed with 0xFF 0x00, which tells you its 9th bit. At 9600 the timing between the address and the data bytes gets a small gap from switching, most old devices don’t care. Use the PL011 UART (disable-bt), not the mini UART, the mini UART has no parity.
Then each indicator goes out as a child, something like {«scale-1»: {«values»: {«kg»: 12.45}}} on v1/gw/telemetry.
Traducido del English por IA ·
¿ttyAMA0 es algo USB? Siempre pensé que los nombres ACM/USB eran para USB.
Is ttyAMA0 a USB thing? I always thought ACM/USB names were for USB.
Traducido del English por IA ·
Eran dos errores: el token y la parte /tenant/<tenantId> que faltaba (al tener la clave salió un 404 una vez, y luego lo vi). Ahora funciona cada 30 s con una clave de solo lectura limitada a nuestra IP. El zumbador sonó esta mañana cuando lo llenaron, así que funciona.
That was two bugs, the token and the missing /tenant/<tenantId> bit (got a 404 once I had the key, then saw it). Running at 30 s now with a read-only key locked to our IP. Buzzer went off this morning when they filled it, so it works.
The payload isn’t null-terminated, so reading it as a C string runs past the end. That’s the random number.
Traducido del English por IA ·
¿Qué es MQTT-SN, es un MQTT diferente?
What is MQTT-SN, is it a different MQTT?
What happens to the cumulative count when the ESP reboots? It starts at 0 again.
Traducido del English por IA ·
Tienes razón, la conexión saliente es más limpia. Retiro mi consejo sobre el reenvío de puertos.
Fair enough, outbound is cleaner. Taking my port forwarding advice back.
Traducido del English por IA ·
El reenvío de puertos en el router funciona, lo hice una vez para una cámara. Solo elige un puerto alto.
Port forwarding on the router works, I did that for a camera once. Just pick a high port.
Could you only send the battery value once an hour? Then it can’t flap as much.
Is the antenna actually an 868 one? The 915 ones look the same.

