Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turbolent/newtonkit
An implementation of the Apple Newton Dock protocol in Swift
https://github.com/turbolent/newtonkit
apple messagepad newton swift
Last synced: 7 days ago
JSON representation
An implementation of the Apple Newton Dock protocol in Swift
- Host: GitHub
- URL: https://github.com/turbolent/newtonkit
- Owner: turbolent
- License: mit
- Created: 2018-04-22T20:34:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T21:43:27.000Z (11 months ago)
- Last Synced: 2024-11-01T19:52:29.965Z (14 days ago)
- Topics: apple, messagepad, newton, swift
- Language: Swift
- Homepage:
- Size: 283 KB
- Stars: 13
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
An implementation of the Apple Newton Dock protocol in Swift.
## Usage
### Connection type
#### TCP
On your computer, run:
```sh
swift run tcp
```This will start a TCP server on the Newton Dock port 3679.
Once you see `Waiting for connection ...`, start the Dock application on your Newton and initiate a TCP/IP connection.
The connection is succesfully established once `Connected` appears, at which point you may enter a command (see below).#### Serial
On your computer, run:
```sh
swift run serial
```Where `` is the path to the serial device the Newton is connected to. On macOS, you should use the `/dev/cu.usbserial-*` device which appears when a USB-to-serial adapter is used. On Linux, the device name is likely `/dev/ttyUSB*` or `/dev/ttyS*`.
Once you see `Waiting for connection ...` start the Dock application on your Newton and initiate a serial connection.
The connection is succesfully established once `Connected` appears, at which point you may enter a command.### Commands
- `keyboard`: Start keyboard passthrough. Enter `.stop` to stop and return to the command prompt.
- `info`: Get Newton system information
- `backup`: Start backup (work in progress)
- Notes are exported as HTML files to `~/Library/Application Support/Newton/Backups/Notes/`
- `load `: Install the package at the given pathCurrently only Newton OS 2.x devices (MessagePad 130/2000/2100 and eMate) are supported.
## Development
### Einstein
NewtonKit works with the [Einstein](https://github.com/pguyot/Einstein) Newton OS emulator.
Make sure to use at least the [pre-release version with serial port emulation](https://github.com/pguyot/Einstein/releases/tag/2017.2.extr).Once you have Einstein running, use [socat](http://www.dest-unreach.org/socat/) to create a PTY device for the named pipes created by Einstein:
```sh
socat -d -d PTY,raw,mode=666,echo=0,link=$HOME/einstein \
PIPE:$HOME/Library/Application\ Support/Einstein\ Emulator/ExtrSerPortSend\!\!PIPE:$HOME/Library/Application\ Support/Einstein\ Emulator/ExtrSerPortRecv
```Then start the NewtonKit command line tool:
```
swift run serial $HOME/einstein
```