Pirate Radio CMD line stuck?

gadgetoid - no… the cursor is all the way to the left not to the right of the $ where you type it, and when i type in user and enter - it doesn’t move then i type in password and it doesn’t move etc.

alpha - weird thing I just tried the button on top of the radio to power it off (idk why it won’t power it back on it should!!!) anyway, so unplug then replug and it reboots and gets to this

Raspbian GNU/Linus 9 pirateradio tty1
_

that underscore is where the cursor is blinking and it never asked for user or pass. This stuff only happens once I installed the priate stuff, and on the other pi zero only once I installed the adafruit oled script. Its like some kind of python issue idk

WEIRDER still, in the case that just happened, I gave it a shot and hit the username and boom it asked for password and worked. But something is definitely screwey and to gadget, alpha has run into it too so its not just me or a one time thing.

I have a request too, on the page to set this pirate radio up it had several options…
vlcradio, airplay and finally spotify. Two questions… first… why can’t they be combined and use buttons to pick which of those to use? Seems fairly reasonable no?

Also is there one that does multiple of the Pandora, iHeartRadio etc. as I have a pandora account already and am just wetting my feet here I’m way not capable of writing such an app yet.

I’d suggest a few fixes so far = make the button turn it off and back on again too! its VERY necessary! Imagine the light switch in your house only turns the light off and you have to go to the circuit breaker/fuse panel each time to turn it back on!

Also, I’d add a few plastic standoffs because the zero can flex and bend the pins without them.

Now I found a pandora player:

but is that gonna break the buttons from working on the side and the blinking lights etc?

OOOOH! Pirate Radio? That’s built on top of an extremely cut down version of Raspbian that simply doesn’t work with a mouse/keyboard… the drivers aren’t there… and is meant only to be used headless. This is, for better or worse, normal. This is because even if you did manage to log in, nothing you installed/changed would be permanent since it’s booting from a stateless image that’s copied into RAM. The whole OS is read-only by design, so logging in serves no purpose.

Note: I was confusing “Pirate Radio” the product with the version of PiratePython (the OS) set up to run on it.

It’s only an Off (shutdown) button. I have a separate button wired to the Pi’s RUN pins to boot mine back up when I want to play some tunes. I don’t unplug the power supply, unless the Pi has locked up or something. I wired mini arcade buttons up to the appropriate GPIO Pins for volume up down etc. Mine isn’t in the official case, its in an old subwoofer box. I have a ProtoZero in between the Pi and pHat Beat and my arcade button connect to that. https://1drv.ms/f/s!AjOYwiwlwDtpgrJY6ORLsK5AVpwNuw

I have mine installed on top of Full Raspbian, I just set it to boot to command line when I’m done setting up my WIFI and localization settings. I just find it easier to do from GUI than from the terminal. If I don’t set my keyboard up to English US, my pipe character | is no where to be found and I can’t actually run the Pirate Radio one line installer.
I do recall seeing my cursor being in the wrong spot, head of the line. I’m not 100% sure but I think it was my Pirate Radio? I do occasionally boot it up with a monitor and run startx to do a few things like edit my playlist. Mine is set to auto log me on so all I do is hit enter a couple of times and it goes back to normal. I think that’s how it went. I haven’t hooked a monitor up to it in a long while now and my memories not what it used to be, lol.

Tech Tip, if your using VLV Radio, I highly recommend you go into the Raspberry Pi configuration, and under boot options, check the box for “wait for network”. It may take longer to boot up and start playing, but it will always remember what channel (station) you left it on.
I was having issues where it wouldn’t play anything until I hit channel up down, or it would start on a different station than the one I was listening to when I shut down.
Streaming issue I think? VLC was looking for the stream before the WIFI had connected, then just kept trying each station in my playlist until it got a good connection. Or wouldn’t play anything at all. Its been rock solid since I made that change.

hmmm i think i specifically unclicked that and have weird ways of getting the radio to start w button pushes lol let me try that…

Is the setup before the actual choosing of the player, solid enough to if i go pick other programs the buttons and ilghts that make it pirare radio stay right? Whats the best program out there w/most stuff you can do?

Won’t this make a potential nightmare if it can’t connect for some reason and then boot will never complete?

From te saying the button code should be updated to turn it back on, to the things you’re saying and that they just said its older code… sounds like its time for an update!

I’m not sure what happens if it doesn’t get a connection and “wait for network” is checked? I just know for me, it makes it reliably start up on my preferred station. I just press my RUN button and walk away. If I uncheck it, I have to baby sit it until it fully boots up. Then have to try and find my preferred channel with no display telling me what station I’m currently on.

I’ve only ever run VLC Player (Pirate Radio) on mine. @gadgetoid would know better than I would, but I believe the phat beat installer makes the pHat Beat the audio source for Raspbian. Any sound would play through the pHat beat instead of HDMI etc. Not sure about the buttons?

Having the current hardware turn the Pi back may not be doable. Currently pressing the Power Button on the pHat Beat executes the shut down script telling Raspbian to shut down. Once its shut down you have no way of running any more scripts. I’m pretty sure you’d have to modify the hardware to do what you want all with one button.

I have several headless Pi’s I shut down via a button wired to the GPIO. I do an os.system("sudo shutdown now -P") in my python file. To boot them back up I have another button wired to the RUN terminals. Or I remove the power monetarily.

No idea… yeah it makes it a lil tough on me too…yes I’d like to know about the phat beat and the audio source, for examply if audio source switches does it switch back when exited?
lol I just came on here because I had a DUH moment… looking at the hardware thinking that once I hit that button, there’s no power hitting that board anymore whatsoever. It’d have to be wired like the on/off shim where power goes into that board frirst then the pi.
btw I missed that you posted a link earlier and just saw it wow lot of buttons very cool! What do they all do?,op

They are duplicates to the ones on the pHat Beat. Top left is power off, bottom left is my RUN Button. The center row is channel up, pause, channel down. And the two on the right are volume up and down. I thought about making them different colors, but went with all black.
The GPIO used by the button on the pHat beat is silkscreened on it. You’ll see the numbers on the back side. I just wired my switches up to those GPIO though a Proto Zero. Pressing my button puts a ground on that GPIO pin while its pressed. Same way the actual buttons work. Just a lot easier to push with my nubby fingers. ;) Plus I don’t have easy access to those built in buttons with my pHat beat being inside my case.

My Pirate Radio is headless and I didn’t bother to setup SSH. If I think of it and find time I’ll connect a monitor and boot it up to check this, if you don’t look at it first.;)
Check the speaker icon and see if it lists the pHat Beat? If it’s a Pi Zero, it should list that and HDMI as options for sound out. If its any other Pi it will list Analog Audio too. If your not running the Lite version that is.
The other thing “I think” you can do is run alsamixer from command line. That will get you the volume slider, and maybe a way to switch the source if your running Raspbian Lite. I’ve only ever ran alsamixer once or twice and don’t remember exactly what it shows? I don’t know if you have to do sudo or not either?

I’m sorry been off this a bit but right now I’m having a nightmare. For some reason (didn’t change a thing!) it stopped going on at all. Then from just rebooting, and reseating the cards, same behavior then suddenly the vu lights started working but NO audio. I got out meter and made sure speaker wire connected etc. all good. omg… then again after some reboots and finding this thread

I tried the stopping of pulse audio and somewhere on installing either pirate radio (think the vlc radio page) it said run setup.sh but when I Truy, file not found?! And now the audio is working but sounds like a real radio with the station out of tune HORRIBLE static and noises

whats gone wrong?!?!

I hope someone re-looks at the code and checks it out because I really do want vlc radio… any help is so appreciated…

found this page too:http://blog.scphillips.com/posts/2013/01/sound-configuration-on-raspberry-pi-with-alsa/
saw that my left and right were 185% !!! HOW??? anyway does that mean the speaker is blown now!!! How do I test for that because its lower volume but just as horrid sounding and the worst part is how did it get set that high when I only know how to use the buttons on the radio (im totally new to this hence kit).,.

Idk if anything else is out of wack found the setup file and ran it but it bombed on pivumeter because of cache I don’t know how to uninstall on this setup so about all I can do is reflash the sd card and see if it still persists - this stinks!

