[v0.2a wip] Radxa RockpiS build instructions for online play

Online games, how to get online, and anything involving Dreamcast online can be discussed here.

Moderator: pcwzrd13

User avatar
OatBob
MegaDeath
Posts: 215

[v0.2a wip] Radxa RockpiS build instructions for online play

Post#1 » Sat Jun 24, 2023 2:43 am

Introducing the Radxa Rock Pi S, an alternative to the Raspberry Pi, as a linux server running the dreampi script. This device is a single-board computer using Rockchip RK3308. It measures 1.7-inch square (47mm square), and offers 1x USB-A, Ethernet, and optional wifi. Most importantly, Rockpi S is readily available online on ebay and aliexpress for under US$40.

General information on the wiki:
https://wiki.radxa.com/RockpiS

Project goals
  1. Release image for lay users to connect quickly.
  2. Document build setup to inform others building their own environment from scratch. Dreampi script is packaged as armhf, and RockpiS is arm64 architecture.
  3. Get more people online in time for Driving Strikers release.

01) Hardware requrements
  • Radxa RockpiS
  • microSD Card (any class-10 will do, 4Gb or more)
  • microSD card reader
  • USB-C to USB-A cable (power and adb)
  • RJ-45 ethernet connected to LAN

Remainder of "dreampi" kit (not covered in this guide)
  • Dreamcast with DC modem
  • Linux-compatible USB modem
  • Line-voltage inducer
  • RJ-11 telephone cable
  • Planetweb 2.62 Browser - recommended for testing
02) Downloads
Image (debian-buster stable)
https://wiki.radxa.com/RockpiS/downloads

Balena Etcher (any OS, portable version is good)
https://etcher.balena.io

PuTTy
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Android debug bridge (ARM developer tool)
https://developer.android.com/tools/releases/platform-tools

03) Etcher
- Load microSD card to PC
- Run Etcher
  • select image
  • select card
  • flash
04) Insert microSD card into Rockpi S
-plug USB-C to RockpiS and USB-A end to PC for power and adb connection
(green light is power)
(green + blue-flashing means debian linux managed to boot)

05) Finding IP address
IP address needs to be known for SSH tunnel. This can be found by several methods. All methods listed here can be executed on any platform (Windows/Mac/Linux, etc...).
  1. Using your home router firmware, look at connected devices. Device name is "rockpis".
  2. Use free scanning software like nmap or angryip.
  3. Android Debug Brige (adb). It's slightly more difficult than other methods, but step-by-step instructions are included here.

05c) Finding IP address of RockPiS
- Make sure RockPiS is powered by the PC via USB-C to USB-A cable.

Download adb:
https://developer.android.com/tools/releases/platform-tools

- Open windows powershell, go to directory
(for Win11 Explorer: go to folder, alt+F then "open terminal")

- List connected devices:

Code: Select all

platform-tools/adb devices

- enter device:

Code: Select all

platform-tools/adb shell

- get ip address and remember it:

Code: Select all

ifconfig
exit
exit

---------------------------------

TIP: send with "push" file or dir from PC to Rock (before entering shell)

Code: Select all

   adb push <local_dir> </target_dir/>
   adb pull <local_dir> </target_dir/>


NOTE: These characters need escape codes
( ) < > | ; & * \ ~ " '

NOTE: many special characters and escape codes in windows powershell takes priority over the adb shell and behave unexpectedly. We will now connect using SSH instead.

06) Install PuTTy and connect via SSH
Download:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Connect to rockpis via SSH using PuTTy
- Input IP address from earlier
- port 22
- SSH connection type
- name saved session "rockpis" and hit 'save'
- click 'open'

- user: rock | password: rock

Code: Select all

   sudo su #input password to confirm
   cd /

- tell the children "We're in."

Useful Linux commands

Code: Select all

   #list hardware architecture(s)
      dpkg --print-architecture
      dpkg --print-foreign-architectures
   # system information
      uname -a
   # filesystem information
      df -H
   #configure timezone
      dpkg-reconfigure tzdata

NOTE: (right-click in shell can paste from clipboard)

07) Radxa updates
#install instructions: https://wiki.radxa.com/RockpiS/Debian
#update instructions: https://wiki.radxa.com/RockpiS/radxa-apt

