LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-30-2024, 10:45 AM   #1
imWACC0
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Rep: Reputation: 0
Question SBC (R-Pi) in-car music server (from "backup")


I know this can be done in two parts, but I'm looking for a "both-in-one". How do I get the Wi-Fi on the SBC to connect to two different networks? Do I need two Wi-Fi cards on the SBC? (and if "yes" HOW???)


What I need from the SBC:

1) Sync/back-up from the home server, over Wi-Fi, from folder "Music"


I don't know if I need to push or pull. If I put new songs on to my server, I want the same songs on the SBC.

2) Serve up that music over Wi-Fi (maybe Bluetooth) to the Android car radio


Ok, I've got the music on the SBC, how do I get it to switch to serving music to the radio?



I have the parts to make an auto-shut-down pi server in my car. I have a server (MX Linux) in my home. I'm able to put an access-point/repeater just for the car to use.

I don't have the Android radio yet. So, I can't give specs yet. Looking for a good system ATM

Last edited by imWACC0; 03-30-2024 at 10:58 AM.
 
Old 03-30-2024, 12:38 PM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 933

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Am I correct in understanding, that you want to sync music from your home server to your car audio? Then why do you need a third entity? If your car is parked within the reach of your home wifi, install something like syncthing directly on the radio and it will keep the folders synced, if not - you'll have to carry your SBC in your pocket so why not carry an SD card instead?
 
Old 03-30-2024, 02:08 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,719

Rep: Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912
How to connect to the radio would depend on the radio's specifications and all seem to want to use either Apple car play or Android Auto apps. I do not know if it would be as simple as connecting over bluetooth and programming the Pi to be a music server using A2DP, AVCRP etc.

Assuming the Pi is headless, at moment I can only envision updates when the car is turned off. Some script that runs on shutdown to check if you are at home and connect to your wifi AP, for a flag that indicates an update is required and then sync the music files to the Pi.
 
1 members found this post helpful.
Old 03-30-2024, 02:32 PM   #4
imWACC0
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lvm_ View Post
Then why do you need a third entity?
you'll have to carry your SBC in your pocket so why not carry an SD card instead?
The built in storage is going to be small (I ass-u-me) I can make a 1Tb SBC, get lots of good music.
Why do I need to carry it? I install into the car, with a dedicated PSU (with auto off*). There's so many places to hide something that small in a car.









* I ass-u-me you know there's two pins on a SBC to short out that will run a shutdown -h now script? Also, they make small PSU that you hook into 12v AND Accessory, if the key is off it will tell the SBC to turn off.

Last edited by imWACC0; 03-30-2024 at 02:57 PM.
 
Old 03-30-2024, 02:56 PM   #5
imWACC0
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
(1)want to use either Apple car play or Android Auto apps.
(2)I do not know if it would be as simple as connecting over bluetooth and programming the Pi to be a music server
(3)Assuming the Pi is headless
(4)Some script that runs on shutdown to check if you are at home and connect to your wifi AP, for a flag that indicates an update is required and then sync the music files to the Pi.
(1) That's why I'm getting a Droid system, I know how to do it with my phone, I hope it's the same on a Droid "radio"
(2) I've not done it with Bluetooth, but works with Wi-Fi
(3) Yes, headless
(4) Any hint on how to do that? I know where to find the turn-off script https://howchoo.com/pi/how-to-add-a-...-raspberry-pi/
 
Old 03-30-2024, 05:18 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,719

Rep: Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912Reputation: 5912
4) If you are running Pi OS bookworm then it uses Network Manager by default. You can use nmcli to control on/off, check connections etc via a shutdown service script that runs from systemd. There are various ways to create some sort of simple http server that outputs something when accessed by curl. If the output indicates updates then sync the Pi with the server.

2) A streaming server isn't quite the same as wifi. Without knowing anything about the radio it could connect to a phone over bluetooth like a speaker or headset and use commands to start/stop etc. or Android auto app and I have no idea how that works.
 
