On Wed, June 8, 2016 03:33, Johan Huldtgren wrote: [...] > > ok, on the off chance that this was an amd64 vs i386 issue (unlikely but > figured it couldn't hurt to try) I installed the latest amd64 snap on a > different host and updated ports (I had apcupsd installed here in client > mode), attached the UPS and swapped the config file to the server one, > but alas the results are the same. Must be an issue with my UPS and the > new code I guess.
Just a guess but may be you need to use modbus driver instead of usb? > On 6/7/16 08:12, Stuart Henderson wrote: >>I am pretty sure you will have the broken behaviour with 3.4.14 on >> the old kernel too, which would suggest that there's a problem with >> apcupsd's generic usb code either on OpenBSD or in your configuration >> (e.g. with your UPS etc). >> >> The easiest case would probably be if you can find someone who has >> a working 3.4.14 on -current. If so, I'd install the same, obtain debug >> logs and compare with theirs. If there's nothing obvious then maybe >> ask upstream for suggestions. > > So I started poking around, and this might be relevant > > # apctest > 2016-06-07 20:18:30 apctest 3.14.14 (31 May 2016) openbsd > Checking configuration ... > sharenet.type = Network & ShareUPS Disabled > cable.type = USB Cable > mode.type = USB UPS Driver > Setting up the port ... > apctest FATAL ERROR in apctest.c at line 321 > Unable to open UPS device. > If apcupsd or apctest is already running, > please stop it and run this program again. > apctest error termination completed > > (it should be noted nothing was running at this time, I had just > rebooted the host with apcupsd disabled) > > Further when setting the debug high and running it on the console I get > this: > > # apcupsd -d 666 > 0.000 apcupsd: apcupsd.c:156 Options parsed. > 0.001 apcupsd: apcconfig.c:755 After config scriptdir: "/etc/apcupsd" > 0.001 apcupsd: apcconfig.c:756 After config pwrfailpath: "/etc/apcupsd" > 0.001 apcupsd: apcconfig.c:757 After config nologinpath: "/etc" > 0.001 apcupsd: apcupsd.c:179 Config file /etc/apcupsd/apcupsd.conf > processed. > 0.001 apcupsd: newups.c:102 write_lock at drivers.c:109 > 0.001 apcupsd: drivers.c:111 Looking for driver: usb > 0.001 apcupsd: drivers.c:115 Driver dumb is configured. > 0.001 apcupsd: drivers.c:115 Driver apcsmart is configured. > 0.001 apcupsd: drivers.c:115 Driver net is configured. > 0.001 apcupsd: drivers.c:115 Driver usb is configured. > 0.002 apcupsd: drivers.c:118 Driver usb found and attached. > 0.002 apcupsd: newups.c:108 write_unlock at drivers.c:135 > 0.002 apcupsd: drivers.c:137 Driver ptr=0xb223d800 > 0.002 apcupsd: drivers.c:138 Attached to driver: usb > 0.012 apcupsd: apcupsd.c:251 NIS thread started. > 0.013 apcupsd: apclog.c:62 apcupsd 3.14.14 (31 May 2016) openbsd startup > succeeded > 0.014 apcupsd: apclog.c:62 NIS server startup succeeded > 0.023 apcupsd: newups.c:102 write_lock at generic-usb.c:457 > 0.023 apcupsd: HidUps.cpp:50 Initializing libusb > 0.033 apcupsd: HidUps.cpp:55 Found 8 USB busses > 0.045 apcupsd: HidUps.cpp:57 Found 9 USB devices > 0.045 apcupsd: HidUps.cpp:68 000:001 - 8086:0000 > 0.045 apcupsd: HidUps.cpp:112 Not an APC device. > 0.045 apcupsd: HidUps.cpp:68 001:001 - 8086:0000 > 0.045 apcupsd: HidUps.cpp:112 Not an APC device. > 0.045 apcupsd: HidUps.cpp:68 002:001 - 8086:0000 > 0.045 apcupsd: HidUps.cpp:112 Not an APC device. > 0.045 apcupsd: HidUps.cpp:68 002:002 - 051d:0003 > 0.050 apcupsd: HidUps.cpp:232 Got string of length=16 > 0.050 apcupsd: HidUps.cpp:151 device='AS1505230549', user='/dev/ugen0' > 0.051 apcupsd: HidUps.cpp:68 003:001 - 8086:0000 > 0.051 apcupsd: HidUps.cpp:112 Not an APC device. > 0.051 apcupsd: HidUps.cpp:68 004:001 - 8086:0000 > 0.051 apcupsd: HidUps.cpp:112 Not an APC device. > 0.051 apcupsd: HidUps.cpp:68 005:001 - 8086:0000 > 0.051 apcupsd: HidUps.cpp:112 Not an APC device. > 0.051 apcupsd: HidUps.cpp:68 006:001 - 8086:0000 > 0.051 apcupsd: HidUps.cpp:112 Not an APC device. > 0.051 apcupsd: HidUps.cpp:68 007:001 - 8086:0000 > 0.051 apcupsd: HidUps.cpp:112 Not an APC device. > 0.051 apcupsd: newups.c:108 write_unlock at generic-usb.c:471 > 5.055 apcupsd: newups.c:102 write_lock at generic-usb.c:457 > 5.056 apcupsd: HidUps.cpp:50 Initializing libusb > 5.062 apcupsd: HidUps.cpp:55 Found 0 USB busses > 5.066 apcupsd: HidUps.cpp:57 Found 0 USB devices > 5.066 apcupsd: HidUps.cpp:68 000:001 - 8086:0000 > 5.066 apcupsd: HidUps.cpp:112 Not an APC device. > 5.066 apcupsd: HidUps.cpp:68 001:001 - 8086:0000 > 5.066 apcupsd: HidUps.cpp:112 Not an APC device. > 5.066 apcupsd: HidUps.cpp:68 002:001 - 8086:0000 > 5.066 apcupsd: HidUps.cpp:112 Not an APC device. > 5.066 apcupsd: HidUps.cpp:68 002:002 - 051d:0003 > 5.070 apcupsd: HidUps.cpp:232 Got string of length=16 > 5.070 apcupsd: HidUps.cpp:151 device='AS1505230549', user='/dev/ugen0' > 5.070 apcupsd: HidUps.cpp:68 003:001 - 8086:0000 > 5.070 apcupsd: HidUps.cpp:112 Not an APC device. > 5.070 apcupsd: HidUps.cpp:68 004:001 - 8086:0000 > 5.070 apcupsd: HidUps.cpp:112 Not an APC device. > 5.070 apcupsd: HidUps.cpp:68 005:001 - 8086:0000 > 5.071 apcupsd: HidUps.cpp:112 Not an APC device. > 5.071 apcupsd: HidUps.cpp:68 006:001 - 8086:0000 > 5.071 apcupsd: HidUps.cpp:112 Not an APC device. > 5.071 apcupsd: HidUps.cpp:68 007:001 - 8086:0000 > 5.071 apcupsd: HidUps.cpp:112 Not an APC device. > 5.071 apcupsd: newups.c:108 write_unlock at generic-usb.c:471 > > (continues ad nauseum) > > Both the "Unable to open UPS device" from apctest and the "Not an APC > device" seem like they might be clues, but I'm uncertain if the issue is > upstream or with the recent changes in OpenBSD. > > thanks, > > .jh > > --- > > # apcaccess > APC : 001,018,0460 > DATE : 2016-06-07 18:58:29 -0400 > HOSTNAME : thanatos.home.huldtgren.net > VERSION : 3.14.14 (31 May 2016) openbsd > UPSNAME : atlas > CABLE : USB Cable > DRIVER : USB UPS Driver > UPSMODE : Stand Alone > STARTTIME: 2016-06-07 18:58:06 -0400 > STATUS : COMMLOST > MBATTCHG : 5 Percent > MINTIMEL : 3 Minutes > MAXTIME : 0 Seconds > NUMXFERS : 0 > TONBATT : 0 Seconds > CUMONBATT: 0 Seconds > XOFFBATT : N/A > STATFLAG : 0x05000100 > END APC : 2016-06-07 19:03:19 -0400 > > ugen0 at uhub2 port 1 "American Power Conversion Smart-UPS 2200 FW:UPS > 09.2 / ID=18" rev 2.00/1.06 addr 2 > > # dmesg > OpenBSD 6.0-beta (GENERIC.MP) #2165: Thu Jun 2 08:37:59 MDT 2016 > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > real mem = 2130575360 (2031MB) > avail mem = 2061438976 (1965MB) > User Kernel Config > UKC> disable upd > 347 upd* disabled > UKC> disable uhidev > 283 uhidev* disabled > UKC> quit > Continuing... > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0 > acpi at bios0 not configured > mpbios0 at bios0: Intel MP Specification 1.4 > cpu0 at mainbus0: apid 0 (boot processor) > cpu0: Genuine Intel(R) CPU @ 1.60GHz, 1600.21 MHz > cpu0: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR > cpu0: 512KB 64b/line 8-way L2 cache > cpu0: smt 0, core 0, package 0 > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges > cpu0: apic clock running at 99MHz > cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2.0.3, IBE > cpu1 at mainbus0: apid 1 (application processor) > cpu1: Genuine Intel(R) CPU @ 1.60GHz, 1599.99 MHz > cpu1: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR > cpu1: 512KB 64b/line 8-way L2 cache > cpu1: smt 1, core 0, package 0 > mpbios0: bus 0 is type PCI > mpbios0: bus 64 is type ISA > ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 20, 24 pins > cpu0: unknown Enhanced SpeedStep CPU, msr 0x0612101906001019 > cpu0: using only highest and lowest power states > cpu0: Enhanced SpeedStep 1600 MHz: speeds: 1600, 600 MHz > pci0 at mainbus0 bus 0 > pchb0 at pci0 dev 0 function 0 "Intel E600 Host" rev 0x05 > pchb1 at pci0 dev 1 function 0 "Intel E600 Config" rev 0x00 > ppb0 at pci0 dev 23 function 0 "Intel E600 PCIE" rev 0x00 > pci1 at ppb0 bus 1 > ppb1 at pci1 dev 0 function 0 "Intel EG20T PCIE" rev 0x01 > pci2 at ppb1 bus 2 > "Intel EG20T Packet Hub" rev 0x01 at pci2 dev 0 function 0 not configured > "Intel EG20T Ethernet" rev 0x02 at pci2 dev 0 function 1 not configured > "Intel EG20T GPIO" rev 0x01 at pci2 dev 0 function 2 not configured > ohci0 at pci2 dev 2 function 0 "Intel EG20T USB" rev 0x02: apic 0 int > 19, version 1.0 > ohci1 at pci2 dev 2 function 1 "Intel EG20T USB" rev 0x02: apic 0 int > 19, version 1.0 > ohci2 at pci2 dev 2 function 2 "Intel EG20T USB" rev 0x02: apic 0 int > 19, version 1.0 > ehci0 at pci2 dev 2 function 3 "Intel EG20T USB" rev 0x02: apic 0 int 19 > usb0 at ehci0: USB revision 2.0 > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > "Intel EG20T USB Client" rev 0x02 at pci2 dev 2 function 4 not configured > sdhc0 at pci2 dev 4 function 0 "Intel EG20T SDIO" rev 0x01: apic 0 int 18 > sdhc0: SDHC 1.0, 50 MHz base clock > sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed > sdhc1 at pci2 dev 4 function 1 "Intel EG20T SDIO" rev 0x01: apic 0 int 18 > sdhc1: SDHC 1.0, 50 MHz base clock > sdmmc1 at sdhc1: 4-bit, sd high-speed, mmc high-speed > ahci0 at pci2 dev 6 function 0 "Intel EG20T AHCI" rev 0x02: msi, AHCI 1.1 > ahci0: port 0: 3.0Gb/s > scsibus1 at ahci0: 32 targets > sd0 at scsibus1 targ 0 lun 0: <ATA, KingSpec KSM-mSA, 1110> SCSI3 > 0/direct fixed t10.ATA_KingSpec_KSM-mSATA.5-016SJ_MSA0511122700019_ > sd0: 15272MB, 512 bytes/sector, 31277232 sectors > ohci3 at pci2 dev 8 function 0 "Intel EG20T USB" rev 0x02: apic 0 int > 16, version 1.0 > ohci4 at pci2 dev 8 function 1 "Intel EG20T USB" rev 0x02: apic 0 int > 16, version 1.0 > ohci5 at pci2 dev 8 function 2 "Intel EG20T USB" rev 0x02: apic 0 int > 16, version 1.0 > ehci1 at pci2 dev 8 function 3 "Intel EG20T USB" rev 0x02: apic 0 int 16 > usb1 at ehci1: USB revision 2.0 > uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 > "Intel EG20T DMA" rev 0x00 at pci2 dev 10 function 0 not configured > puc0 at pci2 dev 10 function 1 "Intel EG20T Serial" rev 0x01: ports: 1 com > com4 at puc0 port 0 apic 0 int 19: ti16750, 64 byte fifo > puc1 at pci2 dev 10 function 2 "Intel EG20T Serial" rev 0x00: ports: 1 com > com5 at puc1 port 0 apic 0 int 19: ti16750, 64 byte fifo > puc2 at pci2 dev 10 function 3 "Intel EG20T Serial" rev 0x00: ports: 1 com > com6 at puc2 port 0 apic 0 int 19: ti16750, 64 byte fifo > puc3 at pci2 dev 10 function 4 "Intel EG20T Serial" rev 0x00: ports: 1 com > com7 at puc3 port 0 apic 0 int 19: ti16750, 64 byte fifo > "Intel EG20T DMA" rev 0x00 at pci2 dev 12 function 0 not configured > "Intel EG20T SPI" rev 0x00 at pci2 dev 12 function 1 not configured > "Intel EG20T I2C" rev 0x00 at pci2 dev 12 function 2 not configured > "Intel EG20T CAN" rev 0x00 at pci2 dev 12 function 3 not configured > "Intel EG20T 1588" rev 0x01 at pci2 dev 12 function 4 not configured > usb2 at ohci0: USB revision 1.0 > uhub2 at usb2 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > usb3 at ohci1: USB revision 1.0 > uhub3 at usb3 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > usb4 at ohci2: USB revision 1.0 > uhub4 at usb4 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > usb5 at ohci3: USB revision 1.0 > uhub5 at usb5 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > usb6 at ohci4: USB revision 1.0 > uhub6 at usb6 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > usb7 at ohci5: USB revision 1.0 > uhub7 at usb7 "Intel OHCI root hub" rev 1.00/1.00 addr 1 > ppb2 at pci0 dev 24 function 0 "Intel E600 PCIE" rev 0x00 > pci3 at ppb2 bus 3 > ppb3 at pci3 dev 0 function 0 "IDT 89HPES4T4" rev 0x0e > pci4 at ppb3 bus 4 > ppb4 at pci4 dev 2 function 0 "IDT 89HPES4T4" rev 0x0e > pci5 at ppb4 bus 5 > em0 at pci5 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address > 00:00:24:d1:ad:60 > ppb5 at pci4 dev 3 function 0 "IDT 89HPES4T4" rev 0x0e > pci6 at ppb5 bus 6 > em1 at pci6 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address > 00:00:24:d1:ad:61 > ppb6 at pci4 dev 4 function 0 "IDT 89HPES4T4" rev 0x0e > pci7 at ppb6 bus 7 > ppb7 at pci0 dev 25 function 0 "Intel E600 PCIE" rev 0x00 > pci8 at ppb7 bus 8 > ppb8 at pci8 dev 0 function 0 "IDT 89HPES4T4" rev 0x0e > pci9 at ppb8 bus 9 > ppb9 at pci9 dev 2 function 0 "IDT 89HPES4T4" rev 0x0e > pci10 at ppb9 bus 10 > em2 at pci10 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address > 00:00:24:d1:ad:62 > ppb10 at pci9 dev 3 function 0 "IDT 89HPES4T4" rev 0x0e > pci11 at ppb10 bus 11 > em3 at pci11 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address > 00:00:24:d1:ad:63 > ppb11 at pci9 dev 4 function 0 "IDT 89HPES4T4" rev 0x0e > pci12 at ppb11 bus 12 > ppb12 at pci0 dev 26 function 0 "Intel E600 PCIE" rev 0x00 > pci13 at ppb12 bus 13 > tcpcib0 at pci0 dev 31 function 0 "Intel E600 LPC" rev 0x00: 14318179 Hz > timer, watchdog > isa0 at tcpcib0 > isadma0 at isa0 > com0 at isa0 port 0x3f8/8 irq 4: ti16750, 64 byte fifo > com0: console > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > skgpio0 at isa0 port 0x680/32 > gpio0 at skgpio0: 16 pins > gpio1 at skgpio0: 2 pins > ugen0 at uhub2 port 1 "American Power Conversion Smart-UPS 2200 FW:UPS > 09.2 / ID=18" rev 2.00/1.06 addr 2 > vscsi0 at root > scsibus2 at vscsi0: 256 targets > softraid0 at root > scsibus3 at softraid0: 256 targets > root on sd0a (6fb9381c12ea5fc1.a) swap on sd0b dump on sd0b >