(oh btw I also found this: USB Mic stops working after installing Speaker Phat

I did the settings to default.pa and default.conf and didn’t affect anything - yes I know its for mic but hey im grasping at straws now :(

Edit: Just disconnected speaker from Phat Beat and I have 4.1Ohms and speaker says 4Ohms (and I correctly have switch set to one speaker) so that should be good

If memory serves me I run the one line installer for the phat beat. Then run the one for VLC radio as that’s the player I use.
There were a couple of issues with the pirate radio that were fixed with new releases of the software. One was the popping sound when changing channels, and if you hit play pause. Now all I get is a couple of pops on boot up. Once its running it stops though. Phil fixed that.
Another issue was choppy distorted audio, that happened when Raspbian was updated. A fix was found by another forum member and that’s been rolled into the software install.
The only remaining issue, if you want to call it that, is on a new install, on first boot up of VLC radio. The volume is set to max. Once you lower it to what you want it stays where you left it though.
If it was me, I think I would wipe my card and put a new clean Raspbian image on it. Then run the phat beat one line installer. That should setup alsa etc for the phat beat and make the pHat Beat the default audio.
The make an image of that card. the win32 disk imager will do it. Its just the opposite to flashing an image to the card. You make an image from or of the card.
Then install VLC etc to play around with. If things go south again just flash your saved image back to the card to save setup time. I’d also setup your wifi, keyboard, country, etc before making the backup image.

That first link you posted of my thread where Pirate radio didn’t work was when Raspbian went from Jessie to Stretch. I think there was a glitch in the installer for the Pirate Radio. Something to do with Pulse Audio. That’s was fixed long ago. I’ve since done a new install on Stretch and everything worked Ok.
This thread, Pirate Radio pops but no music?
Around that same time, again during the transition to Stretch, the audio was all scratchy and being clipped. That was fixed too. And that fix is now rolled into the installer script. It kind of sounds like you tinkering set that config back to the one that doesn’t work so well. I’ll see if I can find that thread which details the issue and how to fix it.

Ok here is the thread on the scratchy audio with the fix,

Have a look see at your values.

The scratchy sound could easily be changed to great sound.
Just edit vlcd in /usr/bin:
sudo nano /usr/bin/vlcd
and change: --compressor-makeup-gain 12.0
to: --compressor-makeup-gain 0
this compressor should just be used as a limiter and needs no makeup gain…
I thought about sending it back to Pimoroni but now I’m impressed by the sound.

wow thanks - I didn’t run across that one. I threw my hands up when a reboot said card now corrupted and after a reinstall and trip through raspi config I boot and get no DNS so that’s a delight. First time I installed I did it manually and got same kind of error so I tried raspi and it ultimately worked. All of the locale and keyboard and boot options et. idk what I overlooked last night yet. I guess i’ll buck up and get back at it -

btw yes I did same two line install…and running the latest stretch lite this time after initially attempting one from a few months ago… I’ve had some nasty experiences upgrading OS in Linux sounds like others have too

When you said your sound was awful I thought you may have undone the fix for the clipping issue with all you tinkering.

There is a new configuration wizard. It doesn’t really work all that well though. You’ll only see it if you run the full Raspbian. It’s more meant for NOOBs and first timers to Raspbian. It won’t do what I want it to do. If I select Canada as my country my only option for Language is English Canadian. Come to find out that sets my keyboard to French? I need English US for my keyboard layout. Selecting US as country screws up my time zone and time. It doesn’t matter what options I chose I have to do it all over again anyway via Raspberry Configuration. It’s easier to just skip the boot wizard and do it all manually the old way.

For me, keyboard layout is the big deal breaker. Raspbian defaults to English UK, my keyboard is English US. With the default layout my keys are all messed up. Some are swapped and for the life of me I cannot find the pipe symbol | . If I run the lite version of Raspbian I have to use raspi-config with makes it a pain to find a matching keyboard layout. I tried 5 or 6 of the English US and still had no | key. That means I can’t run any of the one line installers as the use it. So I just run the full Raspbian, do all my setup from the GUI, and then set it to boot to command line.

right now I finally found a bit of time to actually try again and i have aboslutely 0 sound and dont know why. I switched pi zero to a new one just in case, nothing, I even bought a 2nd phat beat. Nothing. Re-imaged sd card, nada, maybe that speaker did go DOA on me but unless I grabbed wrong sd card last night im clusless. And that raspi-config problem went away but now I have a new one - on boot it stops for a second saying there’s some DHCP thing active but then continues boot

DHCP - dynamic host control protocol - the process responsible for getting an IP address from your router. It’s normal for it to pause sometimes as this is a network-related task.

As for your lack of audio- what do you see when you run:

aplay -l

and

aplay -L

in the terminal?

Running VLC Radio, I occasionally get some skips and pauses, I assume its a stream / internet issue. And every once in a while I lose the station completely. Switching to another station usually fixes it. Most times I can even go back to the one that stopped. Bummer your having a hard time. It can be really frustrating when things don’t work as they should. Try not to get to upset, it just makes it harder, been there done that. ;)