0.0.21 • Published 3 months ago

jaculus-tools v0.0.21

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
3 months ago

Jaculus-tools - Companion application/library for Jaculus

Jaculus tools allow for uploading and downloading files, as well as controlling the running Jaculus runtime on the device.

Setup

First, install node.js and npm. Then, install jaculus-tools with:

npm install -g jaculus-tools

Then, you can run the tools using:

jac

or

npx jac

Usage

To see the list of available commands, use:

jac help

To see help for a specific command, use:

jac help <command>

To connect to the device using serial port, the correct driver must be installed - most likely CP210x USB to UART Bridge.

Installing Jaculus firmware to the device

First, the Jaculus runtime must be installed on the device.

The runtime can be installed using the following command:

jac install --package <package.tar.gz> --port <port>

The command will download the selected package and install it on the device (packages can be found on the downloads page). The package info can be viewed using the --info flag.

Verify that the runtime is installed correctly by running:

jac version

Connecting to the device

All commands interacting with the device require specifying the device connection using either --port or --socket option.

To connect to the device using serial port, use:

jac --port <port> <command>

To connect to the device using TCP socket, use:

jac --socket <host>:<port> <command>

To list available serial ports, use:

jac list-ports

To tunnel serial port over TCP, use:

jac serial-socket --port <port> --socket <port>

Creating and running TypeScript programs

Create a new TypeScript project. A template project for ESP32 with examples is available on GitHub.

Compile the project to JavaScript:

jac build

The output will be written to the build directory.

Flash the JavaScript program to the device:

jac flash

After flashing, the program will be immediately executed on the device.

The entry point of the program is the index.ts file at the root of the project.

Creating and running JavaScript programs

Create a directory for your source files.

Flash the JavaScript program to the device (<path> should point to the source directory):

jac flash --from <path>

After flashing, the program will be immediately executed on the device.

The entry point of the program is the index.js file in the source directory.

Controlling the device and monitoring its output

To control the device, use the following commands:

jac start <path>
jac stop
jac status
jac monitor

Updating the firmware

To update the firmware, just install the new runtime package using the install command.

Note that this will erase all data stored on the device. It may be also necessary to update the type definitions for the runtime. They can be found in the example project on GitHub.

License

Everything in this repository, unless otherwise noted, is licensed under the GNU General Public License, version 3.0.

0.0.21

3 months ago

0.0.20

3 months ago

0.0.19

6 months ago

0.0.17-rc.2

7 months ago

0.0.16

8 months ago

0.0.17

7 months ago

0.0.17-rc.1

7 months ago

0.0.18

7 months ago

0.0.17-rc.0

7 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

11 months ago

0.0.13

11 months ago

0.0.14

11 months ago

0.0.15

10 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago