Oldchatterman
Posts: 6
Joined: Wed Apr 03, 2013 8:33 pm

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

Thu Apr 25, 2013 10:27 pm

Tested my Ipad's 2.5 A adapter. Had a stable AP for a while, but was not able to obtain an IP address. Then I noticed that suddenly my wlan0 interface also dissapeared, coincidently at the same time as xbmc switched to dimming the screen.

My problem looks like a power issue.

I don't want to debug this system any longer and decided to setup my portable router. Within 5 minutes I had a stable connection between my pi, laptop, Ipad and smartphone :D

I will leave this portable router in my car (which is accidentally also a Renault Espace).

radierer
Posts: 3
Joined: Fri May 17, 2013 10:31 pm

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

Fri May 17, 2013 10:41 pm

hi there,

i just recieved my pi today with exactly the same wifi dongle as the thread starter. my problem is, i dont get my pi to work as an access point.
i followed the tutorial step by step .. but at the point, where i should configure the file etc/network/interfaces, it stucks. if i want to configure this file, i just see an empy file .. theres nothing in to configure.
i tried this several times with the latest version of raspbmc .. maybe thats the problem? which verson of raspbmc did i habe to install to get my ap working?

thanks

radierer
Posts: 3
Joined: Fri May 17, 2013 10:31 pm

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

Fri May 17, 2013 11:08 pm

hi there,

i just received my pi this day with the same wifi dongle as the thread starter and wanted to set up the pi as a wifi hotspot.
i installed the latest version of raspbmc and followed the tutorial postet in this thread. but i stuck at the point where i had to configure the /etc/network/interfaces file. i cant configure it because theres nothing in it.

can anybody figure out, whats wrong here? is there maybe a problem with the latest version of raspbmc? if so, is there a way to configure this latest version as a wifi hotspot?

greatings and thanks so far ..

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

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

Sat May 18, 2013 1:50 pm

Nothing in it just means that there's no configuration

If the WiFi stick is working already, just add these lines

Code: Select all

auto wlan0
iface wlan0 inet static
    address 10.0.0.1
    netmask 255.255.255.0
then install and configure hostapd and you should be right.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

LaurentRPi
Posts: 1
Joined: Sun May 19, 2013 12:42 pm

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

Sun May 19, 2013 1:20 pm

Thank you for the tutorial - Everything works

My feedback
1. wifi dongle TRENDNET tew-649ub does not have AP capability.
Using D-Link DWA-121 is perfect

2. I used the following tutorial to switch automatically from Access Point mode to WiFi Client when the Pi is at home (or the reverse)
http://www.raspberrypi.org/phpBB3/viewt ... 7&p=190855
  • > If Network-manager has been installed you have to deactivate it in your script in /etc/rc.local
    Else the RPi will switch automatically to the SSID configured in Network-Manager when running hostapd

stephanecodo
Posts: 12
Joined: Tue Jan 22, 2013 10:14 am

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

Sun May 19, 2013 2:30 pm

That's awesome! I will give it a try! Thanks.

radierer
Posts: 3
Joined: Fri May 17, 2013 10:31 pm

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

Mon May 20, 2013 12:09 pm

@ SirLagz

thank you for your fast replay.

So, as you said i add the requested lines in the /etc/network/interfaces. For the driver i added "driver=rt1871xdrv" because of the same wifi dongle as the thread starter.

