/      日本語

Notes When Installing on Raspberry Pi

Notes for installing the TWELITE STAGE APP on Raspberry Pi
RasPi

TWELITE STAGE APP runs on Raspberry Pi except for some models.

  • Supports mouse and touch screen.
  • Comes with a build toolchain, allowing compilation.
  • In addition to the X11 version executable, there is a framebuffer version (nox), as well as a lightweight version that omits translucent effects and others.

Environment

The development and operation have been confirmed in the following environment.

Hardware

  • Raspberry Pi 3 Model B
  • LCD Screen: Raspberry Pi Touch Display (7")

Software

  • Raspberry PI OS (32bit) Lite (Version: August 2020)

Known Issues and Limitations

  • On the first startup, /dev/serial0 may fail to operate.
  • Operation of /dev/serial0 on Raspberry Pi 4B has not been verified.
  • Operation of the touchscreen on Raspberry Pi 4B has not been verified.
  • Input strings to TWELITE STAGE are also passed as-is to shells or getty running on /dev/tty1. It is recommended to start from /dev/tty1.
  • It may be affected by other installed or running programs (such as X11).

Extracting the Archive

Extract the downloaded archive file into a folder whose path does not contain spaces or Japanese characters.

Below, it is extracted into the Raspberry Pi home folder.


cd /home/pi
unzip MWSTAGE2020_XX_YYYY.zip

Folder Structure

../MWSTAGE
     TWELITE_Stage.run    TWELITE_Stage app
     BIN/                 Firmware BIN files
     MWSDK/               MWSDK libraries, etc.
     TWELITE_Stage/       TWELITE_Stage app related files

Device Drivers

To recognize MONOSTICK or TWELITE R from TWELITE STAGE, it is necessary to unload the ftdi_sio module and grant read/write permissions to the USB device.

A udev configuration script is provided to automate this setting. Copy the definition to /etc/udev/rules.d and reload the settings. After setting, unplug and plug the USB device before running TWELITE_Stage.run. If the USB device is displayed on the screen immediately after startup, the setting has been applied.


cd ./MWSTAGE/TWELITE_Stage/INSTALL/ubuntu/
sudo ./set_udev_sudo.sh

Definition file (formatted with line breaks for readability)

ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"
ACTION=="add",
   ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015",
   MODE="0666",
   RUN+="/bin/sh -c 'rmmod ftdi_sio && rmmod usbserial'"

Handling Serial Ports

In the above environment, /dev/serial0 can be used by configuring the serial port via raspi-config.


sudo raspi-config

From the menu

  "3 Interface Options    Configure connections to peripherals"
  →"P6 Serial Port Enable/disable shell messages on the serial connection"

Select as follows to disable login shell usage and enable hardware.

  "Would you like a login shell to be accessible over serial?" -> 
  "Would you like the serial port hardware to be enabled?" → 

Wiring Example

 [TWELITE]               [Raspberry Pi]
  GND  ------------------ Ground (#6,#9,#14,#20,#25,#30,#34,#39 one of these)
  TXD(DIO6,DIP#10) ------ GPIO15/UART0 RXD (#10)
  PRG(SPIMISO,DIP#7) ---- GPIO23 (#16)
  RXD(DIO7,DIP#3) ------- GPIO14/UART0 TXD (#8)
  RST(RESETN,DIP#21) ---- GPIO22 (#15)
  VCC  ------------------ 3V3 (#1,#17 one of these)
  SET(DIO12,DIP#15) ----- GPIO12 (#32)
  • Please refer to the manuals of both TWELITE and Raspberry Pi.
  • DIP# refers to the pin number of the TWELITE DIP.
  • The above wiring does not guarantee stable operation of TWELITE.

Starting TWELITE STAGE APP

  • The framebuffer version (nox) does not work on the X11 desktop. Please exit X11.
  • Run TWELITE_Stage.run. The TWELITE STAGE APP will be displayed on the screen.

Notes

  • Supports mouse and touch panel.
  • Input characters in the TWELITE STAGE APP may also be displayed on the console screen.

Others

/dev/dri Error

If the following error appears when starting TWELITE_Stage.run, you can ignore it.

  "The path /dev/dri/ cannot be opened or is not available"

Insufficient Memory

If the number of CPUs is 4 or more, parallel compilation will be executed with one less than the number of CPUs during build (3 parallel for 4 cores). Insufficient memory may occur in some cases. In that case, please change the number of parallel jobs.

Raspberry Pi 4

Raspberry Pi OS (bookworm)