negan07 / ancistrus

Netgear's D7000 Nighthawk Router Experience Distributed Project
https://negan07.github.io/ancistrus/
GNU General Public License v2.0
66 stars 17 forks source link

UPS monitoring/alerting through NUT #10

Closed negan07 closed 3 years ago

negan07 commented 6 years ago

Integrated UPS monitoring/alerting through NUT

D7000 uses CPU: Broadcom BCM[9?]63138 @1ghz (DualCore ARM Cortex A9) CPUInfo Features : swp half thumb fastmult edsp tls

Further reading: https://wiki.openwrt.org/doc/hardware/soc/soc.broadcom.bcm63xx https://github.com/networkupstools/nut/

I am no expert and don't have much time, but have some systems/programming background so will try to follow your lead to share what I can.

http://networkupstools.org/

Software can be prepared but hardware needed for testing.

ComputaBloke commented 6 years ago

I have a CyberPower PowerBric needing usbhid-ups drivers. So planning on getting these from the OpenWRT mirror:

nut-driver-usbhid-ups_2.7.4-2_arm_cortex-a9.ipk
nut-web-cgi_2.7.4-2_arm_cortex-a9.ipk
nut_2.7.4-2_arm_cortex-a9.ipk

Currently blocked by OpenWRT compatibility, so opened #18 to look into it. Otherwise will have to compile/build our own NUT packages specifically for anc/D7000.

negan07 commented 6 years ago

Unfortunately 'nut' also a no-go through those OpenWRT packages anyway. Need that underlying libc, librt, libpthread, libgd. So like usb-modeswitch, will most likely need to look at independent source/compilation for nut.

Just reading Linux kernel for D7000 is: Linux version 3.4.11-rt19 (root@Debian) (gcc version 4.6.2 (Buildroot 2011.11-g00639bc-dirty) ) #2 SMP PREEMPT Wed Jan 3 09:48:00 CET 2018. So 7 years old! Apparently this is common for embedded-linux devices due to using Broadcom SDK .

Also OpenWRT 15.05 still used uclibc, but then moved to musl-libc, so definitely the latest 17.x streams won't be a compatible source, but there is still a slim chance to find compatible binary packages from older generations (will still need --force-depends).

Cracking this would be very useful since OpenWRT offers so much. Alternative being to cross-compile many packages to suit D7000 will not be much fun unless that can be automated in some fashion.

More to explore tomorrow... 👌

back from other issue