api to communicate with modem via usb serial port.
431
this app is just an api made just for communicating to a fibocom modem using AT commands. you can send commands to send sms, read sms, delete sms. to communicate with it, here are some commands:
(this is for sending sms) POST /sms/messages Headers: Content-Type: application/json, X-API-Key (optional) Body: { "number": "+4712345678", "text": "Your message" } Response: { "status": "sent" }
(this is for receiving messages) Get Inbox (new messages) GET /sms/inbox Headers: X-API-Key (optional) Response: { "messages": [ { "id": "...", "sender": "+47...", "text": "...", "timestamp": "..." } ] }
(this fetches all messages if they weren't deleted) Get All Messages GET /sms/messages Headers: X-API-Key (optional) Response: { "messages": [ ... ] }
(this clears the storage for sim card sake) Clear Modem SIM Storage (v6.1.3+) DELETE /sms/modem Headers: X-API-Key (optional) Response: { "success": true }
here is the docker compose file:
services:
kusha:
build: .
image: kusha:1.0.2
container_name: kusha
restart: unless-stopped
group_add:
- dialout
devices:
- /dev/ttyACM0:/dev/ttyACM0
ports:
- "6969:6969"
volumes:
- kusha-data:/app/data
environment:
- SMS_API_KEY=${SMS_API_KEY:-}
# - SMS_DISABLE_SSL=true # Uncomment for HTTP instead of HTTPS
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "--no-check-certificate", "https://127.0.0.1:6969/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
kusha-data:
name: kusha-data
Content type
Image
Digest
sha256:67fffaafe…
Size
22.5 MB
Last updated
9 months ago
docker pull talentlesshack/kusha