{"id":26056314,"url":"https://github.com/ncar/cti-serial","last_synced_at":"2025-07-22T08:31:22.178Z","repository":{"id":80708334,"uuid":"440343519","full_name":"NCAR/cti-serial","owner":"NCAR","description":"Driver and utilities for Connect Tech Xtreme 104","archived":false,"fork":false,"pushed_at":"2024-05-14T15:57:27.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-08T11:00:05.759Z","etag":null,"topics":["aircraft","data-systems","raf"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NCAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-12-21T00:26:29.000Z","updated_at":"2024-07-07T21:29:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1b931c2-c811-4d5d-b42d-9378f1d0f472","html_url":"https://github.com/NCAR/cti-serial","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":"0.15384615384615385","last_synced_commit":"962a2dcc8361a41889af7375e38bb918c20eaaa4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NCAR/cti-serial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAR%2Fcti-serial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAR%2Fcti-serial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAR%2Fcti-serial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAR%2Fcti-serial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NCAR","download_url":"https://codeload.github.com/NCAR/cti-serial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCAR%2Fcti-serial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266456245,"owners_count":23931383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aircraft","data-systems","raf"],"created_at":"2025-03-08T11:00:08.476Z","updated_at":"2025-07-22T08:31:22.125Z","avatar_url":"https://github.com/NCAR.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cti-serial\nDriver, utilities and configuration for Connect Tech Xtreme 104 serial cards.\n\nThe **cti_serial_core** driver module is identical to version 143 from Connect Tech.\n\nThe driver creates device files, called **/dev/ttyCTI\\***.  Also see below about the **cti-serial.service** which creates device files with the old naming convention: **/dev/ttyS\\***.\n\nThis repository contains a debian directory for creating a native debian package, and a **build_dpkg.sh** script to build it, typically in a container.\n\n## Supported Serial Cards\n\nThe cti-serial package has been tested for the [Connect Tech Xtreme 104 Isolated](https://connecttech.com/product/xtreme104-isolated/) serial card.\n\nThis is a PC/104 card, not PCI.  With slight modifications it should work for other Connect Tech cards, but modifications (simplifications) for PCI will be more significant.\n\n## Contents of cti-serial package\n\n### Kernel modules\n- cti_serial_core.ko\n\n### Executable binaries on /usr/bin\n- arb_setbaud\n- setmodem\n- set485\n\n### Configuration files\n- /etc/modules-load.d/cti-serial.conf: enables loading the **cti_serial_core** module at boot\n- /etc/modprobe.d/cti-serial.conf: options for cti_serial_core\n  - nr_uarts: the number of ports on the CTI card. 12 for the Xtreme/104 Isolated card.\n- /etc/serial.conf: created or modified by the postinst script of cti-serial\n\n    The postinst script for this package does the following:\n    1. If /etc/serial.conf doesn't exist, it is copied from /var/lib/setserial/autoserial.conf\n    2. Adds setserial entries for **/dev/ttyCTI\\*** files to /etc/serial.conf.\n\n#### setserial services in Ubuntu\nThere are two setserial services in Ubuntu bionic (and maybe other distributions):\n\n- setserial.service\n\nThe setserial.service invokes /etc/init.d/setserial.  If /etc/serial.conf exists, then this\nscript does nothing, otherwise it runs setserial on the entries in /var/lib/setserial/autoserial.conf.\n\n- etc-setserial.service\n\nThe etc-setserial.service invokes /etc/init.d/etc-setserial, which runs setserial on the entires in /etc/serial.conf.\n\nSo after cti-serial is installed, /etc/serial.conf should exist\nand contain entries for the on-board serial ports\n(/dev/ttyS[0-3] on Vortex) and for the CTI ports (/dev/ttyCTI[0-11]) (assuming 12 ports).\nThese entries will then be read by /etc/init.d/etc-setserial.\n\n### cti-serial.service\n- /lib/systemd/system/cti-serial.service\n- /lib/systemd/cti-serial-service.sh, script run by cti-serial.service\n\n/lib/systemd/cti-serial-service.sh creates **/dev/ttyS[4-15]** which can be used instead of **/dev/ttyCTI[0-11]**.\n        \n### Number of UARTs\n\nThe Connect Tech Xtreme 104 Isolated card has 12 UARTs. So in **/etc/modprobe.d/cti-serial.conf** nr_uarts is set to 12.  In cti-serial/driver/8205_core.c, nr_uarts defaults to 16. It doesn't hurt to leave it at 16, except that unnecessary files /dev/ttyCTI12- ttyCTI15 are created, which might mislead some users to think they are functional.\n\nThe number of UARTs on the motherboard is a kernel configuration parameter:\n\n    grep \"CONFIG_SERIAL_8250_.*UARTS\" /boot/config-4.15.18-vortex86dx3 \n\nOn the Vortex, with 4 UARTs on the motherboard, but CONFIG_SERIAL_8250_RUNTIME_UARTS=32, then 32 /dev/ttyS\\* ports are created when the 8250 serial driver is loaded, even though devices 4-31 are not functional.\n\nTo avoid conflict between the /dev/ttyS device files created by the 8250 serial driver, and the files created for backward compatiblity by cti-serial.service, the cti-serial package alters the GRUB boot line, **GRUB_CMDLINE_LINUX_DEFAULT** in **/etc/default/grub** to set **8250.nr_uarts=4**. Then the 8250 driver will only create device files **/dev/ttyS0-ttyS3** when it is loaded.\n\n## Building cti-serial package\n\n### KERNEL_DIR\nTo build the cti_serial_core module, make needs to be able to find the Linux kernel headers matching the kernel version of the target system.\n\nThe headers are typically found in **/usr/src**, in a directory such as **linux-headers-4.15.18-vortex86dx3**.\n\nTo build On Debian you need to install a **linux-headers** package corresponding to the kernel of the target system.  \n\nFor example, the header package for a Vortex DX3 running Ubuntu bionic, kernel 4.15.18:\n\n    apt-get install linux-headers-4.15.18-vortex86dx3\n\nAssuming builds are only done in containers, not on a Vortex, the **linux-headers** package only needs to be installed in the container image.\n\nThe Makefile will set KERNEL_DIR to the first directory that is found on /usr/src.  If there are more than one, you should move or uninstall the extra ones, or hand edit the Makefile and set the value of KERNEL_DIR. This can also be done if the headers are in some other directory than **/usr/src**:\n\n    KERNEL_DIR := /my/location/linux-headers-4.15.18-vortex86dx3 \n\n### Building in a Debian container\nThe nidas-devel package contains a **start_podman** script in **/opt/nidas/bin** which can be used to run docker/podman images for building software.\n\n1. Clone the cti-serial repository:\n\n        git clone https://github.com/NCAR/cti-serial.git\n        cd cti-serial\n\n1. Run a podman image interactively.  An interactive session may be necessary if you're installing\nthe package and the gpg-agent needs to prompt for the password to the \\\u003ceol-prog@ucar.edu\\\u003e signing key.\n\n    start_podman bionic\n\n    1. The Ubuntu bionic image on docker.io/ncar contains the linux-headers-4.15.18-vortex86dx3 package.\n\n       If you need to install a different header package for the target system:\n\n            apt-get update \n            apt-get install linux-headers-x.y.z\n\n    1. Edit the Makefile if you need to override the default search for KERNEL_DIR on **/usr/src**:\n\n            vi /root/current/Makefile\n\n    1. Build the package, which will be placed in the parent directory (/root in this example):\n\n            cd /root/current\n            ./build_dpkg.sh i386\n\n    1. Add the -I option to install the package with reprepo to the EOL debian repository on /net/ftp\n\n            ./build_dpkg.sh i386 -I bionic\n\n1. To build the package non-interacively\n\n        start_podman bionic /root/current/build_dpkg.sh i386 -I bionic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncar%2Fcti-serial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fncar%2Fcti-serial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fncar%2Fcti-serial/lists"}