DIY E46 Media Centre: MP3, videos, Digital Radio, Digital TV? - Page 19 - E46Fanatics E46 BMW Social Directory E46 FAQ 3-Series Discussion Forums BMW Photo Gallery BMW 3-Series Technical Information E46 Fanatics - The Ultimate BMW Resource BMW Vendors General E46 Forum The Tire Rack's Tire Wheel Forum Forced Induction Forum The Off-Topic The E46 BMW Showroom For Sale, For Trade or Wanting to Buy

Go Back   E46Fanatics > Tuning & Tech > Mobile Electronics Forum

Mobile Electronics Forum
Have all your A/V and electronics questions answered here. Ipods, A/V, Radar Detectors Oh My!

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 69 votes, 4.99 average. Display Modes
Old 07-02-2014, 09:35 AM   #361
jac1d
Registered User
 
Join Date: Feb 2012
Location: Vancouver
Posts: 87
My Ride: E38/E34/E46
Quote:
Originally Posted by harmzs View Post
Received my kit yesterday, many thanks Pete

I've started configuring my Pi while I get my buddy to solder the components to the Pibus board - I've got as far as issuing the command to make the Pi run the pibus file (on the root of the Storage):

chmod +x /storage/pibus

I don't get any error messages appear, and I've popped the following into the autostart.sh file in /.config:

#!/bin/sh/storage/pibus -b -m -r &
By way of background, in shell scripts any line that starts with the # symbol is a comment... The exception is when the very fist line starts with "#!" followed by a path to a command interpreter. The "#!" is called the "magic number" and it tells the system what to use to run the script.

/bin/sh is generally considered the safest and most portable/cross platform shell to use as a command interpreter. You will often also see /bin/bash, which is the bash shell which has some advanced features but isn't always available on embedded or lightweight platforms.

If you find scripts on the Internet and discover they don't work or behave in an odd way, check what follows that magic #! number and make sure you have the actual shell installed it is trying to use.

You will also often see /bin/perl or /usr/bin/perl5 etc. This is the perl command interpreter and totally different again. Perl is readily available but a different kettle of fish syntax wise.

The other thing to keep in mind as you work with scripts is the concept of paths (the areas on the filesystem the OS searches to find the commands you are trying to run). You may discover that when you run the script interactively as a user that it seems to work fine, but when you execute it at startup or from the cron scheduler it fails. This is almost always a path or permissions issue.

Either use the explicit path to the commands and files you refer to in the script (as Pete does with /stoarge/pibus) or delcare paths at the top of the script manually using a variable or add them to to the PATH variable. Some details here: http://www.cyberciti.biz/faq/unix-linux-adding-path/

I'm not a programmer but you can do some pretty amazing things will shell scripts, and then combine them with Pi and PiBUS features to interact with your car. Neat stuff.

-Jeff

Last edited by jac1d; 07-02-2014 at 09:37 AM.
jac1d is offline   Reply With Quote
Old 07-02-2014, 09:57 AM   #362
jac1d
Registered User
 
Join Date: Feb 2012
Location: Vancouver
Posts: 87
My Ride: E38/E34/E46
Quote:
Originally Posted by PeteAU View Post
The TV module can create its own menu when Nav is missing, the radio can only send text which gets rendered by Nav/TV.
Pete, does that mean when Nav is present the TV module doesn't generate the menu but just relies on passing through the Nav version?

Quote:
Originally Posted by anto View Post
Hi Jeff, Are you sure that video path is as simple as that ? In my mind you've forgotten the BM54 modul which is able to uses the display when no nav is connected in the car. A lot of car were sold with TV but no Nav, so I think that the BM54 takes part in video path.

For the event gesture, Pibus wait for ibus messages [68 12 3b 23 62 10 43 44 43 20 31 2d 30 34 20 20 20 20 20 4c] or [68 0e 3b 23 62 10 54 52 20 30 34 20 20 20 20 2e] or [68 12 3b 23 62 10 54 52 20 30 34 20 20 20 20 20 20 20 20 32] or [68 17 3b 23 62 30 20 20 07 20 20 20 20 20 08 43 44 20 31 2d 30 34 20 20 25] telling that cdc mode is active, it then switches Pin 17 of TV Module to GND, whitch instantly switches the video to Pi output.
I haven't factored in the radio yet in my tracing of things, but I do see on the E46 TV diagram I have that htere are two pins to the radio unit from one of the two 18 pin connectors on the TV module, suggesting it does still come back through the TV module. I don't know of any other reason the TV module would need to talk directly to the radio module, other than to ensure anything it generates makes it on to the screen, but I'm a bit tired right now.

Thanks for the ibus info on the CDC trigger. So that suggests to me that it is a trigger to the TV module to simply change what it forwards to the monitor. The next question is whether I could just spoof that portion of things without having any menu intelligence in my TV module emulator or whether or not I need a more enhanced command set before I can connect the PiBUS.

Since the display can run without a Nav computer or TV module installed, that must mean there is some ability internally to generate basic menus and functions right at the BC itself. I wonder, do other modules rely on this beign present or do they simply replicate it and take over the display completely?

I do know the radio controls can be manipulated over IBUS, which explains how other modules can also influence the radio.

-Jeff

Last edited by jac1d; 07-02-2014 at 09:59 AM.
jac1d is offline   Reply With Quote
Old 07-02-2014, 11:05 AM   #363
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
I didn;t think the display could run without TV or Nav, I was firmly under the impression that one or the other would generate the display and that the screen itself was pretty dumb. If I disconnect the two on my E46, the display remains blank.

With both connected, the Nav unit takes preference of displaying things on the screen, with just the TV Tuner connected, the car switches over to the TV Tuner outputs and if I remember correctly (it was a while since I've done it), the screen displays but is blue rather than black.. at least I think it was from memory.
harmzs is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 07-02-2014, 01:07 PM   #364
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
Thanks for your help again Pete, all seems to be working on the Pi at least.

I'd used Paragon ExtFS to read and write to the EXT4 storage partition, but had noticed that when I copied the Pibus file along with the Skin, both files were reading 10ish MB so I guess something got corrupted along the way.

I've just copied to the media partition on my USB (FAT32) and then copied to /Storage via XBMC's file manager, re-run the commands and I've now got an ibus.txt file so I guess I'm ready to roll when the Pibus board is built for me this week.

I attempted the benchmark as you mentioned,

hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 214 MB in 2.01 seconds = 106.22 MB/sec
Timing buffered disk reads: 70 MB in 3.10 seconds = 22.57 MB/sec

hdparm -tT /dev/sdb
/dev/sdb: No such file or directory

However I couldn't access /dev/sdb (I'm guessing this is where the /Storage folder would normally point?)

Happy to run any other tests if it helps anyone else
harmzs is offline   Reply With Quote
Old 07-02-2014, 04:41 PM   #365
jac1d
Registered User
 
Join Date: Feb 2012
Location: Vancouver
Posts: 87
My Ride: E38/E34/E46
Quote:
Originally Posted by harmzs View Post
T
I attempted the benchmark as you mentioned,

hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 214 MB in 2.01 seconds = 106.22 MB/sec
Timing buffered disk reads: 70 MB in 3.10 seconds = 22.57 MB/sec

Happy to run any other tests if it helps anyone else
That is a smoking read time, what is the exact SD card you are using? Write is less impressive but a lot less relevant to regular operation.

-Jeff
jac1d is offline   Reply With Quote
Old 07-02-2014, 05:02 PM   #366
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
Hi Jeff,

It's a Kingston class 10 UHS1 Enhanced (8GB). The green label ones if you're looking at their Web page.

Thanks.
harmzs is offline   Reply With Quote
Old 07-02-2014, 07:34 PM   #367
PeteAU
Registered User
 
Join Date: Oct 2011
Location: Melbourne
Posts: 541
My Ride: 330i
Quote:
Originally Posted by harmzs View Post
Hi Jeff,

It's a Kingston class 10 UHS1 Enhanced (8GB). The green label ones if you're looking at their Web page.

Thanks.
Actually, /dev/sda is your USB stick, and /dev/mmcblk0 the SD card.

