Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ pip3 install mmcterm
## Usage

```
mmcterm [-h] [-v] [-c CHANNEL] [-t INTERVAL] [-l] [-d] [-i] [-m MAX_PKT_SIZE] mch_addr mmc_addr
mmcterm [-h] [-v] [-c CHANNEL] [-t INTERVAL] [-l] [-d] [-i] [-m MAX_PKT_SIZE] [--vadatech-quirk] mch_addr mmc_addr
DESY MMC Serial over IPMB console
positional arguments:
mch_addr IP address or hostname of MCH
mmc_addr IPMB-L address of MMC or "AMCn" (n=1..12)
optional arguments:
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c CHANNEL, --channel CHANNEL
Expand All @@ -31,6 +31,7 @@ optional arguments:
-i, --ipmitool make pyipmi use ipmitool instead of native rmcp
-m MAX_PKT_SIZE, --max-pkt-size MAX_PKT_SIZE
max IPMB packet size to use (Higher numbers give better performance, but can break depending on MCH model)
--vadatech-quirk Enable ipmi library quirk for Vadatech support (ignore req seq numbers)
```

## Channels
Expand Down
17 changes: 14 additions & 3 deletions mmcterm/mmcterm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ class IpmiCode(Enum):


class IpmiConn:
def __init__(self, mmc_addr, mch_url, ipmitool_mode=False):
def __init__(self, mmc_addr, mch_url, ipmitool_mode=False, vadatech_quirk=False):
if ipmitool_mode:
interface = pyipmi.interfaces.create_interface(
"ipmitool", interface_type="lan"
)
else:
quirks_cfg = {}
if vadatech_quirk:
# Vadatech MCH is changing request sequence numbers on-the-fly,
# we need to let the ipmi library know to ignore the sequence numbers
quirks_cfg["rmcp_ignore_rq_seq"] = True

interface = pyipmi.interfaces.create_interface(
"rmcp", keep_alive_interval=0
"rmcp", keep_alive_interval=0, quirks_cfg=quirks_cfg
)

session, target = self.mtca_mch_bridge_amc(mch_url, mmc_addr)
Expand Down Expand Up @@ -527,14 +533,19 @@ def main():
help="max IPMB packet size to use"
" (Higher numbers give better performance, but can break depending on MCH model)",
)
parser.add_argument(
"--vadatech-quirk",
action="store_true",
help="Enable ipmi library quirk for Vadatech support (ignore req seq numbers)",
)
args = parser.parse_args()

if args.debug:
pyipmi.logger.set_log_level(logging.DEBUG)
pyipmi.logger.add_log_handler(logging.StreamHandler())

try:
conn = IpmiConn(args.mmc_addr, args.mch_addr, ipmitool_mode=args.ipmitool)
conn = IpmiConn(args.mmc_addr, args.mch_addr, ipmitool_mode=args.ipmitool, vadatech_quirk=args.vadatech_quirk)
except Exception as e:
print(e)
sys.exit(1)
Expand Down