But my AP won`t work till now. I tried to start the hostapd manually by "sudo service hostapd start" and it failed. Then i wanted to look at "iw list", but it said "n180211" not found. Is there a maybe a problem with the driver added in the /etc/network/interfaces?

Greetings

User avatar
solar3000
Posts: 982
Joined: Sat May 18, 2013 12:14 am

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

Mon May 20, 2013 3:51 pm

oh the shaking of that hard drive.
let us know how long that hdd lasts.
Antikythera

tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Fri May 24, 2013 7:03 am

Guys,

I hope you can help me with this.
I have TP-Link TL-WN725N v1 (8188CUS chipset) and I got with the AP config as far as to the point where my iPad can see the wireless AP but there is no way I can connect to it.

I have tried all your hints from this, and many other tutorials, and I can't get it working...

I can paste all of my config files but I do not want to spam the thread. I have basically copied-pasted your config files and it still does not work (i am using hostapd downloaded from you and isc-dhcp-server).

When I try to jon the network, iPad says: Unable to join the network My_AP.

cat /var/log/syslog shows the following (which is suspicious for me):

Code: Select all

May 24 08:51:18 raspbmc wpa_supplicant[775]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
May 24 08:51:18 raspbmc NetworkManager[643]: <info> (wlan0): supplicant interface state: inactive -> disconnected
May 24 08:51:18 raspbmc NetworkManager[643]: <info> (wlan0): supplicant interface state: disconnected -> inactive
May 24 08:51:18 raspbmc wpa_supplicant[775]: wlan0: No network configuration found for the current AP
May 24 08:51:18 raspbmc wpa_supplicant[775]: wlan0: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0
May 24 08:51:18 raspbmc NetworkManager[643]: <info> (wlan0): supplicant interface state: inactive -> disconnected
May 24 08:51:19 raspbmc NetworkManager[643]: <info> (wlan0): supplicant interface state: disconnected -> inactive
May 24 08:51:24 raspbmc dhcpd: Wrote 0 leases to leases file.

Code: Select all

pi@raspbmc:/etc/dhcp$ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr a0:f3:c1:08:21:ac
          inet addr:192.168.42.1  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::a2f3:c1ff:fe08:21ac/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Any help would be highly appreciated :)

tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Sat May 25, 2013 8:36 am

Finally! It works. I was missing proper entries in interfaces file.

I will post step-by-step instructions, merging every tip I have found along the way at http://raspberry-at-home.com. Hopefully I will be able also to develop a script that would do all of this :)

tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Tue Jun 04, 2013 9:16 pm

Done. Check it out:
http://raspberry-at-home.com/hotspot-wifi-access-point/

There is also shell script to be downloaded which will help you set up your AP.

Any comments? Let me know.

RobertJB66
Posts: 4
Joined: Sun Jun 02, 2013 9:39 pm

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

Fri Jun 07, 2013 10:18 pm

HI I have used the script and checked it and still the system is coming up with pi raspberry

After a restart I get:
[FAIL] Starting advanced IEEE802.11 management : hostpad failed

then a couple of lines below that it states:
dhcpd self-test failed. Please fix /etc/dhcp.dhcpd.conf.
The error was:
Internet Systems Consortium DHCP Server 4.2.2.
Copyright 2004-2011 INternet Systems Consortium
All rights reserved.
For info, please visit http://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.cong line 7: semicolum expected.
option
^
Configuration file errors encountered -- exiting

then I have two [ok] lines
then My IP address is 192.168.2.1
[FAIL] startpar: service(s) returned failure: isc-dhcp-server ... failed!

what can be the solution ;)



my dhcpb.conf file is like below:

ddns-update-style none;
default-lease-time 84600;
max-lease-time 84600;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.2 192.168.2.9;
option domain-name-servers 192.168.3.1;
option domain-name "home"
option routers 192.168.2.1;
}

tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Sat Jun 08, 2013 5:38 am

Hi,

It looks like you have two issues. Easy one is with /etc/dhcp/dhcpd.conf. Apparently you have removed the semicolon from the line
option domain-name "home"
so just add it back :)

It should look like this:

ddns-update-style none;
default-lease-time 84600;
max-lease-time 84600;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.2 192.168.2.9;
option domain-name-servers 192.168.3.1;
option domain-name "home";
option routers 192.168.2.1;
}

As for hostapd failure, could you execute the following command and paste the output in your next post:
sudo hostapd -dd /etc/hostapd/hostapd.conf
Please also provide your WiFi dongle model together with chipset.

RobertJB66
Posts: 4
Joined: Sun Jun 02, 2013 9:39 pm

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

Sat Jun 08, 2013 2:33 pm

HI.

Thanks for your help.
You where right about the semicolon.
That fixed the first one.

Then at the hostapd.conf the wpa_passphrase was only 5 characters and needed to be between 8 and 63.
After I changed that it works.

PS. The dongle is a DWA-121 with a 8188CUS chip. :roll:

Thanks for the help. :D
Last edited by RobertJB66 on Sun Jun 09, 2013 1:28 pm, edited 1 time in total.

RobertJB66
Posts: 4
Joined: Sun Jun 02, 2013 9:39 pm

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

Sun Jun 09, 2013 12:03 pm

I do have a other question ;)
The Pi us running and does not give any error's. :D
The Pi giving out ip addresses so that does work.
The Pi is connected with his eth0 to my lan.
With ifconfig I do not see a ip address on the lan0.
My home network 192.168.1.1 and normally the the Pi gets 192.168.1.113 as Ip address.

What do I need to do so it will work as router or hotspot?
Can it be done?

thanks

kcocco
Posts: 1
Joined: Sun Jun 09, 2013 9:54 pm

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

Sun Jun 09, 2013 10:09 pm

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.
@rdidier Would you please share your configs (interfaces, wpa_supplicant,...?) for two wifi adaptors... this is exactly what I am working towards. Thank you!!

tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Mon Jun 10, 2013 7:55 pm

RobertJB66 wrote:I do have a other question ;)
With ifconfig I do not see a ip address on the lan0.
My home network 192.168.1.1 and normally the the Pi gets 192.168.1.113 as Ip address.
I have just changed the script so that it is not overwriting /etc/network/interfaces - most likely in your case that's what ruined your old network setup. You can still find your old interfaces file in /etc/network directory.

Let me know if that didn't help.
Tociek

mikjo
Posts: 1
Joined: Wed Aug 14, 2013 2:14 pm

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

Wed Aug 14, 2013 2:19 pm

Hi
Thanks for this post, it was useful to me.

One question: What changes on hostapd was needed in order to make this work? Will these changes be incorporated in future versions of the "official" version of hostapd?

BR
Mike

Kelta
Posts: 2
Joined: Sat Aug 17, 2013 2:36 pm

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

Tue Aug 20, 2013 5:22 pm

hi,

Struggling to get the access point running using a DWA-121

I can see the access point, but when i try to connect i get failed connection. Tried both windows 7 and android phone and both were refused.

I had to remove line250 :echo "allow-hotplug ${NIC}" as it was already defined in the interface file for the latest Raspbian wheezy. - script found here: http://raspberry-at-home.com/hotspot-wifi-access-point. If its not removed then when i restart the Pi Ethernet is also broken, meaning i cannot connect via ssh.

This is my interface file:

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
auto wlan0
iface wlan0 inet static
        address 192.168.10.1
        netmask 255.255.255.0
up iptables-restore < /etc/iptables.ipv4.nat
Im thinking something here is causing clients to be refused?

Hope someone can help,

Stew.


tociek
Posts: 9
Joined: Thu May 02, 2013 7:01 pm

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

Sat Aug 24, 2013 12:10 pm

Kelta wrote:hi,

Struggling to get the access point running using a DWA-121

I can see the access point, but when i try to connect i get failed connection. Tried both windows 7 and android phone and both were refused.
It looks like you have an issue with dhcp server. Try manually shut down hostapd and dhcp server and the start hostapd and dhcp server (in this order).

You can also share your dhcp config.

Tociek

Beakman
Posts: 1
Joined: Tue Sep 10, 2013 4:09 pm

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

Tue Sep 10, 2013 4:13 pm

Hello All,
How did you handle the removal of power to the PI each time you turned off the ignition switch? Did you place some type of soft power down switch in line with the power or are you just killing it?
Thanks for any info.
Charlie

Herschelle
Posts: 2
Joined: Thu Oct 10, 2013 9:51 am

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

Thu Oct 10, 2013 1:47 pm

Hi

I have got the RPi working as an AP and my phone connects to it and gets an IP.

but none of the XBMC remotes will connect on my phone to the RPi.

is there something i am missing?

thanks

User avatar
Davespice
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1618
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
Contact: Website Twitter

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

Thu Oct 10, 2013 3:37 pm

I think you have to go into the settings and turn on the webserver.

Herschelle
Posts: 2
Joined: Thu Oct 10, 2013 9:51 am

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

Fri Oct 11, 2013 6:20 am

Davespice wrote:I think you have to go into the settings and turn on the webserver.
It was all turned on. even airplay :)

anyway, it just started working. i rebooted a few times, always resisting the urge to change something and it just started working.
last thing i remember doing is installing an ssh app on my phone and ssh'ing to the RPi. after that the remotes just work. probably unrelated though.

as for the power switch, i dont have 1. i am just letting the RPi power up and down with the AV system and amp. no issues so far.

Return to “General discussion”

Who is online

Users browsing this forum: n67 and 42 guests