Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
fuss:raspberry_pi [2020/07/21 05:52] – [Running a One-Off Script on First Machine Boot] officefuss:raspberry_pi [2024/02/24 05:08] (current) – [Logging-in via SSH over USB] office
Line 60: Line 60:
 to set the sound selection to autodetect where the jack will be used only if the HDMI cable is not connected. to set the sound selection to autodetect where the jack will be used only if the HDMI cable is not connected.
  
-====== Fixing Various Network Issues ====== 
- 
-Any of the following symptoms are to be detected? 
-  * SSH connections drop, 
-  * issuing commands with large output over SSH makes the SSH session hang, 
-  * connection issues toward package repositories on Raspbian 
- 
-They may all boil down to a non-uniform MTU setting across the network. 
  
 ====== Logging-in via SSH over USB ====== ====== Logging-in via SSH over USB ======
Line 77: Line 69:
 In order to log into the Raspberry Pi over SSH via the USB port, edit ''config.txt'' and add: In order to log into the Raspberry Pi over SSH via the USB port, edit ''config.txt'' and add:
 <code> <code>
-dtoverlay=dwc2+dtoverlay=dwc2,dr_mode=peripherial
 </code> </code>
 +and also, make sure to comment out ''otg_mode=1'' because it will be handled by ''dwc2''.
  
 Next, edit ''cmdline.txt'' and add the following to the kernel parameters between ''rootwait'' and ''quiet'': Next, edit ''cmdline.txt'' and add the following to the kernel parameters between ''rootwait'' and ''quiet'':
Line 104: Line 97:
  
 and save the file. This will make sure that when the Raspberry Pi boots, an IP address will be requested over the ''usb0'' interface and will work provided that the computer that the Raspberry Pi is connected to is running a DHCP server on the other end. and save the file. This will make sure that when the Raspberry Pi boots, an IP address will be requested over the ''usb0'' interface and will work provided that the computer that the Raspberry Pi is connected to is running a DHCP server on the other end.
 +
 +===== Restoring for Normal USB Operation =====
 +
 +After configuring, the USB port makes the Raspberry Pi act like a gadget device and in order to connect regular USB hardware, the configuration has to be altered. Edit ''/boot/cmdline.txt'' and ''/boot/config.txt'' to remove the previous changes and reboot. Devices should connect normally now and should be recognized.
 +
 +
 +
 +
  
 ====== Enabling Monitor Mode via Nexmon Drivers ====== ====== Enabling Monitor Mode via Nexmon Drivers ======
Line 235: Line 236:
   * ''HASH'' - is the commit hash   * ''HASH'' - is the commit hash
  
 +===== Downgrade to Last Stable Firmware =====
  
 +<code bash>
 +apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel
 +</code>
  
 +====== Fixing a Blinking Monitor ======
  
 +Some HDMI-to-VGA adapters that do not have their own power source draw more power from the Raspberry Pi such that sometimes the signal provided by the Raspberry Pi is insufficient. Fortunately the Raspberry Pi firmware allows to boost the signal by editing the file ''/boot/config.txt'' on the boot partition. Open ''/boot/config.txt'' and uncomment the line reading ''config_hdmi_boost'' and gradually increase the value until the blinking of the monitor is gone.
 +
 +====== Simultaneously Playing Audio through Headphones (analog) and HDMI (digital) ======
 +
 +Create a file at either ''~/.asoundrc'' or at ''/etc/asound.conf'' in order to play audio through both the headphone jack and the first HDMI port.
 +
 +<code>
 +###########################################################################
 +##  Copyright (C) Wizardry and Steamworks 2021 - License: GNU GPLv3      ##
 +###########################################################################
 +# Plays audio simultaneously through HDMI 0 an the Headphones jack on RPi #
 +#                                                                         #
 +# To use, place this file where ALSA picks up configuration files.        #
 +# Usually at ~/.asoundrc or /etc/asound.conf                              #
 +###########################################################################
 +
 +pcm.both {
 +    type route;
 +    slave.pcm {
 +        type multi
 +
 +        slaves.a.pcm "hdmi:CARD=vc4hdmi0,DEV=0"
 +        slaves.a.channels 2
 +        slaves.b.pcm "hw:CARD=Headphones"
 +        slaves.b.channels 2
 +
 +        bindings.0.slave a
 +        bindings.0.channel 0
 +        bindings.1.slave a
 +        bindings.1.channel 1
 +
 +        bindings.2.slave b
 +        bindings.2.channel 0
 +        bindings.3.slave b
 +        bindings.3.channel 1
 +    }
 +
 +    ttable.0.0 1
 +    ttable.1.1 1
 +    ttable.0.2 1
 +    ttable.1.3 1
 +}
 +
 +ctl.both {
 +    type hw
 +    card Headphones
 +}
 +
 +pcm.stereo {
 +    type route
 +    slave.pcm "both"
 +
 +    ttable.0.0 1
 +    ttable.1.1 1
 +    ttable.0.2 1
 +    ttable.1.3 1
 +}
 +
 +pcm.!default {
 +    type plug
 +    slave {
 +        pcm stereo
 +    }
 +}
 +
 +ctl.!default {
 +    type hw
 +    card Headphones
 +}
 +
 +</code>
 +
 +====== Getting Composite Video Output via RCA Jack on Raspberry Pi Zero ======
 +
 +The Raspberry Pi Zero can output composite video by connecting to the two pins adjacent to the main pin header.
 +
 +{{fuss:fuss_raspberry_pi_zero_composite_jack_rca_output.png?512}}
 +
 +where, the right-most pin is ground and the left-most pin is the video signal.
 +
 +After making the necessary connections, edit ''/boot/config.txt'' on the Raspberry Pi and:
 +  * disable the forced HDMI output, by commenting out ''hdmi_force_hotplug=1'',
 +  * enable ''sdtv_mode=2''
 +
 +After a reboot, the Raspbery Pi Zero should output composite video on the pins.
 +
 +On newer distributions such as bookworm, the parameters have changed. Fist, edit ''/boot/config.txt'' and disable HDMI and enable composite:
 +<code>
 +# Enable DRM VC4 V3D driver (this line already exists so change it)
 +dtoverlay=vc4-kms-v3d,composite
 +
 +hdmi_ignore_hotplug=1
 +hdmi_ignore_cec_init=1
 +
 +enable_tvout=1
 +
 +</code>
 +and then change ''/boot/cmdline.txt'' to set a video resolution and standard by appending the following:
 +<code>
 +video=Composite-1:720x480@60ie
 +</code>
 +
 +After a restart, the Raspberry Pi should boot up and send a composite signal instead of sending video through HDMI.
 +
 +====== Disable LED on Rasperry Pi Zero W 2 ======
 +
 +Insert into ''/boot/firmware/config.txt'', the following lines:
 +<code>
 +dtparam=act_led_trigger=none
 +dtparam=act_led_activelow=on
 +</code>
 +and reboot.

fuss/raspberry_pi.1595310744.txt.gz · Last modified: 2020/07/21 05:52 by office

Wizardry and Steamworks

© 2025 Wizardry and Steamworks

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.