1 members found this post helpful.
Old 03-31-2024, 01:08 AM   #7
lvm_
Member
 
Registered: Jul 2020
Posts: 933

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by imWACC0 View Post
The built in storage is going to be small (I ass-u-me) I can make a 1Tb SBC, get lots of good music.
Benny Hill reference is appropriate. A rare car audio won't have SD and/or USB ports, so you can expand its storage to anything you want without an in-car server (which will be using the same SD card as storage, by the way). And 1T is not a lot, it's way too much even for a uber driver. At insane preset it is a year of 24h uninterrupted mp3 music. Are you planning to live in you car? I am using a 16G card in my (stock) car audio and it takes months to play it once.

Excuse me for saying so, but aren't you just dying to do anything at all as long as SBC is involved? :)
 
Old 03-31-2024, 02:21 AM   #8
imWACC0
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
If you are running Pi OS bookworm
I've not used Pi OS much, not sure it's the best distro for this. I was thinking Debian, if I NEED a GUI, or Ubuntu Server. Maybe piCore (Tiny Core Linux)?

Gods I miss Damn Small Linux! Yeah, I know he's made a new one, but it doesn't work on Arm. DSL would be perfect for SBC.
 
Old 03-31-2024, 02:38 AM   #9
imWACC0
LQ Newbie
 
Registered: Jun 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lvm_ View Post
(1) which will be using the same SD card as storage
(2) Excuse me for saying so, but aren't you just dying to do anything at all as long as SBC is involved?

(1) You do know that other storage can be added to SBC? And I don't mean just USB, have you looked at the specs for Pi 4 or 5?
(2) Don't kink shame, it's rude


If I had a system that was 12v or less, that I knew would work, I'd use that.
 
Old 03-31-2024, 04:49 AM   #10
lvm_
Member
 
Registered: Jul 2020
Posts: 933

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by imWACC0 View Post
You do know that other storage can be added to SBC?
Yes, but for this task it would be pointless - SD card is more than sufficient. But then, this whole idea is pointless, so what am I talking about? Ok, for you it's means, not aims, so the reason is wasted, back to your original questions: one wifi interface can be connected only to one network at a time, so you will either need two or have to employ some intelligent switching or use bluetooth for audio, but bluetooth is not ideal either because A2DP requires player with UI to be run on SBC; I am not sure how you can use OBEX here and it is no good anyway because it pushes whole files, and while LAP (LAN access bluetooth profile) exists I never heard of android client. So introducing SBC will make this task way more complicated, expensive and interesting than solving it on android alone. Ockham is right again.
 
Old 03-31-2024, 07:36 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator Response

Moved: This thread is more suitable in <Linux - Embedded & Single-board computer> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-03-2024, 07:34 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,314

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
I have been involved in developing Electronics hardware for the automotive environment. It's a noisy place.
  • "Load dumps." These are significant rises in voltage. Starter motor release is one cause. Alternators cutting out is another. I had transistors blown out of a circuit that had one 55V load dump lasting nearly half a second. I had an oscilloscope on the line at the time.
  • If anything with brushes is in use, you can get brush wear which means there is a tiny break in contact between one commutator section and the next. That can be responsible for tiny spikes of several hundred volts.
  • Normal driving can produce situations where several things are simultaneously pushing voltages up or down.

I'd do what normal people do and use your mobile phone.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Music files copied to thumb drive with Mint not detectable to car radio mfrank84 Linux - Laptop and Netbook 10 03-25-2021 06:49 PM
LXer: Car manufacturers cooperate to build the car of the future LXer Syndicated Linux News 0 08-30-2016 11:20 AM
LXer: Sony taps Linux robot car tech for self-driving car project LXer Syndicated Linux News 0 02-19-2015 04:10 AM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
How can I put "Wave" music files on a AUDIO CD to play in my car? Balarabay1 SUSE / openSUSE 4 05-22-2006 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration