Documents

API references

FAQ and tips

How to upload an application at runtime?

Approach #1: Use a USB cable

You can access the SD card by connecting EV3 to PC with a USB cable. Just place the new application into the ev3rt/apps folder.

Approach #2: Transfer via Bluetooth PAN

EV3RT supports user to effortlessly transfer an application wirelessly via Bluetooth PAN. In order to do that, you should select Load App->Bluetooth PAN from the menu after connecting the EV3 brick to your PC. Then, you can use make upload command under sdk/workspace to send the application from the PC.

By default, the app file under sdk/workspace will be sent to the EV3 with default IP address 10.0.10.1 and be stored under the /ev3rt/apps folder in the SD card.

You can also specify the IP address, file to be sent, file name to be stored. For example, following command will send myapp to the EV3 with IP address 10.0.11.1 and store it under /ev3rt/apps with the name helloev3.

make upload ip=10.0.11.1 from=myapp to=helloev3

How to connect to Bluetooth?

Bluetooth will be enabled automatically when EV3RT is started by default. The device name is Mindstorms EV3 and PIN code is 0000 by default and can be changed by editing ev3rt/etc/rc.conf.ini in the SD card.

EV3RT supports standard Bluetooth SPP (Serial Port Profile) and PAN (Personal Area Network) services. You can connect to it with the Bluetooth functionality provided by your OS (e.g. general Bluetooth support in Windows).

Following screenshots show how to use Bluetooth PAN in different OSes.


How to program with Bluetooth?

Bluetooth can be accessed with file I/O functions (e.g. fprintf() and fgetc()). The special file of Bluetooth can be opened by ev3_serial_open_file(EV3_SERIAL_BT).

For example, you can implement a Bluetooth counter as follows:

FILE *bt = ev3_serial_open_file(EV3_SERIAL_BT);
for (int i = 1;; i++) {
    fprintf(bt, "Bluetooth counter %d\n", i);
    tlsp_tsk(1000); // Sleep for 1 sec
}

How to turn off Bluetooth?

Bluetooth can be turned off by editing ev3rt/etc/rc.conf.ini in the SD card as follows.

[Bluetooth]
TurnOff=1

On startup of EV3RT, log message Bluetooth is turned off. will be shown instead of Bluetooth device address.