2026-01-21 14:29:39 +01:00
|
|
|
# Webserver Endpoints
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
This document describes the HTTP, WebSocket, WebDAV, and discovery endpoints
|
|
|
|
|
available while CrossPoint Reader is in File Transfer or Calibre Wireless mode.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
- HTTP server: port 80
|
|
|
|
|
- WebSocket upload server: port 81
|
|
|
|
|
- UDP discovery listener: port 8134
|
|
|
|
|
- WebDAV: port 80, handled by the same HTTP server
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Examples use `crosspoint.local`. If mDNS does not resolve on your network, use
|
|
|
|
|
the IP address shown on the device screen.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
## HTTP Pages
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Method | Path | Purpose |
|
|
|
|
|
|--------|------|---------|
|
|
|
|
|
| `GET` | `/` | Home/status page |
|
|
|
|
|
| `GET` | `/files` | File manager page |
|
|
|
|
|
| `GET` | `/settings` | Web settings page |
|
|
|
|
|
| `GET` | `/fonts` | SD-card font manager page |
|
|
|
|
|
| `GET` | `/js/jszip.min.js` | JavaScript asset used by the file manager |
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
## Device Status
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `GET /api/status`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl http://crosspoint.local/api/status
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Response:
|
|
|
|
|
|
2026-01-21 14:29:39 +01:00
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"version": "1.0.0",
|
|
|
|
|
"ip": "192.168.1.100",
|
|
|
|
|
"mode": "STA",
|
|
|
|
|
"rssi": -45,
|
|
|
|
|
"freeHeap": 123456,
|
2026-06-07 21:47:44 +02:00
|
|
|
"uptime": 3600,
|
|
|
|
|
"device": "X4"
|
2026-01-21 14:29:39 +01:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Field | Type | Description |
|
|
|
|
|
|-------|------|-------------|
|
|
|
|
|
| `version` | string | Firmware version |
|
|
|
|
|
| `ip` | string | Device IP address |
|
|
|
|
|
| `mode` | string | `"STA"` for joined Wi-Fi or `"AP"` for hotspot mode |
|
|
|
|
|
| `rssi` | number | Wi-Fi RSSI in dBm; `0` in AP mode |
|
|
|
|
|
| `freeHeap` | number | Free heap in bytes |
|
|
|
|
|
| `uptime` | number | Seconds since boot |
|
|
|
|
|
| `device` | string | `"X3"` or `"X4"` hardware detection |
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
## File Management
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `GET /api/files`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Lists files and folders under a directory.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl "http://crosspoint.local/api/files?path=/Books"
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Query parameters:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Parameter | Required | Default | Description |
|
|
|
|
|
|-----------|----------|---------|-------------|
|
|
|
|
|
| `path` | No | `/` | Directory to list |
|
|
|
|
|
|
|
|
|
|
Response:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
2026-06-07 21:47:44 +02:00
|
|
|
{"name":"MyBook.epub","size":1234567,"isDirectory":false,"isEpub":true},
|
|
|
|
|
{"name":"Notes","size":0,"isDirectory":true,"isEpub":false}
|
2026-01-21 14:29:39 +01:00
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Hidden dotfiles are omitted unless the device setting `showHiddenFiles` is
|
|
|
|
|
enabled. `System Volume Information` and `XTCache` are always hidden/protected.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `GET /download`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Downloads a file from the SD card.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```bash
|
2026-06-07 21:47:44 +02:00
|
|
|
curl -OJ "http://crosspoint.local/download?path=/Books/MyBook.epub"
|
|
|
|
|
```
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Query parameters:
|
|
|
|
|
|
|
|
|
|
| Parameter | Required | Description |
|
|
|
|
|
|-----------|----------|-------------|
|
|
|
|
|
| `path` | Yes | File path to download |
|
|
|
|
|
|
|
|
|
|
Protected dotfiles, `System Volume Information`, and `XTCache` cannot be
|
|
|
|
|
downloaded. EPUB files are served as `application/epub+zip`; other files use
|
|
|
|
|
`application/octet-stream`.
|
|
|
|
|
|
|
|
|
|
### `POST /upload`
|
|
|
|
|
|
|
|
|
|
Uploads a file with HTTP multipart form data.
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-21 14:29:39 +01:00
|
|
|
curl -X POST -F "file=@mybook.epub" "http://crosspoint.local/upload?path=/Books"
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Query parameters:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Parameter | Required | Default | Description |
|
|
|
|
|
|-----------|----------|---------|-------------|
|
|
|
|
|
| `path` | No | `/` | Destination directory |
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Successful response:
|
|
|
|
|
|
|
|
|
|
```text
|
2026-01-21 14:29:39 +01:00
|
|
|
File uploaded successfully: mybook.epub
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Notes:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
- Existing files with the same name are overwritten.
|
|
|
|
|
- EPUB cache data for the uploaded path is cleared after a successful upload.
|
|
|
|
|
- HTTP upload uses a 4 KB write buffer before flushing to the SD card.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `POST /mkdir`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Creates a folder.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST -d "name=NewFolder&path=/" http://crosspoint.local/mkdir
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Form parameters:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Parameter | Required | Default | Description |
|
|
|
|
|
|-----------|----------|---------|-------------|
|
|
|
|
|
| `name` | Yes | - | New folder name |
|
|
|
|
|
| `path` | No | `/` | Parent folder |
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `POST /rename`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Renames a file.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST -d "path=/Books/old.epub&name=new.epub" http://crosspoint.local/rename
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Form parameters:
|
|
|
|
|
|
|
|
|
|
| Parameter | Required | Description |
|
|
|
|
|
|-----------|----------|-------------|
|
|
|
|
|
| `path` | Yes | Existing file path |
|
|
|
|
|
| `name` | Yes | New file name, not a path |
|
|
|
|
|
|
|
|
|
|
Only files can be renamed through this endpoint. The old EPUB cache path is
|
|
|
|
|
cleared before the rename.
|
|
|
|
|
|
|
|
|
|
### `POST /move`
|
|
|
|
|
|
|
|
|
|
Moves a file into an existing folder.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST -d "path=/Books/mybook.epub&dest=/Read" http://crosspoint.local/move
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Form parameters:
|
|
|
|
|
|
|
|
|
|
| Parameter | Required | Description |
|
|
|
|
|
|-----------|----------|-------------|
|
|
|
|
|
| `path` | Yes | Existing file path |
|
|
|
|
|
| `dest` | Yes | Existing destination folder |
|
|
|
|
|
|
|
|
|
|
Only files can be moved through this endpoint. The old EPUB cache path is
|
|
|
|
|
cleared before the move.
|
|
|
|
|
|
|
|
|
|
### `POST /delete`
|
|
|
|
|
|
|
|
|
|
Deletes one or more files or empty folders.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
```bash
|
2026-05-20 01:39:04 +03:00
|
|
|
curl -X POST -d "path=/Books/mybook.epub" http://crosspoint.local/delete
|
|
|
|
|
curl -X POST -d 'paths=["/Books/old.epub","/OldFolder"]' http://crosspoint.local/delete
|
2026-01-21 14:29:39 +01:00
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Form parameters:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Parameter | Required | Description |
|
|
|
|
|
|-----------|----------|-------------|
|
|
|
|
|
| `path` | Yes, unless `paths` is provided | Single path to delete |
|
|
|
|
|
| `paths` | Yes, unless `path` is provided | JSON array of paths to delete |
|
|
|
|
|
|
|
|
|
|
Protected items cannot be deleted. Non-empty folders are rejected. EPUB cache
|
|
|
|
|
data for deleted files is cleared.
|
|
|
|
|
|
|
|
|
|
## Settings API
|
|
|
|
|
|
|
|
|
|
### `GET /api/settings`
|
|
|
|
|
|
|
|
|
|
Returns a streamed JSON array of editable settings. Each item contains common
|
|
|
|
|
fields plus type-specific fields.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl http://crosspoint.local/api/settings
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Example item:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"key": "fontSize",
|
2026-07-26 01:02:49 +03:00
|
|
|
"name": "Reader Font Size",
|
2026-06-07 21:47:44 +02:00
|
|
|
"category": "Reader",
|
|
|
|
|
"type": "enum",
|
|
|
|
|
"value": 1,
|
2026-07-26 01:02:49 +03:00
|
|
|
"options": ["12 pt", "14 pt", "16 pt", "18 pt"]
|
2026-06-07 21:47:44 +02:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2026-07-26 01:02:49 +03:00
|
|
|
`value` is always an index into `options`, never the option's text. `fontSize`
|
|
|
|
|
is one of the settings whose `options` are built at request time — they are the
|
|
|
|
|
point sizes the selected font family actually ships, so a family installed at
|
|
|
|
|
10/12/14 offers three options. (`fontFamily` and `dictionaryName` vary the same
|
|
|
|
|
way, from the SD card contents.)
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Types:
|
|
|
|
|
|
|
|
|
|
| Type | Extra fields |
|
|
|
|
|
|------|--------------|
|
|
|
|
|
| `toggle` | `value` (`0` or `1`) |
|
|
|
|
|
| `enum` | `value`, `options` |
|
|
|
|
|
| `value` | `value`, `min`, `max`, `step` |
|
|
|
|
|
| `string` | `value` |
|
|
|
|
|
|
|
|
|
|
The font-family setting includes SD-card font families when they are installed.
|
|
|
|
|
|
|
|
|
|
### `POST /api/settings`
|
|
|
|
|
|
|
|
|
|
Applies a partial settings update from a JSON object.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"fontSize":2,"showHiddenFiles":1}' \
|
|
|
|
|
http://crosspoint.local/api/settings
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Successful response:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-05-20 01:39:04 +03:00
|
|
|
```text
|
2026-06-07 21:47:44 +02:00
|
|
|
Applied 2 setting(s)
|
2026-01-21 14:29:39 +01:00
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
## Font Management API
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### `GET /api/fonts`
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Lists installed SD-card font families.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
```bash
|
|
|
|
|
curl http://crosspoint.local/api/fonts
|
2026-01-21 14:29:39 +01:00
|
|
|
```
|
2026-06-07 21:47:44 +02:00
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"maxFamilies": 128,
|
|
|
|
|
"families": [
|
|
|
|
|
{
|
|
|
|
|
"name": "Literata",
|
|
|
|
|
"sizes": [12, 14, 16, 18],
|
|
|
|
|
"files": [
|
|
|
|
|
{"name": "Literata_12.cpfont", "size": 123456}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/fonts/upload`
|
|
|
|
|
|
|
|
|
|
Uploads one `.cpfont` file into a family folder.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-F "family=Literata" \
|
|
|
|
|
-F "file=@Literata_12.cpfont" \
|
|
|
|
|
http://crosspoint.local/api/fonts/upload
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The handler validates the family name, `.cpfont` filename, and `CPFONT` magic
|
|
|
|
|
bytes before accepting the file.
|
|
|
|
|
|
|
|
|
|
Successful response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{"ok":true}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/fonts/delete`
|
|
|
|
|
|
|
|
|
|
Deletes an installed font family.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"family":"Literata"}' \
|
|
|
|
|
http://crosspoint.local/api/fonts/delete
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Successful response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{"ok":true}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## OPDS Server API
|
|
|
|
|
|
|
|
|
|
### `GET /api/opds`
|
|
|
|
|
|
|
|
|
|
Lists saved OPDS servers. Passwords are never returned.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl http://crosspoint.local/api/opds
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"index": 0,
|
|
|
|
|
"name": "My Catalog",
|
|
|
|
|
"url": "http://calibre.local:8080/opds",
|
|
|
|
|
"username": "reader",
|
|
|
|
|
"hasPassword": true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/opds`
|
|
|
|
|
|
|
|
|
|
Adds or updates an OPDS server. Include `index` to update an existing entry.
|
|
|
|
|
If `password` is omitted during an update, the existing password is preserved.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"name":"My Catalog","url":"http://calibre.local:8080/opds","username":"reader","password":"secret"}' \
|
|
|
|
|
http://crosspoint.local/api/opds
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/opds/delete`
|
|
|
|
|
|
|
|
|
|
Deletes an OPDS server by index.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"index":0}' \
|
|
|
|
|
http://crosspoint.local/api/opds/delete
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Wi-Fi Credential API
|
|
|
|
|
|
|
|
|
|
### `GET /api/wifi`
|
|
|
|
|
|
|
|
|
|
Lists saved Wi-Fi networks. Passwords are never returned.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl http://crosspoint.local/api/wifi
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
"index": 0,
|
|
|
|
|
"ssid": "HomeWiFi",
|
|
|
|
|
"hasPassword": true,
|
|
|
|
|
"isLastConnected": true
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/wifi`
|
|
|
|
|
|
|
|
|
|
Adds or updates a saved Wi-Fi network. Include `index` to update an existing
|
|
|
|
|
entry. If `password` is omitted during an update, the existing password is
|
|
|
|
|
preserved.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"ssid":"HomeWiFi","password":"secret"}' \
|
|
|
|
|
http://crosspoint.local/api/wifi
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### `POST /api/wifi/delete`
|
|
|
|
|
|
|
|
|
|
Deletes a saved Wi-Fi network by index.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
|
-d '{"index":0}' \
|
|
|
|
|
http://crosspoint.local/api/wifi/delete
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## WebSocket Upload
|
|
|
|
|
|
|
|
|
|
### Port 81
|
|
|
|
|
|
|
|
|
|
The WebSocket path is used for fast binary uploads from the file manager and
|
|
|
|
|
Calibre plugin workflows.
|
|
|
|
|
|
|
|
|
|
Connection:
|
|
|
|
|
|
|
|
|
|
```text
|
2026-01-21 14:29:39 +01:00
|
|
|
ws://crosspoint.local:81/
|
|
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Protocol:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
1. Client sends text: `START:<filename>:<size>:<path>`
|
|
|
|
|
2. Server replies `READY`
|
|
|
|
|
3. Client sends binary chunks
|
|
|
|
|
4. Server sends `PROGRESS:<received>:<total>` every 64 KB or at completion
|
|
|
|
|
5. Server sends `DONE` when complete or `ERROR:<message>` on failure
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Example session:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
```text
|
|
|
|
|
Client -> START:mybook.epub:1234567:/Books
|
|
|
|
|
Server -> READY
|
|
|
|
|
Client -> [binary chunk]
|
|
|
|
|
Server -> PROGRESS:65536:1234567
|
2026-01-21 14:29:39 +01:00
|
|
|
...
|
2026-06-07 21:47:44 +02:00
|
|
|
Server -> DONE
|
2026-01-21 14:29:39 +01:00
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Error messages include:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
| Message | Cause |
|
|
|
|
|
|---------|-------|
|
|
|
|
|
| `ERROR:Upload already in progress` | A second upload was started before the first completed |
|
|
|
|
|
| `ERROR:Invalid START format` | Malformed START message or invalid size token |
|
|
|
|
|
| `ERROR:Failed to create file` | Destination file could not be opened |
|
|
|
|
|
| `ERROR:No upload in progress` | Binary data arrived without a matching START |
|
|
|
|
|
| `ERROR:Upload overflow` | Client sent more bytes than declared |
|
|
|
|
|
| `ERROR:Write failed - disk full?` | SD write failed |
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Incomplete WebSocket uploads are deleted on disconnect or error.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
## WebDAV
|
|
|
|
|
|
|
|
|
|
The same HTTP server registers a WebDAV-compatible handler for file manager clients.
|
|
|
|
|
|
|
|
|
|
Supported methods:
|
|
|
|
|
|
|
|
|
|
```text
|
|
|
|
|
OPTIONS, GET, HEAD, PUT, DELETE, PROPFIND, MKCOL, MOVE, COPY, LOCK, UNLOCK
|
2026-01-21 14:29:39 +01:00
|
|
|
```
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Notes:
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
- `PUT` writes to a temporary `.davtmp` file first, then renames it into place.
|
|
|
|
|
- Protected paths are rejected.
|
|
|
|
|
- `LOCK` and `UNLOCK` are accepted for client compatibility only. The server
|
|
|
|
|
does not implement full WebDAV Class 2 locking semantics such as persistent
|
|
|
|
|
locks or lock discovery.
|
|
|
|
|
|
|
|
|
|
## UDP Discovery
|
|
|
|
|
|
|
|
|
|
The server listens on UDP port `8134`. When it receives the text payload
|
|
|
|
|
`hello`, it replies to the sender with:
|
|
|
|
|
|
|
|
|
|
```text
|
|
|
|
|
crosspoint (on <hostname>);81
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The final field is the WebSocket upload port.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
## Network Modes
|
|
|
|
|
|
|
|
|
|
### Station Mode (STA)
|
2026-06-07 21:47:44 +02:00
|
|
|
|
|
|
|
|
- Device joins an existing 2.4 GHz Wi-Fi network.
|
|
|
|
|
- `crosspoint.local` is advertised with mDNS when available.
|
|
|
|
|
- `/api/status` returns `"mode": "STA"` and RSSI in dBm.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
|
|
|
|
### Access Point Mode (AP)
|
|
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
- Device creates an open hotspot named `CrossPoint-Reader`.
|
|
|
|
|
- The device shows a Wi-Fi QR code and URL QR code.
|
|
|
|
|
- The fallback IP is typically `192.168.4.1`.
|
|
|
|
|
- `/api/status` returns `"mode": "AP"` and `"rssi": 0`.
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
### Calibre Wireless
|
2026-01-21 14:29:39 +01:00
|
|
|
|
2026-06-07 21:47:44 +02:00
|
|
|
Calibre Wireless starts the same web server in STA mode and displays setup
|
|
|
|
|
instructions plus WebSocket upload progress on the device screen.
|