[Tutorial] In-Car Raspberry with Wifi Access point - DWA-121

[Tutorial] In-Car Raspberry with Wifi Access point - DWA-121

My car is a Renault Espace with integrated screens at the back of the headrests (infrared transmitter for the sound to headsets) with a DVD Player and an extra RCA audio/video input.

Since I was bored with kids battles choosing cartoons from old DVDs I decided to use a Raspberry Pi together with Raspbmc as a media center. Everything had to be powered from the cigar lighter receptacle...

I took an old 2.5" hard-drive as the repository for cartoons. Because of power constraints, I bought a 2.1A dual USB car adapter: it provides enough power for the Raspberry Pi and for the hard-drive; one USB cable goes to the power input of the Raspberry and another "Y" USB cable is connected to the USB car adapter, to the Rabspberry Pi USB port and to the hard-drive. Y USB Cable like this one: http://www.lacie.com/lu/products/product.htm?id=10572.

I wanted to use my iPad as a remote control for XBMC so the idea was to have a wifi emitter in the Raspberry Pi, to connect the iPad to this Wifi network and to use the official remote control app.

So I bought a cheap USB Wifi dongle: D-Link DWA-121 (less than 13€ on Amazon.fr). This dongle has a Realtek RTL8188CUS chipset compatible with the rtl8192cu linux driver already installed on the latest Raspbmc. However, configuring this dongle as a Wifi access point can turn to be a nightmare! So this post is to help people doing the same thing!

Here is how to proceed, using your home network first before going into the car.

9. You should have finished the tutorial by now but there is an ultimate modification to be done. I realized that the Wifi interface was not starting, causing the wifi Access Point not to be working... So you have to modify the /etc/rc.local file by typing

10. Restart you Raspberry Pi, check the Wifi from your iPad: you should be able to connect to your newly create access point, to detect your Raspberry Pi from the official xbmc app and to enjoy an autonomous Wifi Raspberry Pi!

Pictures from the installation in my car:

Official XBMC iPad app together with Raspbmc in my Renault Espace:

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Sun Feb 10, 2013 11:51 pm

by ben1227

Hello,

do you speak french ?

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Mon Feb 11, 2013 8:11 am

by SirLagz

Very nice.
If you have a Rev 2 Pi, you probably wouldn't even need the power plug in the Pi side, the Pi could be powered from the USB Y cable.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Mon Feb 18, 2013 10:08 am

by stephanecodo

ben1227 wrote:Hello,

do you speak french ?

Tout à fait !

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Mon Feb 18, 2013 10:11 am

by stephanecodo

SirLagz wrote:Very nice.
If you have a Rev 2 Pi, you probably wouldn't even need the power plug in the Pi side, the Pi could be powered from the USB Y cable.

It seems (not completely sure) that there is still not enough power going out of the USB port to power the Pi, the hard-drive and the WiFi dongle...

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Thu Feb 21, 2013 9:00 am

by rdidier

Hello,

I've got a problem ...
Everything run up correctly but my iPad can't connect to the hotspot.
SSID is visible, but iPad get wrong range of IP and then turn and turn without connecting.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

PS : Did you try to allow upnp out in raspbmc and watch a movie of your portable hdd on your ipad ?

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Thu Feb 21, 2013 8:44 pm

by stephanecodo

Good to hear: thanks and enjoy!
I didn't try upnp, I just tried in the other direction with AirPlay which works very well! Sounds like a good idea as well!

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Tue Apr 02, 2013 5:06 am

by mgrif

I also can see my Pi's ssid but cannot connect on my iPhone (spinning wheel).

I would like to try and follow your directions to solve this but I cannot ssh into the machine from my Mac after following your directions (cannot connect to host 192.168.42.1 on port 22: Operation timed out).

How can I edit the files on my Pi from my Mac now?

Thanks!

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Tue Apr 02, 2013 9:37 am

by carled

mgrif wrote:I also can see my Pi's ssid but cannot connect on my iPhone (spinning wheel).

I would like to try and follow your directions to solve this but I cannot ssh into the machine from my Mac after following your directions (cannot connect to host 192.168.42.1 on port 22: Operation timed out).

How can I edit the files on my Pi from my Mac now?

Thanks!

Sounds like your Pi does not have an IP address now so it won't let you ssh in and it won't let you connect either. I've had the same thing happen myself. In my case it was an error in the /etc/interfaces file and I need to strip it back completely to assign a static IP.

If you can watch the output of the pi whilst it boots (via hdmi/rca) then it should give you some clues as to what may have gone wrong.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Tue Apr 02, 2013 10:27 am

by stephanecodo

You can edit the files if you plug the Ethernet cable so that you have at least one valid IP address. Or you manually configure your Mac with à static IP address on the same wifi but it is more complex.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Wed Apr 03, 2013 12:51 pm

by rdidier

Hello,

Everything works fine but I have another question :

How can I use this Hotspot connection to access internet over wifi ?
It works when ethernet is plug but I would like to use a wifi connection for internet (like this I could control Raspbmc with IPad in car while Raspbmc access internet over wifi to access YouTube, météo ...)

Do you think I need a second wifi adapter ?

Thanks.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Sun Apr 07, 2013 7:18 am

by stephanecodo

Yes, I think you would need another Wifi adapter to be able to configure one as the hotspot and the other as a receiver. I don't think one adapter can do both at the same time.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Sun Apr 07, 2013 2:25 pm

by aht961

rdidier wrote:Hello,

Everything works fine but I have another question :

How can I use this Hotspot connection to access internet over wifi ?
It works when ethernet is plug but I would like to use a wifi connection for internet (like this I could control Raspbmc with IPad in car while Raspbmc access internet over wifi to access YouTube, météo ...)

Do you think I need a second wifi adapter ?

Thanks.

I had the same problem. The only practical way seems to be to set up a hotspot with iPhone/android and then connect the raspi to that via wifi as a client. Then you can use the internet access of the iPhone/ipad via raspi as well as you can connect to xbmc using your phone / ipads / androids. If you give a static IP to raspi in line with the iPhone's own DHCP's IP range, then there should not be any problem.

Hope this helps.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Mon Apr 15, 2013 2:08 pm

by Oldchatterman

@stephanecodo

I also want an in-car raspberry with a wifi AP -RTL8188. Just a connection between my phone or Ipad and the raspberry to control XBMC.

I tried your tutorial but was not able to get the AP running. I got it running with a plain Raspbian image, but the combination with Raspbmc makes it too difficult for me. The scripts in Raspbmc seem to interfere with what I want, but I am not sure.
Result with ifconfig: wlan0 is sometimes up and when up wlan0 has sometimes an IP address
Result with iwconfig: wlan0 is sometimes in auto mode, sometimes in managed mode and almost never in master mode
wpa_supplicant service is sometimes running

My question: did you try to setup an AP with the final Raspbmc version? What version did you use?

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Wed Apr 24, 2013 8:04 pm

by rdidier

rdidier wrote:Hello,

Everything works fine but I have another question :

How can I use this Hotspot connection to access internet over wifi ?
It works when ethernet is plug but I would like to use a wifi connection for internet (like this I could control Raspbmc with IPad in car while Raspbmc access internet over wifi to access YouTube, météo ...)

Do you think I need a second wifi adapter ?

Thanks.

Hello,

Finaly it works with the 2 wifi adaptors.
One for the hotspot and the second one connects to my iphone for sharing connection.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Thu Apr 25, 2013 11:59 am

by stephanecodo

@Oldchatterman : I have used the version from early February. I need to check which version exactly but I am pretty sure it was the one marked as version 12 'final'. Maybe you have a power issue: are you sure your USB feed has enough power for your adapter?

@rdidier : this is great to know!

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Thu Apr 25, 2013 12:56 pm

by rdidier

@Oldchatterman : And for information I had to reformat many times before it has worked so I use the latest version of Raspbmc.

Re: [Tutorial] In-Car Raspberry with Wifi Access point - DWA

Posted: Thu Apr 25, 2013 7:23 pm

by Oldchatterman

Incredible. I repeated the exact same steps over and over again with 2 different wifi dongles (1 Realtek RTL8188CUS chipset and 1 Ralink RT5370 chipset). I use a 1A adapter to power the Pi.

When using the wifi dongles to connect to my AP I have no problems at all and I get a stable connection.

How did you install Raspbmc (image or windows installer)? I used the windows installer and used the "manually configured networking" option. I created a static IP.

When do you connect the wifi dongle? I connected the dongle after installation of raspbmc.

I want to understand the differences.

I also bought a Hame MPR-A1 portable router to get rid of debugging my system ...