BMW E46 Fanatics Forum banner

1981 - 2000 of 2043 Posts

·
Registered
Joined
·
110 Posts
@PeteAU and harry

I solved the problem with Pi4:

cmdline.txt : remove console=serial0,115200 (or console=ttyAMA0) if it exists
config.txt : add dtoverlay=pi3-miniuart-bt (don't download the modified, use original from stretch) and also add enable_uart=1

disable internal bluetooth with command:

sudo systemctl disable hciuart.service

most important:

@PeteAU you need to modify gpio.c . I forked your repo on github and made some changes to fit for the Pi4:

https://github.com/Vitalic66/pibus/blob/master/rpi/gpio.c

Code:
//Pi3
#define V1_BCM2708_PERI_BASE        0x3F000000
#define V1_GPIO_BASE                (V1_BCM2708_PERI_BASE + 0x200000) /* GPIO controller */

//Pi4
#define V2_BCM2711_PERI_BASE        0xFE000000
#define V2_GPIO_BASE                (V2_BCM2711_PERI_BASE + 0x200000) /* GPIO controller */
After compiling the new pibus and copying to my pi, pibus works. LED is blinking and ibus communication is logged in ibus.txt
 

·
Registered
Joined
·
541 Posts
Discussion Starter #1,984
Code:
//Pi3
#define V1_BCM2708_PERI_BASE        0x3F000000
#define V1_GPIO_BASE                (V1_BCM2708_PERI_BASE + 0x200000) /* GPIO controller */

//Pi4
#define V2_BCM2711_PERI_BASE        0xFE000000
#define V2_GPIO_BASE                (V2_BCM2711_PERI_BASE + 0x200000) /* GPIO controller */
After compiling the new pibus and copying to my pi, pibus works. LED is blinking and ibus communication is logged in ibus.txt
Test this out:

http://pibus.info/sw/pibus-20191219.zip
https://github.com/PeteAU/pibus/commit/ceb2cfa7892ea1e70fe5f8f05484bb77f93101d2
 

·
Registered
Joined
·
110 Posts
Thx Pete for the new version. I can confirm that it also works on Pi4.

Just got one little question about the shutdown event. How does it work? When does Pi shutdown? If the 300sec bus idle time is over or also if there is a specific ibus message?

I watched the ibus messages with navcoder. There was one "ignition off" but that didn't make the pi go down. Maybe it's because i took out all necesarry modules (speedometer, navmodule, tvmodule, bordmonitor, radiomodule) out of my car to test my new board.

The ibus and the board work, but I can remember that there was a message "immobilizer on", which also made the pi go down?
 

·
Registered
Joined
·
145 Posts
normaly the pi shuts down after timeout (300s). timeout counter starts after last ibus message. if there is a new message, the counter gets reset.
 

·
Registered
Joined
·
110 Posts
Btw the new PCB prototypes (Pibus AiO 1.4.1) arrived and already started soldering.

Unfortunately I just found 2 mistakes but with this version I can start the new HDMI switch tests and see if I applied the HDMI design guidelines careful enough (had HDMI artefacts in former version).

At the moment picture from Pi and reversecam come clear and stable.

See the video how it works:

https://youtu.be/ObDWjSUuzso

I use navcoder to emulate reversegear signal.

The PCB is designed to also work without the Pi.

It will fit into the TV module housing.

Next steps are soldering RGsB to HDMI converter on the PCB and further testing.

But first of all clean up dining table from soldering tools for xmas...
 

Attachments

·
Registered
Joined
·
110 Posts
Just because I wanted to check if picture from OEM also works I soldered the RGsB to HDMI converter too.

The video shows switching from OEM to Pi and back and also switching to reversecam in OEM mode and Pi mode.

So at least all video sources work. Next step is soldering and testing USB hub and audio.

https://youtu.be/spu4uta0R0w
 

·
Registered
Joined
·
53 Posts
@PeteAU


Have a couple of BMW's / IBus with CarPC's. I am switching over to MicroPCs and I would like to run your PiBus software on an Intel based PC.



Is the PiBus software available for Intel.


I tried to compile the software but had issues and I am not proficient at this sort of stuff.

CC = x86_64-linux-gnu-gcc
STRIP = x86_64-linux-gnu-strip
all:
$(CC) -Wall -O2 -ggdb mainloop.c slist.c pibus.c ibus.c ibus-send.c keyboard.c gpio.c server.c log.c annotate.c -o pibus -lrt
cp pibus pibus.debug
$(STRIP) -R .comment pibus


Just got errors when compiling.


home/pete/Desktop/pibus-master/rpi# ./pibus
mmap error 0xffffffffffffffff



Can you please help?
 

·
Registered
Joined
·
110 Posts
@PeteC

I guess it won't work without recoding. Pibus is designed to work with Pi.

Take a deeper look into the files at github. Thx PeteAU it's open source.

The problem starts at the gpio.h file. There are several settings for Pi's RAM and from which adress it should start using the gpio...

About my project:

Finally found a way to shutdown everything save with an adjustable offtimer circuit. Giving the board 6 minutes default time before cutting power off completly after IBUS is idle.

Also fixed picture problems coming from input noise.

USB hub works as expected. Will test audio from Hifiberry DAC circuit soon.

Going to redesign some traces and connectors too. Next version should be final prototype to test in my car.
 

·
Registered
Joined
·
53 Posts
OK so I tried running the Kodi Raspicontroller plugin on the S912 TVBox (Octocore Arm / 3Gb of RAM) and it works well!


The S912 TV box with 3Gb of RAM includes a Gb NIC and Wireless and Bluetooth with a smaller footprint than any RPi.



I like these better than the RPi's lately.



Note this is sold as an Android based TV Box and I have been testing these for 4K KODI with Armbian Linux.


Using an HDMI to VGA cable which goes to the combo Ibus / VGA box to the E46 / E83 automobiles.
 

·
Registered
Joined
·
110 Posts
I use another display (with touchscreen for pi).

The pibus AiO board outputs via HDMI to the custom touch display.

I use a RGsB to HDMI converter to convert video from NAV module to HDMI as source 1 (default).

Source 2 is PI output, source 3 is converted signal from rearcam (S-Vodeo to HDMI converter).

All 3 sources are connected to 3:1 HDMI switch.

It is controlled via 2 switches which are pulled down by pi or rear gear (source 1: s1 and s2 high, source 2: s1 high s2 low, source 3: s1 and s2 low).

The board is designed to also work without the pi as source.
 

·
Registered
2001 E46 330i Sedan
Joined
·
349 Posts
I use another display (with touchscreen for pi).

The pibus AiO board outputs via HDMI to the custom touch display.

I use a RGsB to HDMI converter to convert video from NAV module to HDMI as source 1 (default).
Hi vitalic, are you using aftermarket RGsB to HDMI converter? I've been looking for this converter but to no avail. What they have is RGB Component and VGA in.
 

·
Registered
Joined
·
110 Posts
Depends on what you are trying to do. The TV module outputs RGsB to the bordmonitor, the NAV module outputs RGB S to the TV module.

If you want to use the aftermarket RGB to HDMI converter and use the TV module RGsB signal, you'd have to split the sync from the Green line with an extra stripper.

I use the signal from NAV module, so there is no need for extra syncstripper as the NAV outputs the sync signal.

The new board also includes the RGB to HDMI converter, where I use the signal from NAV.
 
1981 - 2000 of 2043 Posts
Top