I get (sandisk extreme):
Timing buffered disk reads: 52 MB in 3.03 seconds = 17.15 MB/sec

Random $4 USB stick:
Timing buffered disk reads: 42 MB in 3.00 seconds = 13.98 MB/sec
PeteAU is offline   Reply With Quote
Old 07-02-2014, 09:27 PM   #368
jac1d
Registered User
 
Join Date: Feb 2012
Location: Vancouver
Posts: 87
My Ride: E38/E34/E46
Quote:
Originally Posted by PeteAU View Post
Actually, /dev/sda is your USB stick, and /dev/mmcblk0 the SD card.

I get (sandisk extreme):
Timing buffered disk reads: 52 MB in 3.03 seconds = 17.15 MB/sec

Random $4 USB stick:
Timing buffered disk reads: 42 MB in 3.00 seconds = 13.98 MB/sec
Come to think of it, something doesn't seem right.

100 Megabytes/second is 800 Megabits/second, which is actually faster than the theoretical bus limit of 480 Megabits/second. Even in burst it can't exceed bus maximum. Something odd there.

Peter's numbers sound more normal, as shown on the SD card bus.

-Jeff
jac1d is offline   Reply With Quote
Old 07-03-2014, 05:41 AM   #369
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
Quote:
Originally Posted by PeteAU View Post
Actually, /dev/sda is your USB stick, and /dev/mmcblk0 the SD card.

I get (sandisk extreme):
Timing buffered disk reads: 52 MB in 3.03 seconds = 17.15 MB/sec

Random $4 USB stick:
Timing buffered disk reads: 42 MB in 3.00 seconds = 13.98 MB/sec
Oh I see, so those figures were testing the USB stick. I'll run the second command when I get home tonight and see what the SD card pulls.

I've also picked up a micro BT USB dongle so will have a go and see if it lets me stream from my phone to the Pi.

Did you have much luck with the experimental Pibus with DAC Pete? The amps in my BM54 have been upgraded so every increase in sound quality helps
harmzs is offline   Reply With Quote
Old 07-04-2014, 05:07 AM   #370
PeteAU
Registered User
 
Join Date: Oct 2011
Location: Melbourne
Posts: 541
My Ride: 330i
Quote:
Originally Posted by harmzs View Post
Did you have much luck with the experimental Pibus with DAC Pete? The amps in my BM54 have been upgraded so every increase in sound quality helps
Works really well, I love the sound of it. Now I have to go and delete all my 128 kbps MP3s, my standards have gone up a bit.
PeteAU is offline   Reply With Quote
Old 07-04-2014, 07:46 AM   #371
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
Quote:
Originally Posted by PeteAU View Post
Works really well, I love the sound of it. Now I have to go and delete all my 128 kbps MP3s, my standards have gone up a bit.
Damn, I should have waited before ordering my Pibus in that case Will there be any option of adding the DAC at a later date (via a seperate board for example)?
harmzs is offline   Reply With Quote
Old 07-04-2014, 08:18 AM   #372
PeteAU
Registered User
 
Join Date: Oct 2011
Location: Melbourne
Posts: 541
My Ride: 330i
I'm going to sell a very small number of special edition PiBUS HiFi boards from Monday (already soldered and tested). As you can see, the 3.5mm audio cable is no-more and it outputs sound straight into the BMW 6-pin CDC cable.

Sorry in advance, but the price will be very high, since they took a long time and have a lot more components on-board.

More info at: http://pibus.info/hifi

PeteAU is offline   Reply With Quote
Old 07-04-2014, 09:36 AM   #373
anto
Registered User
 
Join Date: Dec 2013
Location: FR
Posts: 37
My Ride: M3 E46 SMG
Hi Pete,

Another really good idea & realization, that's really impressive !

Can you tell me if there's a difference between stacking original pibus with hifiberrry dac, & your full integrated solution. (Concerning sound).

I think Pibus is not working with sound, it just relays it, Correct ?

PS : Is the price your real price for monday sale ?
anto is offline   Reply With Quote
Old 07-04-2014, 10:10 AM   #374
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
Yikes, that's a big increase in price (if it's correct)

