the active energy field is pretty sussy but it's just a 4-byte integer sucked off as 2 2-byte ones, $ printf '%4s\n' $(printf '%s\n' obase=16 58932 60 | bc) | tr ' ' 0 | tac | paste -sd\\0 | bc
399634 and that's what the LCD shows too

sysv message queues? kinda slick with it; world's most insane interface, natch, but
also thanks to @ThePhD's n3030 i can have enum or_we_504_msgtype : long { in c and c++ with -std=c2x, which makes this much less insane

and yes the raw format is 3c 00 0f f5 for 3`994`895 (0x003cf50f), so two LSB u16s pasted together MSBly, which is PDP-11 middle-endian. plus ça change
falling edge trigger feasible if i manage to talk to the GPIO
also lol the integration time on this meter really fucks it, mathematically it comes out to 1mA, i measured 848μA with a jumper

as elucidated by the (entirety of!) OR-WE-504_MODBUS_Registers_list.pdf ive finally managed to dig up. lets see!!!!!
register 6 is what the manual says, register 15 is what it returns the address when reading. save me from this hell


in that you need to broadcast the address change, not just send it, and they explicitly say to send it to the device
hey, guess what doesn't work in modern mbpoll, that i remember glancing through when initially trying to connect…
Some RTU devices need to get initialized to a certain address via the 0x00 broadcast address. But currently RTU_SLAVEADDR_MIN is defined as 1
lol. lmfao.
and i cant "emulate" the meter well enough by just reading from the USB/serial adapter
so i snapshotted the entire pool on my laptop and installed wine32 and mono and ms fonts and deleted my wine config because it wouldnt load
i cannot get it to work regardless of the arcana i do and how i torture it, despite posting the same data as the configger; i think its because of modbus's explicit precise inter-byte (inter-message? both?) sleeps that libmodbus boasts about not having
itll be in Attic/ for posterity but for my usecase i can just set the addresses and serials once manually :v
![$ make clean rm -f ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy $ make -j cc -std=c2x -I/usr/include/modbus -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-modbus.c -o ORNO-OR-WE-504-modbus cc -std=c2x -I/usr/include/modbus -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-gpio.c -o ORNO-OR-WE-505-gpio c++ -std=c++20 -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-snmp.cpp -o ORNO-OR-WE-504-snmp c++ -std=c++20 -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-snmp.cpp -o ORNO-OR-WE-505-snmp cp ORNO-OR-WE-dumpy.sh ORNO-OR-WE-dumpy $ file ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy ORNO-OR-WE-504-modbus: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=a58765009c288441, with debug_info, not stripped ORNO-OR-WE-505-gpio: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=dff6cd7a988f007d, with debug_info, not stripped ORNO-OR-WE-504-snmp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=1c805d687f14be15, with debug_info, not stripped ORNO-OR-WE-505-snmp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=42917d88e82d6e4d, with debug_info, not stripped ORNO-OR-WE-dumpy: POSIX shell script, ASCII text executable $ make clean rm -f ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy $ $ CPPFLAGS="-target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access" LDFLAGS=-L. make -j cc -std=c2x -I/usr/include/modbus -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-modbus.c -o ORNO-OR-WE-504-modbus cc -std=c2x -I/usr/include/modbus -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-gpio.c -o ORNO-OR-WE-505-gpio c++ -std=c++20 -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-snmp.cpp -o ORNO-OR-WE-504-snmp c++ -std=c++20 -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-snmp.cpp -o ORNO-OR-WE-505-snmp cp ORNO-OR-WE-dumpy.sh ORNO-OR-WE-dumpy $ file ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy ORNO-OR-WE-504-modbus: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=44fdf79bc38c0196, with debug_info, not stripped ORNO-OR-WE-505-gpio: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=74c95938f997db5b, with debug_info, not stripped ORNO-OR-WE-504-snmp: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=65f435484ede0393, with debug_info, not stripped ORNO-OR-WE-505-snmp: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=e7cf566d96f8f12d, with debug_info, not stripped ORNO-OR-WE-dumpy: POSIX shell script, ASCII text executable $ make clean rm -f ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy $ make -j cc -std=c2x -I/usr/include/modbus -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-modbus.c -o ORNO-OR-WE-504-modbus cc -std=c2x -I/usr/include/modbus -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-gpio.c -o ORNO-OR-WE-505-gpio c++ -std=c++20 -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-snmp.cpp -o ORNO-OR-WE-504-snmp c++ -std=c++20 -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-snmp.cpp -o ORNO-OR-WE-505-snmp cp ORNO-OR-WE-dumpy.sh ORNO-OR-WE-dumpy $ file ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy ORNO-OR-WE-504-modbus: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=a58765009c288441, with debug_info, not stripped ORNO-OR-WE-505-gpio: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=dff6cd7a988f007d, with debug_info, not stripped ORNO-OR-WE-504-snmp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=1c805d687f14be15, with debug_info, not stripped ORNO-OR-WE-505-snmp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[xxHash]=42917d88e82d6e4d, with debug_info, not stripped ORNO-OR-WE-dumpy: POSIX shell script, ASCII text executable $ make clean rm -f ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy $ $ CPPFLAGS="-target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access" LDFLAGS=-L. make -j cc -std=c2x -I/usr/include/modbus -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-modbus.c -o ORNO-OR-WE-504-modbus cc -std=c2x -I/usr/include/modbus -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-gpio.c -o ORNO-OR-WE-505-gpio c++ -std=c++20 -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-504-snmp.cpp -o ORNO-OR-WE-504-snmp c++ -std=c++20 -target arm-linux-gnueabi -Wno-atomic-alignment -Wno-unaligned-access -D_GNU_SOURCE -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -g -Wall -Wextra -L. -flto=full -fuse-ld=lld -Wl,--as-needed -lrt -latomic -lmodbus ORNO-OR-WE-505-snmp.cpp -o ORNO-OR-WE-505-snmp cp ORNO-OR-WE-dumpy.sh ORNO-OR-WE-dumpy $ file ORNO-OR-WE-504-modbus ORNO-OR-WE-505-gpio ORNO-OR-WE-504-snmp ORNO-OR-WE-505-snmp ORNO-OR-WE-dumpy ORNO-OR-WE-504-modbus: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=44fdf79bc38c0196, with debug_info, not stripped ORNO-OR-WE-505-gpio: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=74c95938f997db5b, with debug_info, not stripped ORNO-OR-WE-504-snmp: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=65f435484ede0393, with debug_info, not stripped ORNO-OR-WE-505-snmp: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[xxHash]=e7cf566d96f8f12d, with debug_info, not stripped ORNO-OR-WE-dumpy: POSIX shell script, ASCII text executable](https://staging.cohostcdn.org/attachment/92e58c7c-68fa-41e0-ba68-56b32b7c9b6e/a.png?width=675&dpr=1)
(the -L. is for libmodbus, im not installing armel-native packages just for this)
i also dont think i posted the shart link, if you also have some polish leccy meters (though I suspect the impulse driver will be relatively universal):

![#!/bin/sh base=.1.3.6.1.4.1.8072.9999.9999.1 get() { case "${get#$base}" in .0) echo $get echo STRING echo hello world ;; .1) echo $get echo INTEGER echo 8675309 ;; *) echo NONE ;; esac } while :; do read -r op case "$op" in get) read -r get echo "get $get (${get#$base})" | logger get ;; getnext) read -r get echo "getnext $get (${get#$base})" | logger case "${get#$base}" in .0) get=$base.1 get ;; .1) echo NONE ;; *) get=$base.0 get ;; esac ;; set) read -r val echo "set $val" | logger echo not-writable ;; PING) echo PONG ;; *) echo "HUH $op" | logger ;; esac done $ snmpwalk -v1 -c public localhost .1.3.6.1.4.1.8072.9999.9999 NET-SNMP-MIB::netSnmpPlaypen.1.0 = STRING: "hello world" NET-SNMP-MIB::netSnmpPlaypen.1.1 = INTEGER: 8675309 Feb 08 02:50:04 tarta Debian-snmp[2678083]: getnext .1.3.6.1.4.1.8072.9999.9999.1 () Feb 08 02:50:04 tarta Debian-snmp[2678085]: getnext .1.3.6.1.4.1.8072.9999.9999.1.0 (.0) Feb 08 02:50:04 tarta Debian-snmp[2678087]: getnext .1.3.6.1.4.1.8072.9999.9999.1.1 (.1) #!/bin/sh base=.1.3.6.1.4.1.8072.9999.9999.1 get() { case "${get#$base}" in .0) echo $get echo STRING echo hello world ;; .1) echo $get echo INTEGER echo 8675309 ;; *) echo NONE ;; esac } while :; do read -r op case "$op" in get) read -r get echo "get $get (${get#$base})" | logger get ;; getnext) read -r get echo "getnext $get (${get#$base})" | logger case "${get#$base}" in .0) get=$base.1 get ;; .1) echo NONE ;; *) get=$base.0 get ;; esac ;; set) read -r val echo "set $val" | logger echo not-writable ;; PING) echo PONG ;; *) echo "HUH $op" | logger ;; esac done $ snmpwalk -v1 -c public localhost .1.3.6.1.4.1.8072.9999.9999 NET-SNMP-MIB::netSnmpPlaypen.1.0 = STRING: "hello world" NET-SNMP-MIB::netSnmpPlaypen.1.1 = INTEGER: 8675309 Feb 08 02:50:04 tarta Debian-snmp[2678083]: getnext .1.3.6.1.4.1.8072.9999.9999.1 () Feb 08 02:50:04 tarta Debian-snmp[2678085]: getnext .1.3.6.1.4.1.8072.9999.9999.1.0 (.0) Feb 08 02:50:04 tarta Debian-snmp[2678087]: getnext .1.3.6.1.4.1.8072.9999.9999.1.1 (.1)](https://staging.cohostcdn.org/attachment/80c05c02-4672-4d03-9ee9-d99975a89f98/a.png?width=675&dpr=1)







![# ./lsgpio GPIO chip: gpiochip0, "pinctrl-bcm2835", 54 GPIO lines line 0: "ID_SDA" unused [input] line 1: "ID_SCL" unused [input] line 2: "SDA1" unused [input] line 3: "SCL1" unused [input] line 4: "GPIO_GCLK" unused [input] line 5: "GPIO5" unused [input] line 6: "GPIO6" unused [output] line 7: "SPI_CE1_N" unused [input] line 8: "SPI_CE0_N" unused [input] line 9: "SPI_MISO" unused [input] line 10: "SPI_MOSI" unused [input] line 11: "SPI_SCLK" unused [input] line 12: "GPIO12" unused [input] line 13: "GPIO13" unused [input] line 14: "TXD0" unused [input] line 15: "RXD0" unused [input] line 16: "GPIO16" unused [input] line 17: "GPIO17" unused [input] line 18: "GPIO18" unused [input] line 19: "GPIO19" unused [input] line 20: "GPIO20" unused [input] line 21: "GPIO21" unused [input] line 22: "GPIO22" unused [input] line 23: "GPIO23" unused [input] line 24: "GPIO24" unused [input] line 25: "GPIO25" unused [input] line 26: "GPIO26" unused [input] line 27: "GPIO27" unused [input] line 28: "SDA0" unused [input] line 29: "SCL0" unused [input] line 30: "CTS0" unused [input] line 31: "RTS0" unused [input] line 32: "TXD0" unused [input] line 33: "RXD0" unused [input] line 34: "SD1_CLK" unused [input] line 35: "SD1_CMD" unused [input] line 36: "SD1_DATA0" unused [input] line 37: "SD1_DATA1" unused [input] line 38: "SD1_DATA2" unused [input] line 39: "SD1_DATA3" unused [input] line 40: "CAM_GPIO1" unused [output] line 41: "WL_ON" "reset" [used, output, active-low] line 42: "NC" unused [input] line 43: "WIFI_CLK" unused [input] line 44: "CAM_GPIO0" unused [output] line 45: "BT_ON" "shutdown" [used, output] line 46: "HDMI_HPD_N" unused [input] line 47: "STATUS_LED_N" "ACT" [used, output, active-low] line 48: "SD_CLK_R" unused [input] line 49: "SD_CMD_R" unused [input] line 50: "SD_DATA0_R" unused [input] line 51: "SD_DATA1_R" unused [input] line 52: "SD_DATA2_R" unused [input] line 53: "SD_DATA3_R" unused [input] $ cc -target arm-linux-gnueabi -fuse-ld=lld lsgpio.c -std=gnu89 -olsgpio $ scp lsgpio ciastko-malinowe:/tmp/ lsgpio 100% 11KB 887.7KB/s 00:00 # ./lsgpio GPIO chip: gpiochip0, "pinctrl-bcm2835", 54 GPIO lines line 0: "ID_SDA" unused [input] line 1: "ID_SCL" unused [input] line 2: "SDA1" unused [input] line 3: "SCL1" unused [input] line 4: "GPIO_GCLK" unused [input] line 5: "GPIO5" unused [input] line 6: "GPIO6" unused [output] line 7: "SPI_CE1_N" unused [input] line 8: "SPI_CE0_N" unused [input] line 9: "SPI_MISO" unused [input] line 10: "SPI_MOSI" unused [input] line 11: "SPI_SCLK" unused [input] line 12: "GPIO12" unused [input] line 13: "GPIO13" unused [input] line 14: "TXD0" unused [input] line 15: "RXD0" unused [input] line 16: "GPIO16" unused [input] line 17: "GPIO17" unused [input] line 18: "GPIO18" unused [input] line 19: "GPIO19" unused [input] line 20: "GPIO20" unused [input] line 21: "GPIO21" unused [input] line 22: "GPIO22" unused [input] line 23: "GPIO23" unused [input] line 24: "GPIO24" unused [input] line 25: "GPIO25" unused [input] line 26: "GPIO26" unused [input] line 27: "GPIO27" unused [input] line 28: "SDA0" unused [input] line 29: "SCL0" unused [input] line 30: "CTS0" unused [input] line 31: "RTS0" unused [input] line 32: "TXD0" unused [input] line 33: "RXD0" unused [input] line 34: "SD1_CLK" unused [input] line 35: "SD1_CMD" unused [input] line 36: "SD1_DATA0" unused [input] line 37: "SD1_DATA1" unused [input] line 38: "SD1_DATA2" unused [input] line 39: "SD1_DATA3" unused [input] line 40: "CAM_GPIO1" unused [output] line 41: "WL_ON" "reset" [used, output, active-low] line 42: "NC" unused [input] line 43: "WIFI_CLK" unused [input] line 44: "CAM_GPIO0" unused [output] line 45: "BT_ON" "shutdown" [used, output] line 46: "HDMI_HPD_N" unused [input] line 47: "STATUS_LED_N" "ACT" [used, output, active-low] line 48: "SD_CLK_R" unused [input] line 49: "SD_CMD_R" unused [input] line 50: "SD_DATA0_R" unused [input] line 51: "SD_DATA1_R" unused [input] line 52: "SD_DATA2_R" unused [input] line 53: "SD_DATA3_R" unused [input] $ cc -target arm-linux-gnueabi -fuse-ld=lld lsgpio.c -std=gnu89 -olsgpio $ scp lsgpio ciastko-malinowe:/tmp/ lsgpio 100% 11KB 887.7KB/s 00:00](https://staging.cohostcdn.org/attachment/bd792aa4-b6b5-47bd-b9a5-0703434c3d49/a.png?width=675&dpr=1)
![# ls -l /proc/628/fd total 0 lrwx------ 1 root root 64 Feb 13 01:13 0 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 1 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 2 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 3 -> /dev/gpiochip0 lr-x------ 1 root root 64 Feb 13 01:13 4 -> anon_inode:gpio-line # ./lsgpio GPIO chip: gpiochip0, "pinctrl-bcm2835", 54 GPIO lines line 0: "ID_SDA" unused [input] line 1: "ID_SCL" unused [input] line 2: "SDA1" unused [input] line 3: "SCL1" unused [input] line 4: "GPIO_GCLK" unused [input] line 5: "GPIO5" "ORNO-OR-WE-505-gpio.c" [used, input, pull-up, falling-edge] line 6: "GPIO6" "ORNO-OR-WE-505-gpio.c" [used, input, pull-up, falling-edge] line 7: "SPI_CE1_N" unused [input] line 8: "SPI_CE0_N" unused [input] # ls -l /proc/628/fd total 0 lrwx------ 1 root root 64 Feb 13 01:13 0 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 1 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 2 -> /dev/pts/0 lrwx------ 1 root root 64 Feb 13 01:13 3 -> /dev/gpiochip0 lr-x------ 1 root root 64 Feb 13 01:13 4 -> anon_inode:gpio-line # ./lsgpio GPIO chip: gpiochip0, "pinctrl-bcm2835", 54 GPIO lines line 0: "ID_SDA" unused [input] line 1: "ID_SCL" unused [input] line 2: "SDA1" unused [input] line 3: "SCL1" unused [input] line 4: "GPIO_GCLK" unused [input] line 5: "GPIO5" "ORNO-OR-WE-505-gpio.c" [used, input, pull-up, falling-edge] line 6: "GPIO6" "ORNO-OR-WE-505-gpio.c" [used, input, pull-up, falling-edge] line 7: "SPI_CE1_N" unused [input] line 8: "SPI_CE0_N" unused [input]](https://staging.cohostcdn.org/attachment/0847e7c7-35eb-4b9f-8daa-33cbdb32c55e/a.png?width=675&dpr=1)
![8727791207292: RISING, id=5; globl=327; line=250 8727800689236: RISING, id=5; globl=328; line=251 8729787476572: RISING, id=5; globl=329; line=252 8730941790801: FALLING, id=5; globl=330; line=253 8730981647567: RISING, id=5; globl=331; line=254 8736190990070: FALLING, id=5; globl=332; line=255 8736226159864: RISING, id=5; globl=333; line=256 8741373791820: FALLING, id=5; globl=334; line=257 8741411011604: RISING, id=5; globl=335; line=258 8746745687565: FALLING, id=5; globl=336; line=259 8746785222335: RISING, id=5; globl=337; line=260 8752114056428: FALLING, id=5; globl=338; line=261 8752149506222: RISING, id=5; globl=339; line=262 8757472371445: FALLING, id=5; globl=340; line=263 8757508872234: RISING, id=5; globl=341; line=264 8762741961069: FALLING, id=5; globl=342; line=265 8762778444859: RISING, id=5; globl=343; line=266 8767903493404: FALLING, id=5; globl=344; line=267 8767943418175: RISING, id=5; globl=345; line=268 8773150439337: FALLING, id=5; globl=346; line=269 8773187927122: RISING, id=5; globl=347; line=270 8778439499118: FALLING, id=5; globl=348; line=271 8778477556901: RISING, id=5; globl=349; line=272 8783644308468: FALLING, id=5; globl=350; line=273 8783682221253: RISING, id=5; globl=351; line=274 8788846570918: FALLING, id=5; globl=352; line=275 8788881956717: RISING, id=5; globl=353; line=276 8794113482087: FALLING, id=5; globl=354; line=277 8794151590871: RISING, id=5; globl=355; line=278 8799424078095: FALLING, id=5; globl=356; line=279 8799460906888: RISING, id=5; globl=357; line=280 8804655557635: FALLING, id=5; globl=358; line=281 8804695127412: RISING, id=5; globl=359; line=282 8809919810073: FALLING, id=5; globl=360; line=283 8809959774849: RISING, id=5; globl=361; line=284 8815110984004: FALLING, id=5; globl=362; line=285 8815149546788: RISING, id=5; globl=363; line=286 8820410901408: FALLING, id=5; globl=364; line=287 8820449187194: RISING, id=5; globl=365; line=288 8825669579123: FALLING, id=5; globl=366; line=289 8825708522907: RISING, id=5; globl=367; line=290 8830975998655: FALLING, id=5; globl=368; line=291 8831012754451: RISING, id=5; globl=369; line=292 8836162080933: FALLING, id=5; globl=370; line=293 8836197672736: RISING, id=5; globl=371; line=294 8841474862589: FALLING, id=5; globl=372; line=295 8841511900384: RISING, id=5; globl=373; line=296 8846786019333: FALLING, id=5; globl=374; line=297 8846821218139: RISING, id=5; globl=375; line=298 8852041677460: FALLING, id=5; globl=376; line=299 8852080720246: RISING, id=5; globl=377; line=300 ^Z [1]+ Stopped ./ORNO-OR-WE-505-gpio /dupaninka /dev/gpiochip0 nabijaczleweli@ciastko-malinowe:/tmp$ 8727791207292: RISING, id=5; globl=327; line=250 8727800689236: RISING, id=5; globl=328; line=251 8729787476572: RISING, id=5; globl=329; line=252 8730941790801: FALLING, id=5; globl=330; line=253 8730981647567: RISING, id=5; globl=331; line=254 8736190990070: FALLING, id=5; globl=332; line=255 8736226159864: RISING, id=5; globl=333; line=256 8741373791820: FALLING, id=5; globl=334; line=257 8741411011604: RISING, id=5; globl=335; line=258 8746745687565: FALLING, id=5; globl=336; line=259 8746785222335: RISING, id=5; globl=337; line=260 8752114056428: FALLING, id=5; globl=338; line=261 8752149506222: RISING, id=5; globl=339; line=262 8757472371445: FALLING, id=5; globl=340; line=263 8757508872234: RISING, id=5; globl=341; line=264 8762741961069: FALLING, id=5; globl=342; line=265 8762778444859: RISING, id=5; globl=343; line=266 8767903493404: FALLING, id=5; globl=344; line=267 8767943418175: RISING, id=5; globl=345; line=268 8773150439337: FALLING, id=5; globl=346; line=269 8773187927122: RISING, id=5; globl=347; line=270 8778439499118: FALLING, id=5; globl=348; line=271 8778477556901: RISING, id=5; globl=349; line=272 8783644308468: FALLING, id=5; globl=350; line=273 8783682221253: RISING, id=5; globl=351; line=274 8788846570918: FALLING, id=5; globl=352; line=275 8788881956717: RISING, id=5; globl=353; line=276 8794113482087: FALLING, id=5; globl=354; line=277 8794151590871: RISING, id=5; globl=355; line=278 8799424078095: FALLING, id=5; globl=356; line=279 8799460906888: RISING, id=5; globl=357; line=280 8804655557635: FALLING, id=5; globl=358; line=281 8804695127412: RISING, id=5; globl=359; line=282 8809919810073: FALLING, id=5; globl=360; line=283 8809959774849: RISING, id=5; globl=361; line=284 8815110984004: FALLING, id=5; globl=362; line=285 8815149546788: RISING, id=5; globl=363; line=286 8820410901408: FALLING, id=5; globl=364; line=287 8820449187194: RISING, id=5; globl=365; line=288 8825669579123: FALLING, id=5; globl=366; line=289 8825708522907: RISING, id=5; globl=367; line=290 8830975998655: FALLING, id=5; globl=368; line=291 8831012754451: RISING, id=5; globl=369; line=292 8836162080933: FALLING, id=5; globl=370; line=293 8836197672736: RISING, id=5; globl=371; line=294 8841474862589: FALLING, id=5; globl=372; line=295 8841511900384: RISING, id=5; globl=373; line=296 8846786019333: FALLING, id=5; globl=374; line=297 8846821218139: RISING, id=5; globl=375; line=298 8852041677460: FALLING, id=5; globl=376; line=299 8852080720246: RISING, id=5; globl=377; line=300 ^Z [1]+ Stopped ./ORNO-OR-WE-505-gpio /dupaninka /dev/gpiochip0 nabijaczleweli@ciastko-malinowe:/tmp$](https://staging.cohostcdn.org/attachment/19b78b40-ff71-4af8-8114-199c0325705f/a.png?width=675&dpr=1)