|
| 1 | +--- |
| 2 | +title: Scanning Station Overview |
| 3 | +layout: default |
| 4 | +nav_order: 3 |
| 5 | +parent: Course Logistics |
| 6 | +--- |
| 7 | + |
| 8 | +# Scanning Station Overview |
| 9 | + |
| 10 | +The CDSS document scanning station is a 2018 Mac Mini running Ubuntu 24.04 LTS, connected to a Canon imageFORMULA DR-G2110 production scanner via USB 3.0. Macs on the same network can also scan directly via AirSane. |
| 11 | + |
| 12 | +## Location & Access |
| 13 | + |
| 14 | +The scanning station is located in **TODO: room/building**. (Currently Michae's office, but will move to a more normal location once the Gateway finally opens.) |
| 15 | + |
| 16 | +- **Username:** `oski` |
| 17 | +- **Password:** Posted near the computer |
| 18 | + |
| 19 | +This is a shared local account. Do not store sensitive files on this machine — save scans to your own device, or upload to Gradescope, and clean up `~/scans` when you're done. |
| 20 | + |
| 21 | +## Using the Scanner |
| 22 | + |
| 23 | +**[Jump to the Exam Scanning README](/course-logistics/scanning/exam-scanning) for detailed instructions on using the `scan-exams` command, filename conventions, batch numbering, and semester detection.** |
| 24 | + |
| 25 | +### `scan-exams` (recommended for exams) |
| 26 | + |
| 27 | +Open a terminal and type: |
| 28 | + |
| 29 | +``` |
| 30 | +scan-exams |
| 31 | +``` |
| 32 | + |
| 33 | +This walks you through scanning a batch of exams: course number, exam type, expected copies, and pages per exam. It scans duplex at 200 DPI grayscale, compresses the output, and saves a single PDF to `~/scans/`. |
| 34 | + |
| 35 | +Common options: |
| 36 | + |
| 37 | +| Flag | Description | |
| 38 | +|------|-------------| |
| 39 | +| `-o` | Open the PDF automatically after scanning | |
| 40 | +| `-r` | Reuse course/exam metadata from the last scan | |
| 41 | +| `-q` | Quiet mode — no prompts, just scan and save | |
| 42 | +| `-h` | Show help | |
| 43 | + |
| 44 | +Examples: |
| 45 | + |
| 46 | +``` |
| 47 | +scan-exams -o # scan and open the PDF when done |
| 48 | +scan-exams -r -o # another batch of the same exam |
| 49 | +scan-exams -h # full usage info |
| 50 | +``` |
| 51 | + |
| 52 | +For details on filenames, batch numbering, and semester detection, see the [Exam Scanning README](exam-scanning). |
| 53 | + |
| 54 | +### NAPS2 (GUI scanning) |
| 55 | + |
| 56 | +NAPS2 is a graphical scanning app linked on the desktop. You can also launch it from a terminal: |
| 57 | + |
| 58 | +``` |
| 59 | +naps2 |
| 60 | +``` |
| 61 | + |
| 62 | +Select **SANE Driver**, choose the Canon DR-G2110, and save directly to PDF. |
| 63 | + |
| 64 | +### `scanimage` (advanced CLI) |
| 65 | + |
| 66 | +For more control over scan settings: |
| 67 | + |
| 68 | +``` |
| 69 | +scanimage -L # list scanners |
| 70 | +scanimage -A # show all scanner options |
| 71 | +scanimage --format=tiff --resolution 200 --mode Gray --source="Duplex" --batch=scan_%04d.tiff |
| 72 | +img2pdf scan_*.tiff -o output.pdf |
| 73 | +``` |
| 74 | + |
| 75 | +### Network scanning from a Mac |
| 76 | + |
| 77 | +The scanner is published on the local network via AirSane. On any Mac on the same network: |
| 78 | +(This is currently the internal EECS network, and may not be accessible from campus Wi-Fi.) |
| 79 | + |
| 80 | +1. Open **Image Capture** (or **Preview → File → Import from Scanner**) |
| 81 | +2. The Canon DR-G2110 should appear in the sidebar |
| 82 | +3. Select scan settings and scan — files go directly to your Mac |
| 83 | + |
| 84 | +AirSane also provides a web interface at `http://TODO-HOSTNAME:8090/`. |
| 85 | + |
| 86 | +### After scanning |
| 87 | + |
| 88 | +**Scanned files may contain sensitive data (exams, student work, etc.).** |
| 89 | + |
| 90 | +- Copy your PDFs from `~/scans/` to your own device. |
| 91 | +- **Delete your files from `~/scans/` when you're done.** This is a shared machine. |
| 92 | +- The workstation does not share files over the network — only the scanner device is exposed via AirSane. |
| 93 | + |
| 94 | +## Equipment |
| 95 | + |
| 96 | +- **Scanner:** Canon imageFORMULA DR-G2110 (USB 3.0) |
| 97 | +- **Computer:** 2018 Mac Mini, Intel, 64 GB RAM, Ubuntu 24.04 LTS |
| 98 | +- **Network scanning:** AirSane (eSCL/AirScan protocol, auto-discovered by macOS) |
| 99 | + |
| 100 | +## Setup & Maintenance |
| 101 | + |
| 102 | +The setup scripts and scanning tools are maintained in the [berkeley-cdss/docs](https://github.com/berkeley-cdss/docs) repository: |
| 103 | + |
| 104 | +- [scanning-scripts/](https://github.com/berkeley-cdss/docs/tree/main/course-logistics/scanning/) — setup scripts, scan-exams tool, and documentation |
| 105 | + |
| 106 | +To re-run the workstation setup from scratch: |
| 107 | + |
| 108 | +``` |
| 109 | +git clone https://github.com/berkeley-cdss/docs.git |
| 110 | +cd docs/course-logistics/scanning |
| 111 | +bash setup.sh # scanner driver, NAPS2, AirSane, scan-exams command |
| 112 | +bash setup_apps.sh # general dev tools and apps |
| 113 | +``` |
| 114 | + |
| 115 | +Setup installs scripts and docs to `~/scanner/` and adds `scan-exams` to `~/.bashrc`. |
| 116 | + |
| 117 | +### Installed files |
| 118 | + |
| 119 | +| Location | Contents | |
| 120 | +|----------|----------| |
| 121 | +| `~/scanner/scan-exams.sh` | The `scan-exams` function (sourced by `.bashrc`) | |
| 122 | +| `~/scanner/README.md` | This documentation | |
| 123 | +| `~/scans/` | Default scan output directory | |
| 124 | +| `~/.scan-exams-last` | Saved metadata for `scan-exams -r` | |
| 125 | + |
| 126 | +## Troubleshooting |
| 127 | + |
| 128 | +### Scanner not detected |
| 129 | + |
| 130 | +``` |
| 131 | +lsusb | grep -i canon # check USB connection |
| 132 | +scanimage -L # check SANE detection |
| 133 | +dpkg -l | grep canon # check driver installation |
| 134 | +``` |
| 135 | + |
| 136 | +### Scan source options |
| 137 | + |
| 138 | +The scanner uses `--source="Duplex"` for double-sided and `--source="Simplex"` for single-sided. Check available options: |
| 139 | + |
| 140 | +``` |
| 141 | +scanimage -A | grep -i source |
| 142 | +``` |
| 143 | + |
| 144 | +### Scanning pauses or is slow |
| 145 | + |
| 146 | +- Confirm USB 3.0 connection (not USB 2.0) |
| 147 | +- Check disk write speed — scan output should go to an SSD/NVMe |
| 148 | +- Lower resolution (200 DPI is usually sufficient for exams) |
| 149 | +- Use grayscale instead of color |
| 150 | + |
| 151 | +### AirSane not visible on Mac |
| 152 | + |
| 153 | +- Ensure both machines are on the same network/subnet |
| 154 | +- Check AirSane is running: `sudo systemctl status airsaned` |
| 155 | +- Check Avahi is running: `sudo systemctl status avahi-daemon` |
| 156 | +- Try the web interface: `http://TODO-HOSTNAME.local:8090/` |
| 157 | + |
| 158 | +### Managing services |
| 159 | + |
| 160 | +``` |
| 161 | +sudo systemctl status airsaned # AirSane status |
| 162 | +sudo systemctl restart airsaned # restart AirSane |
| 163 | +sudo journalctl -u airsaned -f # AirSane logs |
| 164 | +``` |
0 commit comments