Not sure how good they are, but I've seen a couple of USB DAC's for the Pi, anyone had any experience with them or know if they'd work with the Pibus?

Thanks.
harmzs is offline   Reply With Quote
Old 07-04-2014, 11:30 AM   #375
anto
Registered User
 
Join Date: Dec 2013
Location: FR
Posts: 37
My Ride: M3 E46 SMG
I've bought a pcm2704 based dac on eBay but I've not tested it yet in the car but it sounds good at home

Sent from BimmerApp mobile app
anto is offline   Reply With Quote
Old 07-04-2014, 07:34 PM   #376
PeteAU
Registered User
 
Join Date: Oct 2011
Location: Melbourne
Posts: 541
My Ride: 330i
Quote:
Originally Posted by anto View Post
Hi Pete,

Another really good idea & realization, that's really impressive !

Can you tell me if there's a difference between stacking original pibus with hifiberrry dac, & your full integrated solution. (Concerning sound).

I think Pibus is not working with sound, it just relays it, Correct ?
It's basically the same as a hifiberry DAC. You could buy one and stack it, if you can work out the physical problems (header). But, the output of the hifiberry is probably not the right voltage, which could cause the BMW amp to clip (distort). It could be solved with some resistors/caps, so it may not be plug & play.

Quote:
Originally Posted by anto View Post
PS : Is the price your real price for monday sale ?
It'll be less than 999 euro I haven't decided what a fair price is.

Quote:
Originally Posted by harmzs View Post
Yikes, that's a big increase in price (if it's correct)

Not sure how good they are, but I've seen a couple of USB DAC's for the Pi, anyone had any experience with them or know if they'd work with the Pibus?

Thanks.
USB DAC is a good idea, if you can get OpenELEC to see it.
PeteAU is offline   Reply With Quote
Old 07-05-2014, 11:22 AM   #377
jac1d
Registered User
 
Join Date: Feb 2012
Location: Vancouver
Posts: 87
My Ride: E38/E34/E46
Quote:
Originally Posted by PeteAU View Post
I'm going to sell a very small number of special edition PiBUS HiFi boards from Monday (already soldered and tested). As you can see, the 3.5mm audio cable is no-more and it outputs sound straight into the BMW 6-pin CDC cable.

Sorry in advance, but the price will be very high, since they took a long time and have a lot more components on-board.
Very cool! Nice work Pete.
jac1d is offline   Reply With Quote
Old 07-07-2014, 03:57 AM   #378
mjakobi
Registered User
 
Join Date: Jul 2014
Location: Germany
Posts: 27
My Ride: 330Ci SMG
Hi all,
I've read through this thread and I keep asking myself if it's possible to see the output of the Raspberry Pi while you're driving.
AFAIK the screen turns black while you're driving (at least here in Germany). Is the output of the Pi also affected by this?

Thanks for any hint!
Regards -- Markus
mjakobi is offline   Reply With Quote
Old 07-07-2014, 04:25 AM   #379
harmzs
Registered User
 
Join Date: Jun 2014
Location: England, UK
Posts: 99
My Ride: 2003 330ci Clubsport
I've not yet tested mine (car is away at a bodyshop for a repainted front end), but I'd imagine it should work just fine. You may need to get TV in motion coded in, but it's pretty easy and I believe you can do it with NavCoder.
harmzs is offline   Reply With Quote
Old 07-07-2014, 04:46 AM   #380
E46 Coupe
Registered User
 
E46 Coupe's Avatar
 
Join Date: May 2008
Location: Australia
Posts: 5,273
My Ride: Rules1 & 2: S T F U!
Quote:
Originally Posted by harmzs View Post
I've not yet tested mine (car is away at a bodyshop for a repainted front end), but I'd imagine it should work just fine. You may need to get TV in motion coded in, but it's pretty easy and I believe you can do it with NavCoder.
Why would you need TV in motion coded when it's operated by the ibus reverse trigger?
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by E46 Coupe; 07-07-2014 at 04:47 AM.
E46 Coupe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Censor is ON



All times are GMT -5. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
(c) 1999 - VerticalScope Inc. All rights reserved.