Raspberry Pi: static IP address

  • Raspberry Pi 3 model B

To set Raspberry Pi static IP address, e.g

  • Modify /etc/network/interfaces
#iface eth0 inet dhcp
iface eth0 inet static
  • Add to /etc/dhcpcd.conf
interface eth0
static ip_address=
static routers=
static domain_name_servers=


Raspberry Pi: slow mouse cursor

  • Raspberry Pi 3 model B

If changing mouse cursor speed in Raspberry Pi Preferences does not work for you try this:

$ sudo nano /boot/cmdline.txt
# Add the bold text at the end of the line:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles usbhid.mousepoll=0

Taken from Mouse pointer speed.


Raspberry Pi: Dart Hello BC2835

  • Ubuntu 16.04 LTS
  • arm-linux-gnueabihf (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
  • Dart SDK, master 511963d71509de50ac577ac22f3bac8d33c17e34
  • Raspberry Pi 3 model B
Install ARM toolchain

See Raspberry Pi: C++ cross-compiling

Build and install Dart SDK for ARM

See Dart: build Dart SDK for x86 and ARM

Optionally, copy dart-api.h to /usr/local/include:

$ cd dart-sdk/sdk/out
$ find . -name dart_sdk.h
$ cp ./ReleaseXARM/dart-sdk/include/dart_api.h /usr/local/include
Build and install libbcm2835.so

See Raspberry Pi: cross-compile bcm2835 library

Build  missing Dart SDK ARM libraries
# libunsafe_extension.git
$ git clone https://github.com/mezoni/unsafe_extension.git
$ cd unsafe_extension/lib/src/
$ arm-linux-gnueabihf-gcc -shared -fPIC -I/home/username/tools/sdk-dart/sdk/out/ReleaseXARM/dart-sdk/include unsafe_extension.cc -o libunsafe_extension.cc
$ scp libunsafe_extension.so pi@192.168.0.xxx:~
# libffi6_extension.so
$ git clone https://github.com/mezoni/libffi6_extension.git
$ cd libffi6_extension/lib/src/
$ arm-linux-gnueabihf-gcc -shared -fPIC -I/home/username/tools/sdk-dart/sdk/out/ReleaseXARM/dart-sdk/include ffi6_extension.cc -o libffi6_extension.so
$ scp libffi6_extension.so pi@192.168.0.xxx:~
Install the libraries on Raspberry Pi
# On Raspberry Pi
$ sudo mv libbcm2835.so /usr/lib
$ sudo mv libunsafe_extension.so /usr/lib
$ sudo mv libffi6_extension.so /usr/lib
$ sudo ldconfig
Dart Hello BCM2835 project
# On Raspberry Pi
$ git clone https://github.com/yolkhovyy/dart-hello-bcm2835.git
$ cd dart-hello-bcm2835
$ pub get
Resolving dependencies... (1.6s)
Got dependencies!
$ dart bin/main.dart
Hello bcm2835!
Unhandled exception:
Bad state: File not found: bcm2835.lib.h
#0      Declarations.Declarations (package:binary_declarations/src/binary_declarations/declarations.dart:25:7)
#1      _Declarations.declare (package:binary_types/src/declarations.dart:37:28)
#2      BinaryTypeHelper.declare (package:binary_types/src/type_helper.dart:143:24)
#3      Bcm2835Lib.Bcm2835Lib (package:bcm2835_bindings/src/bcm2835_bindings/bcm2835.lib.dart:17:14)
#4      loadBcm2835Library (package:bcm2835_bindings/src/bcm2835_bindings/bcm2835_lib_loader.dart:23:14)
#5      main (file:///home/pi/projects/spikes/bcm2835/dart/bin/main.dart:13:27)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

TODO: figure out why bcm2835.lib.h is missing.

Update: bcm2835_bindings is not maintained anymore – dead end?