Skip to content

usenocturne/nocturne-image

 
 

Repository files navigation


Markdownify
nocturne-image

A pre-built Debian 12 image for the Spotify Car Thing.

How To UseDownloadTroubleshootingDonateCreditsRelatedLicense

screenshot

How To Use

Unless receiving power through a Linux computer, running Nocturne on your Car Thing requires a host device such as a Raspberry Pi, a microSD card, a microUSB to USB-C cable, a microUSB/your power source's connector, as well as a Spotify Premium account. You will also need superbird-tool to flash the image regardless of your computer's operating system.

Windows

Raspberry Pi Setup

Download and open Raspberry Pi Imager, select Raspberry Pi OS (Legacy, 64-bit) Lite, select "Edit Settings", check "Set hostname", check "Set username and password" (set a password), check "Configure wireless LAN", (enter your network's SSID and password), check "Set local settings". Open the Services tab, enable SSH, and use password authentication. Write the configured OS to your microSD card and insert it into your Raspberry Pi.

Flashing Process

If you haven't already, download superbird-tool and run the setup process detailed here.

Download and unzip the latest image from Releases, connect Car Thing to your computer in USB Mode (hold preset buttons 1 and 4 while connecting), and run the following from your command line:

# Go into the superbird-tool repository
$ cd C:\path\to\superbird-tool-main

# Find device
$ python superbird_tool.py --find_device

# Flash Nocturne image, without resetting the data partition 
$ python superbird_tool.py --dont_reset --restore_device C:\path\to\nocturne-image\image 

After the flashing completes, connect your Raspberry Pi to your computer, and change directories to the scripts folder.

# Go into the setup-scripts folder
$ cd \path\to\nocturne-image\setup-scripts

There are two different ways to use Nocturne. You can either use it at your desk, or in your car.

Using Nocturne at your desk
Connect your Car Thing to the Raspberry Pi and run the following from your command line:
# Transfer setup_host_rpi.sh to Raspberry Pi
$ scp \path\to\nocturne-image\setup-scripts\setup_host_rpi.sh pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Make setup_host_rpi.sh executable
$ chmod +x /home/pi/setup_host_rpi.sh

# Execute setup_host_rpi.sh
$ sudo ./setup_host_rpi.sh

# Reboot Raspberry Pi
$ sudo reboot
Using Nocturne in your car
Connect your Car Thing to the Raspberry Pi and run the following from your command line:
# Transfer setup_host_rpi.sh to Raspberry Pi
$ scp \path\to\nocturne-image\setup-scripts\setup_host_rpi.sh pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Make setup_host_rpi.sh executable
$ chmod +x /home/pi/setup_host_rpi.sh

# Execute setup_host_rpi.sh
$ sudo ./setup_host_rpi.sh

# Reboot Raspberry Pi
$ sudo reboot

After, you will need to run the setup_hotspot.py script:

# Transfer setup_hotspot.py to Raspberry Pi
$ scp \path\to\nocturne-image\setup-scripts\setup_hotspot.py pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Execute setup_hotspot.py
$ sudo python3 ./setup_hotspot.py

The script will ask you to input the name of your hotspot, as well as the password for the hotspot.

After the script completes, Nocturne is almost ready to be used in your car!


Continue setting up Nocturne by following the steps outlined here. Then, select Login with Phone, scan the QR Code, and enter the Client ID and the Client Secret, and login to Spotify. After logging in, you are ready to use Nocturne!

macOS

Raspberry Pi Setup

Download and open Raspberry Pi Imager, select Raspberry Pi OS (Legacy, 64-bit) Lite, select "Edit Settings", check "Set hostname", check "Set username and password" (set a password), check "Configure wireless LAN", (enter your network's SSID and password), check "Set local settings". Open the Services tab, enable SSH, and use password authentication. Write the configured OS to your microSD card and insert it into your Raspberry Pi.

Flashing Process

If you haven't already, download superbird-tool and run the setup process detailed here.

Download and unzip the latest image from Releases, connect Car Thing to your computer in USB Mode (hold preset buttons 1 and 4 while connecting), and run the following from your command line:

# Go into the superbird-tool repository
$ cd /path/to/superbird-tool-main

# Find device
$ /opt/homebrew/bin/python3 superbird_tool.py --find_device

# Flash Nocturne image, without resetting the data partition 
$ /opt/homebrew/bin/python3 superbird_tool.py --dont_reset --restore_device /path/to/nocturne-image/image 

After the flashing completes, connect your Raspberry Pi to your computer, and change directories to the scripts folder.

# Go into the setup-scripts folder
$ cd /path/to/nocturne-image/setup-scripts

There are two different ways to use Nocturne. You can either use it at your desk, or in your car.

Using Nocturne at your desk
Connect your Car Thing to the Raspberry Pi and run the following from your command line:
# Transfer setup_host_rpi.sh to Raspberry Pi
$ scp /path/to/nocturne-image/setup-scripts/setup_host_rpi.sh pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Make setup_host_rpi.sh executable
$ chmod +x /home/pi/setup_host_rpi.sh

# Execute setup_host_rpi.sh
$ sudo ./setup_host_rpi.sh

# Reboot Raspberry Pi
$ sudo reboot
Using Nocturne in your car
Connect your Car Thing to the Raspberry Pi and run the following from your command line:
# Transfer setup_host_rpi.sh to Raspberry Pi
$ scp /path/to/nocturne-image/setup-scripts/setup_host_rpi.sh pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Make setup_host_rpi.sh executable
$ chmod +x /home/pi/setup_host_rpi.sh

# Execute setup_host_rpi.sh
$ sudo ./setup_host_rpi.sh

# Reboot Raspberry Pi
$ sudo reboot

After, you will need to run the setup_hotspot.py script:

# Transfer setup_hotspot.py to Raspberry Pi
$ scp /path/to/nocturne-image/setup-scripts/setup_hotspot.py pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Execute setup_hotspot.py
$ sudo python3 ./setup_hotspot.py

The script will ask you to input the name of your hotspot, as well as the password for the hotspot.

After the script completes, Nocturne is almost ready to be used in your car!


Continue setting up Nocturne by following the steps outlined here. Then, select Login with Phone, scan the QR Code, and enter the Client ID and the Client Secret, and login to Spotify. After logging in, you are ready to use Nocturne!

Linux

Raspberry Pi Setup

A Raspberry Pi is not required on Linux, unless you want to use Nocturne in your car.

Download and open Raspberry Pi Imager, select Raspberry Pi OS (Legacy, 64-bit) Lite, select "Edit Settings", check "Set hostname", check "Set username and password" (set a password), check "Configure wireless LAN", (enter your network's SSID and password), check "Set local settings". Open the Services tab, enable SSH, and use password authentication. Write the configured OS to your microSD card and insert it into your Raspberry Pi.

Flashing Process

If you haven't already, download superbird-tool and run the setup process detailed here.

Download and unzip the latest image from Releases, connect Car Thing to your computer in USB Mode (hold preset buttons 1 and 4 while connecting), and run the following from your command line:

# Go into the superbird-tool repository
$ cd /path/to/superbird-tool-main

# Find device
$ sudo python3 ./superbird_tool.py --find_device

# Flash Nocturne image, without resetting the data partition 
$ sudo python3 ./superbird_tool.py --dont_reset --restore_device /path/to/nocturne-image/image

After the flashing completes, unplug and replug your Car Thing, and change directories to the scripts folder.

# Go into the setup-scripts folder
$ cd /path/to/nocturne-image/setup-scripts

There are two different ways to use Nocturne. You can either use it at your desk, or in your car.

Using Nocturne at your desk

At this point, there are two different scripts that you can use. The first one, setup_host_apt.sh, is used on Linux distros that utilize apt as it's package manager. The second one, setup_host_pacman.sh, is used on Linux distros that utilize Pacman as it's package manager. If you use Pacman, replace setup_host_apt.sh in the following commands with setup_host_pacman.sh to continue with setup.

It is important to note that setup_host_pacman.sh has not been tested very well, so it may not work as intended for setup.

# Make setup_host_apt.sh executable
$ chmod +x setup_host_apt.sh

# Execute setup_host_apt.sh
$ sudo ./setup_host_apt.sh
Using Nocturne in your car
To use Nocturne in your car, you will need to have a Raspberry Pi to provide network.

Connect your Raspberry Pi to your computer, your Car Thing to the Raspberry Pi, and run the following from your command line:

# Transfer setup_host_rpi.sh to Raspberry Pi
$ scp /path/to/nocturne-image/setup-scripts/setup_host_rpi.sh pi@raspberrypi.local:/home/pi/

# SSH into Raspberry Pi
$ ssh pi@raspberrypi.local

# Make setup_host_rpi.sh executable
$ chmod +x /home/pi/setup_host_rpi.sh

# Execute setup_host_rpi.sh
$ sudo ./setup_host_rpi.sh

# Reboot Raspberry Pi
$ sudo reboot

Continue setting up Nocturne by following the steps outlined here. Then, select Login with Phone, scan the QR Code, and enter the Client ID and the Client Secret, and login to Spotify. After logging in, you are ready to use Nocturne!

Troubleshooting

If you are having issues flashing Nocturne to your Car Thing, check out the guides below.

superbird-tool: USBTimeoutError

If you are running into this error while flashing your Car Thing, try using the option --slow_burn or --slower_burn in the command used to flash.

This will look like the following:

$ python ./superbird_tool.py --dont_reset --slow_burn --restore_device /path/to/nocturne/image

If this still does not resolve the error, then you will have to edit line 164 (the one that says MULTIPLIER = 8) in superbird_device.py


If your flashing is failing at executing bulkcmd: "amlmmc part 1", then try running the following command manually. This may take a few tries to succeed.

$ python ./superbird_tool.py --bulkcmd "amlmmc part 1"

python in the above commands depends on what OS you are running.

For Windows, it will be python.

For macOS, it will be /opt/homebrew/bin/python3.

For Linux, it will be python3


superbird-tool: "bulkcmd timed out or failed!" after system_b

If you are running into this error while flashing your Car Thing, you must replace the superbird_partitions.py file in the superbird-tool folder with the one provided in this repo.

This error occurs since some devices have a smaller data partition, causing the error when attempting to flash the data partition.


superbird-tool: AssertionError

If you are running into this error while flashing your Car Thing, you must install the libusbk driver in Zadig. You can do this with the steps found here, and replacing libusb-win32 with libusbk instead.


If your issue is not listed here, or if you need help, join our Discord here!

Download

You can download the latest flashable version of Nocturne for Windows, macOS and Linux here.

Donate

Nocturne is a massive endeavor, and the team have spent everyday over the last few months making it a reality out of our passion for creating something that people like you love to use.

All donations are split between the four members of the Nocturne team, and go towards the development of future features. We are so grateful for your support!

Buy Me a Coffee Ko-Fi

Credits

This software was made possible only through the following individuals and open source programs:

Related

nocturne - The web application that this Debian image runs

License

This project is licensed under the MIT license.


brandons.place  ·  GitHub @brandonsaldan  ·  Twitter @brandonsaldan

About

A pre-built Debian 12 image for the Spotify Car Thing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 75.1%
  • Python 24.9%