Quick start

desktop

Desktop computers

Step 1: download an start the server

If your computer does not have Oracle Java installed (version 8+), download it from http://java.com and install it. Ensure that the java executable is in your PATH.

Download an unzip the file brain4it-server-standalone-1.0.zip into your home directory.

Enter the brain4it-server-standalone-1.0 folder and execute the bin/startup.bat script (Windows) or bin/startup.sh (UNIX):

[2018-10-04 19:23:02] [INFO] Initializing FileSystemStore... 
[2018-10-04 19:23:03] [INFO] Store: org.brain4it.server.store.FileSystemStore 
[2018-10-04 19:23:03] [INFO] Multi-tenant mode: false 
[2018-10-04 19:23:03] [INFO] Access key: false 
[2018-10-04 19:23:03] [INFO] Access key file: null 
[2018-10-04 19:23:03] [INFO] Starting server 
[2018-10-04 19:23:03] [INFO] Remove file /Users/realor/brain4it-server-standalone-1.0/conf/shutdown to stop server. 
[2018-10-04 19:23:03] [INFO] Base path: /Users/realor/brain4it_modules 
[2018-10-04 19:23:03] [INFO] Loading libraries... 
[2018-10-04 19:23:03] [INFO] Loading library Core 
[2018-10-04 19:23:03] [INFO] Loading library Module 
[2018-10-04 19:23:03] [INFO] Loading modules... 
[2018-10-04 19:23:04] [INFO] Server listening on port 9.999
            

Now the server is running and listening on port 9999. To stop it nicely you have these options:

If the server is not stopped by any of the above methods, its modules will not be saved and their data could be lost.

Step 2: download and run the manager

Download the brain4it-manager-swing-1.0.jar and copy it into your home directory.

Doble click the jar file or open a new command shell in that directory and start the manager application with this command:

> java -jar brain4it-manager-swing-1.0.jar
            

If the command is successful, the Brain4it manager window will appear.

Step 3: connect to the server from the manager

Ensure that your Brain4it server in running. Add it to the workspace from the menu option File > Add server...

Give the server a name, for example, localhost, enter this URL: http://localhost:9999 and press Accept button. The server will be added to the workspace.

Select that server in the workspace and create a new module with the menu option File > Create module...

Enter the module name, for example, test, and press Accept button. The module will be created.

Double click the module test. On the right side of the window a console panel will appear.

Type the command (+ 2 3). The server will evaluate this expression and return the value 5.


android

Android devices

Step 1: download, install and start the server app

Download the file brain4it-server-android-1.0.apk and install it in your android device. You may need to activate the option Device settings > General > Security > Unknown sources to install the app.

Once installed, a new app called "Brain4it Server" will appear in your application list.

Enter the app and press the Start button.

The Brain4it server for android is now running. The app shows the ip address and port where it accepts connections.

Step 2: download, install and run the manager app

Download the file brain4it-manager-android-1.0.apk and install it in your android device.

Once installed, a new app called "Brain4it Manager" will appear in your application list. Enter the app. The first time, you will see an empty server list.

Step 3: connect to the server from the manager

Inside the Brain4it Manager app, select the menu option "Add server" (plus icon):

Give the server a name, for example, localhost, enter the URL of your server: http://localhost:9999 and press the Ok button.

The localhost server will now appear in the server list.

Click on that server to see its modules.

Select the menu option "Create module" (asterisk icon)

Enter the module name, for example, test, and press Ok. The module test will appear in the module list of the localhost server.

Enter the test module and press the prompt icon to access the console.

Type the command (tts (format-date (date))) and press ENTER or the Execute button. Your android device will give you the time.

Top