Code: Select all

   sudo apt update
   sudo apt install wget
   export DISTRO=buster-stable
   wget -O - apt.radxa.com/$DISTRO/public.key | sudo apt-key add -
   sudo apt update
   sudo apt full-upgrade
   # (Y) for all options, then enter region and timezone code
   exit
   exit

   #reboot now


08) Setup MULTIARCH

Code: Select all

   dpkg --add-architecture armhf

   #useful commands
   dpkg --print-architecture
   dpkg --print-foreign-architectures


09) Install packages

Code: Select all

   sudo apt install git-all
   apt install dnsmasq dnsutils libnetfilter-queue-dev libnetfilter-queue1 ppp arping nftables tcpd wvdial
   sudo apt install syslog-ng
   # these last packages do not seem necessary.
   #  sudo apt-get install -y git user-mode-linux libslirp-helper


10) Install dreampi

Code: Select all

   git clone https://github.com/Kazade/dreampi
   cd dreampi
   dpkg -i arm/*.deb
      # note: it's broken. We can fix and retry
   sudo apt update
   sudo apt full-upgrade
   apt --fix-broken install
   dpkg -i arm/*.deb

   mkdir /usr/local/share/dreampi
   cp *.py dial-tone.wav /usr/local/share/dreampi
   ln -s /usr/local/share/dreampi/dreampi.py /usr/local/bin/dreampi
   chown -R rock:rock /usr/local/share/dreampi/

   cp etc/init.d/dreampi /etc/init.d/
   cp etc/systemd/system/dreampi.service /etc/systemd/system/

- update dreampi.conf as described here:
https://github.com/Kazade/dreampi/issues/17

Code: Select all

cd /etc/dnsmasq.d/
cat > dreampi.conf

- Ctrl+D when finished to save

11) Install Python3

Code: Select all

   sudo apt install python3 -y
      # long install. Now is a good time for a break.
   wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
   tar -xvf Python-3.7.3.tgz
   
   python3 -V

   sudo apt install python3-pip
   pip3 --version
   
   pip3 install -r /dreampi/requirements.txt
   
   apt install --upgrade python3-iptables


12) Run dreampi script

Code: Select all

   dreampi --no-daemon

- Modem should activate 2nd light now.
- Try to connect using web browser at this point. PlanetWeb 2.62 is recommended.
- Dreamcast browser setup here:
[DreamcasticChannel] How To: Get Your Dreamcast Online (DreamPi) | 2017 Edition
- From any computer on your network, find Dreamcast Now website and attempt config. In 2023 you will need to disable a browser security feature to discover the RockPi.
PSA: Issue with Configuring DC Now on Chromium Browsers




Additional comments
Landmarks:
  • 06/17 - connect browser to plain internet, and dreampipe portal.
  • 06/23 - Logged into Quake III - Mechanic's server
  • 06/25 - F - third build is broken, but now I have a streamlined procedure.
  • 06/28 - fourth build successful, streamlined process that connects to dreampipe. Fails to recognize Dreamcast Now
  • 07/05 - installing syslog fixes Dreamcast Now connection.

To do:
  • Setup wifi config
  • release working image(s)
  • User experience add-ons (FTP server for save transfer, web browser enhancement)
  • Match the dreamcastlive DreamPi1.8DLE image features for Raspberry Pi. here
    • add SEGA RPG FAN's tunneling software for Capcom's KDDI, Saturn Netlink, and XBAND future releases. link
    • add Shuouma's IP fix for future Daytona USA online release.
    • (easy) add Shuouma's dcgmail installer to root. This script enables email setup for Sega Swirl play. link
    • add Scrivani's "BBA Mode" tunnelling software. link
    • configure backup DNS server (need to ask the dreamcastlive guys for the address)
    • Still need wifi steup. Need to research headless Wi-fi setup
    • Debian-buster build. One task that was completed from the start.




Observations:
  • This thing is tiny. Without enclusure, it is about the width and thickness of a VMU. The RockPiS and linux modem should be able to fit inside the shell if space is made by PSU or ODE replacement.
  • This device runs cool. I leave it plugged in for days and it remains cool to touch.
  • 07A) During Radxa updates, the tutorial recommends this line. The distribution already has this source listed. Each time this line is run adds the same source and will create conflict every time "apt update" is run. This line has been removed from tutorial.

    Code: Select all

    echo "deb http://apt.radxa.com/$DISTRO/ ${DISTRO%-*} main" | sudo tee -a /etc/apt/sources.list.d/apt-radxa-com.list
  • 08A) Removing arm64 packages, then arch isn't viable. The OS becomes broken at this point.

    Code: Select all

    apt-get purge ".*:arm64"
    dpkg --remove-architecture arm64
  • 09A) Attempting to install latest Python3 package 3.11; however, 3.7 ends up being installed. This version will soon lose official support.
  • Sequencing issue) The installation of several packages, the unpackaging of dreampi, and installing was a tangled mess. The solution seems to be resolved by enabling MULTIARCH support for armhf architecture. Attempting the broken install; then running "apt --fix-broken install". . .
    seems to resolve the problem. I trimmed venv lines, and placed pip3 modules from dreampi install instructions to be after the python3 and pip3 install.
Last edited by OatBob on Sun Jul 16, 2023 9:23 pm, edited 12 times in total.
shinjitsunayu.me/ - web content for DC.

Image

User avatar
OatBob
MegaDeath
Posts: 215

Re: [v0.2 wip] Radxa RockpiS build instructions for online play

Post#2 » Thu Jun 29, 2023 5:42 am

updating setup procedure to v0.2

I have a streamlined procedure. Next step is to resolve Dreamcast Now connection issue. I have attempted the browser fix here, but the problem remains.

dcnow-err.jpg
DC-now error


02system-info-04.jpg
system info
shinjitsunayu.me/ - web content for DC.

Image

User avatar
OatBob
MegaDeath
Posts: 215

Re: [v0.2a wip] Radxa RockpiS build instructions for online play

Post#3 » Thu Jul 06, 2023 1:09 am

Syslog is the broken service that Dreamcast Now was failing to access -- generating many errors. Debian-buster uses "syslog-ng" package.

Installing this package resolves all errors as seen previously:

Code: Select all

sudo apt install syslog-ng

This line has been added to the top post under the "install packages" step.

Special thanks to Scrivani for the tip.



image_2023-07-06_000647029.png
rock online


I feel it's a missed opportunity if a "Rock" avatar is not used here.
shinjitsunayu.me/ - web content for DC.

Image

User avatar
lozz
core
Posts: 123

Re: [v0.2a wip] Radxa RockpiS build instructions for online play

Post#4 » Thu Jul 06, 2023 6:04 am

This is excellent work Oatbob, thanks for researching and rolling this out. Given how Pi's have become scarcer and more expensive in recent years it's great timing for this alternative to now be available.

User avatar
OatBob
MegaDeath
Posts: 215

Re: [v0.2a wip] Radxa RockpiS build instructions for online play

Post#5 » Wed Jul 12, 2023 8:16 am

I haven't made much time to improve this over the last few weeks. In this time the DreamPi image for Raspberry Pi 1.8DLE has been released with new features. I would like to seek parity with this Raspbian build. Each line item is a new task for my TO DO list. I'm waiting on the mail for some other configuration of RockPiS models for compatibility testing and wifi antennas. Wow, these computers are cheap!

  • add SEGA RPG FAN's tunneling software for Capcom's KDDI, Saturn Netlink, and XBAND future releases. link
  • add Shuouma's IP fix for future Daytona USA online release.
  • (easy) add Shuouma's dcgmail installer to root. This script enables email setup for Sega Swirl play. link
  • add Scrivani's "BBA Mode" tunnelling software. link
  • configure backup DNS server (need to ask the dreamcastlive guys for the address)
  • Still need wifi steup. Need to research headless Wi-fi setup
  • Debian-buster build. One task that was completed from the start.

The RockPiS has no video out, so it really is a blind device, relying heavily on SSH and a well configured setup. Wifi setup will always require some sort of input, so this becomes a conflict. I may need to devise a method to configure wifi settings using HTML from the Dreamcast browser.

YOLO, I attempted to insert the Raspbian image into the RockPiS, and it will not boot. If only it were so easy to retire this project.

I have also found myself spending an unhealthy amount of time shopping for fax modems, and a secret Dreamcast collecting endeavor.
shinjitsunayu.me/ - web content for DC.

Image

  • Similar Topics
    Replies
    Views
    Last post

Return to “Online”

Who is online

Users browsing this forum: No registered users