# mmcterm
Terminal for the custom "serial over IPMB" protocol used by DMMC-STAMP.
## Installation
```
pip3 install mmcterm
```
## Usage
```
mmcterm [-h] [-v] [-c CHANNEL] [-t INTERVAL] [-l] [-d] [-i] [-m MAX_PKT_SIZE] 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:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c CHANNEL, --channel CHANNEL
console channel (default 0)
-t INTERVAL, --interval INTERVAL
polling interval in ms (default 10)
-l, --list list available channels
-d, --debug pyipmi debug mode
-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)
```
## Channels
The DMMC-STAMP always provides channel 0 for the MMC console. This is also the default channel, if the `-c` argument is not given to `mmcterm`. Depending on the board implementation, there can be up to 2 additional channels for UARTs of payload FPGAs. The presence and names of those channels can be queried with the `-l` argument.
Note that only one channel can be opened to a MMC at the same time.
## Example
Open a console on AMC board at IPMB address 0x7a connected to the MCH `mskmchhvf1.tech.lab`:
```bash
mmcterm mskmchhvf1.tech.lab 0x7a
```
## Max packet size
Without the `-m` option, `mmcterm` uses the standard maximum IPMB packet size of 32 bytes. Due to the limitations of the IPMI protocol, this can quickly become a bottleneck, esp. when used with a SoC running Linux. To mitigate this bottleneck, bigger packet sizes can be set with `-m`. For NAT MCHs, `-m 100` was found to be working, even though it is more than 3 times the standard packet size.
## Protocol description
"Serial over IPMB" is a lightweight "serial data forwarding" protocol using custom IPMI messages.
### Get channel info
NetFn 0x30, Command 0xf0
Request:
| Byte | Contents |
|---------|-----------------|
| 0 | Channel Number |
Response:
| Byte | Contents |
|---------|-----------------|
| 0..n | Channel Name |
### Start/stop SOI session
NetFn 0x30, Command 0xf1
Request:
| Byte | Contents |
|---------|----------------------------|
| 0 | Channel Number |
| 1 | 1 = start, 0 = stop |
| 2 | Max packet size (optional) |
### Poll/exchange data
NetFn 0x30, Command 0xf2
Request:
| Byte | Contents |
|---------|--------------------------------|
| 0..n | Send data from terminal to MMC |
Response:
| Byte | Contents |
|---------|-----------------------------------|
| 0..n | Receive data from MMC to terminal |
Raw data
{
"_id": null,
"home_page": "https://techlab.desy.de",
"name": "mmcterm",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "microtca mmc ipmi ipmb console",
"author": "Patrick Huesmann",
"author_email": "patrick.huesmann@desy.de",
"download_url": "https://files.pythonhosted.org/packages/0a/fb/42629bace7923326cd1b7be63ab093f4a7d056f4f9deeef0a97a32750252/mmcterm-0.2.1.tar.gz",
"platform": null,
"description": "# mmcterm\n\nTerminal for the custom \"serial over IPMB\" protocol used by DMMC-STAMP.\n\n## Installation\n\n```\npip3 install mmcterm\n```\n\n## Usage\n\n```\nmmcterm [-h] [-v] [-c CHANNEL] [-t INTERVAL] [-l] [-d] [-i] [-m MAX_PKT_SIZE] mch_addr mmc_addr\n\nDESY MMC Serial over IPMB console\n\npositional arguments:\n mch_addr IP address or hostname of MCH\n mmc_addr IPMB-L address of MMC or \"AMCn\" (n=1..12)\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -c CHANNEL, --channel CHANNEL\n console channel (default 0)\n -t INTERVAL, --interval INTERVAL\n polling interval in ms (default 10)\n -l, --list list available channels\n -d, --debug pyipmi debug mode\n -i, --ipmitool make pyipmi use ipmitool instead of native rmcp\n -m MAX_PKT_SIZE, --max-pkt-size MAX_PKT_SIZE\n max IPMB packet size to use (Higher numbers give better performance, but can break depending on MCH model)\n```\n\n## Channels\n\nThe DMMC-STAMP always provides channel 0 for the MMC console. This is also the default channel, if the `-c` argument is not given to `mmcterm`. Depending on the board implementation, there can be up to 2 additional channels for UARTs of payload FPGAs. The presence and names of those channels can be queried with the `-l` argument.\n\nNote that only one channel can be opened to a MMC at the same time.\n\n## Example\n\nOpen a console on AMC board at IPMB address 0x7a connected to the MCH `mskmchhvf1.tech.lab`:\n```bash\nmmcterm mskmchhvf1.tech.lab 0x7a\n```\n\n## Max packet size\n\nWithout the `-m` option, `mmcterm` uses the standard maximum IPMB packet size of 32 bytes. Due to the limitations of the IPMI protocol, this can quickly become a bottleneck, esp. when used with a SoC running Linux. To mitigate this bottleneck, bigger packet sizes can be set with `-m`. For NAT MCHs, `-m 100` was found to be working, even though it is more than 3 times the standard packet size.\n\n## Protocol description\n\n\"Serial over IPMB\" is a lightweight \"serial data forwarding\" protocol using custom IPMI messages.\n\n### Get channel info\n\nNetFn 0x30, Command 0xf0\n\nRequest:\n\n| Byte | Contents |\n|---------|-----------------|\n| 0 | Channel Number |\n\nResponse:\n\n| Byte | Contents |\n|---------|-----------------|\n| 0..n | Channel Name |\n\n### Start/stop SOI session\n\nNetFn 0x30, Command 0xf1\n\nRequest:\n\n| Byte | Contents |\n|---------|----------------------------|\n| 0 | Channel Number |\n| 1 | 1 = start, 0 = stop |\n| 2 | Max packet size (optional) |\n\n### Poll/exchange data\n\nNetFn 0x30, Command 0xf2\n\nRequest:\n\n| Byte | Contents |\n|---------|--------------------------------|\n| 0..n | Send data from terminal to MMC |\n\nResponse:\n\n| Byte | Contents |\n|---------|-----------------------------------|\n| 0..n | Receive data from MMC to terminal |\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Serial over IPMB terminal for DESY MMCs",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://techlab.desy.de"
},
"split_keywords": [
"microtca",
"mmc",
"ipmi",
"ipmb",
"console"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d48f8243da21e1875c95354053f401c3a6f9f99a15b8da41a45618e4f0005d12",
"md5": "3028ba183acd8a9025983cc6b37ed068",
"sha256": "c3cb266a8412bd3d411d3cf01886e8ae486d9af46975b7000fe87c518c743fdb"
},
"downloads": -1,
"filename": "mmcterm-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3028ba183acd8a9025983cc6b37ed068",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 10556,
"upload_time": "2024-02-27T10:03:08",
"upload_time_iso_8601": "2024-02-27T10:03:08.157923Z",
"url": "https://files.pythonhosted.org/packages/d4/8f/8243da21e1875c95354053f401c3a6f9f99a15b8da41a45618e4f0005d12/mmcterm-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0afb42629bace7923326cd1b7be63ab093f4a7d056f4f9deeef0a97a32750252",
"md5": "3049ffeb575fa4e948cdbe25e753decb",
"sha256": "abf5c84d51d82d62d3b9c947f8b9cb22ce92a626b89cd6f932a579ddb97ce05f"
},
"downloads": -1,
"filename": "mmcterm-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "3049ffeb575fa4e948cdbe25e753decb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10759,
"upload_time": "2024-02-27T10:03:09",
"upload_time_iso_8601": "2024-02-27T10:03:09.655561Z",
"url": "https://files.pythonhosted.org/packages/0a/fb/42629bace7923326cd1b7be63ab093f4a7d056f4f9deeef0a97a32750252/mmcterm-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-27 10:03:09",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mmcterm"
}