[Nut-upsuser] NUT + OpenBSD + dc2500cc + APC Smart-UPS SC620 = problem

Kastus Shchuka ks-nut at tprfct.net
Sat May 3 14:53:43 UTC 2014


On May 3, 2014, at 5:20 AM, Charles Lepple wrote:

> On May 2, 2014, at 3:26 AM, Kastus Shchuka wrote:
> 
>> Hi,
>> 
>> I am trying to set up NUT on a mini-ITX system running OpenBSD 5.5.
>> 
>> I have an APC Smart-UPS SC620 which runs perfectly well on Ubuntu,
>> with nut-2.2.1. Ubuntu system uses ASUS motherboard.
>> 
>> On mini-ITX system, I have Intel d2500cc motherboard with 4 serial ports.
>> I've tested ports by connecting them with a null-modem cable and running cu
>> in 2 terminals. Type in one terminal, output shows in the other, and vice versa.
> 
> Not sure if there is an easy way to do this in cu, but minicom has some defaults for file transfer programs. Is there an easy way to transfer a file, and see if characters get dropped under load?
> 

I have not tried file transfer, I just typed in the terminal.

> Also, is that null-modem cable wired to test hardware handshaking?

It is actually a pair of DB9-RJ45 adapters connected with a regular cat5 patch cord. I use these adapters to connect to serial port on servers, switches, routers, etc., and I know it works there. All pins on the adapter are connected, so it should support hardware handshake.

> 
>> I disconnect UPS from Ubuntu system, connect it to OpenBSD, try apcsmart 
>> driver, and in 15 seconds it comes back with a message "unable to detect 
>> an APC Smart protocol UPS on port /dev/cua01". NUT is installed from OpenBSD
>> packages, version 2.7.1. APC Smart protocol driver 3.2 (2.7.1)
> 
> In the event we missed something with the new driver, can you try with apcsmart-old?

Actually I tied that too, with the same level of luck, just forgot to mention that.

> 
> I don't remember the details, but there were some changes related to how the modem control lines are set up.
> 
> If you want to run the driver in debug mode, you probably only need to pass one "-D" flag to see at what point the detection fails.

I used actually 5 "D"s, so the driver was pretty verbose, but it was timing out at the very start of communication, like printing out 5 lines and then timing out and giving up in 15 seconds.

> 
>> I suspect there is something special with serial ports on d2500cc motherboard
>> as I also tried, out of curiousity, apcupsd from OpenBSD ports, and it failed
>> to detect the UPS either.
> 
> Does apctest from apcupsd have any better diagnostics?

No, it timed out almost exactly the same as NUT apcsmart driver.

> 
>> I wonder if anybody else has successfully run NUT on d2500cc motherboard with
>> serial UPS? 
> 

Now the good news is that I tried connecting UPS through USB-serial adapter (with PL2303 chipset), and UPS was detected instantly, and everything worked.

I guess there is something wrong with serial ports on d2500cc, or maybe I am not using them correctly. There are 4 ports on the board, 2 with DB9 connectors on the back and 2 on the board itself. By default, port numbering starts from the headless ones, so DB9s are com3 and com4. There is a special setting in BIOS which swaps headless ports with DB9s, making DB9s com1 and com2. I tried all combinations without any luck. What is strange is that OpenBSD kernel detects 2 ports only, not 4, so I do not exclude a problem with OpenBSD kernel driver.

Funny thing is that I picked d2500cc for this project precisely because it has onboard serial ports trying to avoid the need to use USB-serial adapter, and in the end I have to use the adapter, and it works. I still have to run full set of tests including shutdown, etc., but I am pretty sure at this point that it will work fine. So for now, the problem seems to be solved for me, maybe not in the way I wanted, but I can control the UPS from my new OpenBSD firewall now.

If I have time, I will try to install Linux on this system and see if it can use the serial ports on d2500cc. 

Thanks,

Kastus


More information about the Nut-upsuser mailing list