[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wireless AP setup: RTL8188CUS



Scott Ferguson <scott.ferguson.debian.user@gmail.com> writes:

> On 25/02/14 07:03, Csanyi Pal wrote:
>> Csanyi Pal <csanyipal@gmail.com> writes:
>> 
>>> Csanyi Pal <csanyipal@gmail.com> writes:
>>> 
>>>> Hi Selim,
>>>> 
>>>> "Selim T. Erdogan" <selim@alumni.cs.utexas.edu> writes:
>>>> 
>>>>> Csanyi Pal,  3.02.2014:
>>>>>> Csanyi Pal <csanyipal@gmail.com> writes:
>>>>>> 
>>>>>>> Csanyi Pal <csanyipal@gmail.com> writes:
>>>>>>> 
>>>>>>>> Scott Ferguson <scott.ferguson.debian.user@gmail.com>
>>>>>>>> writes:
>>>>>>>> 
>>>>>>>>> On 02/02/14 09:14, Csanyi Pal wrote:
>>>>>>>>>> Scott Ferguson <scott.ferguson.debian.user@gmail.com>
>>>>>>>>>> writes:
>>>>>>>>>> 
>>>>>>>>>>> On 01/02/14 21:57, Csanyi Pal wrote:
>>>>>>>>>>>> Scott Ferguson
>>>>>>>>>>>> <scott.ferguson.debian.user@gmail.com> writes:
>>>>>>>>>>>> 
>>>>>>>>>>>>> On 31/01/14 04:53, Csanyi Pal wrote:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I just bought an USB dongle nano Netis
>>>>>>>>>>>>>> WF-2120 adapter.
>
> WI1 chip1: Realtek RTL8188CUS
> FCC ID: T58WF2120R
> https://apps.fcc.gov/oetcf/eas/reports/ \
> GenericSearchResult.cfm?RequestTimeout=500
>
>
>
>>>>>>>>>>>>>> I want to set it up on my
>>>>>>>>>>>>>> headless Debian Wheezy server as a Wireless 
>>>>>>>>>>>>>> Access Point.
>>>>>>>>>>>>>> 
>>>>>>>>>>> <snipped>
>>>>>>>>>>>>>> 
> <snipped>
>>>> 
>>>> sudo make modules_install
>>>> 
>>>> This did install the modules in the right place.
>>>> 
>>>> Now I'm trying to setup the network and interfaces so get the
>>>> usb wireless adapter to works.
>>>> 
>>>> I'm following the advices described here: 
>>>> http://www.cyberciti.biz/faq/debian-ubuntu-linux- \
>>>> setting-wireless-access-point/
>>>>
>>>>
>>>> and here:
>>>> https://agentoss.wordpress.com/2011/10/31/creating- \
>>>> a-wireless-access-point-with-debian-linux/
>>>>
>>>>
>>>> sofar without success..
>>>> 
>>>> When I run the command bellow: sudo hostapd -dd
>>>> /etc/hostapd/hostapd.conf
>>>> 
>>>> I get the messages: random: Trying to read entropy from
>>>> /dev/random Configuration file: /etc/hostapd/hostapd.conf Line 6:
>>>> invalid/unknown driver 'rtl8192sfw' 1 errors found in
>>>> configuration file '/etc/hostapd/hostapd.conf'
>>>> 
>>>> I tried with driver names: rtl8192cu
>
> FWIW that's the one I'd try (only if the stock module failed would I
> compile one from non-Debian source).
>
>>>>, rtlwifi to, but without
>>>> any success. Which drivername is walid? How can I find the proper
>>>> drivername for my usb wireless network adapter?
>
> See above paragraph (based on the chipset from the FCCID)
>
>
> apropos of little.... what do you get from?:-
> $ mlocate rtl8192sfw

$ mlocate rtl8192sfw
/lib/firmware/RTL8192SU/rtl8192sfw.bin

>>> Moreover, now, when I connect my usb wifi adapter to my Bubba 2, I
>>> get a new interface, the wlanN, where the N is a number, from 1 to
>>> 5 so far.
>
> That's as it should be I believe.
>
>>> 
>>> How can I setup this, to always get the wlan0 name of the wifi
>>> interface?
>
> $ grep wlan /etc/udev/rules.d/70-persistent-net.rules
> if it's there (I don't have one I can check at present) then edit the
> entry matching the correct MAC address and change it's name from wlanN
> to wlan0, then remove the other wlanN lines. You'll need to be root to
> edit the file.
>
>> 
>> OK, I have now the followings in my /etc/network/interfaces file:
> <snipped>
>> 
>> # wifi on wlan0 allow-hotplug wlan0 iface wlan0 inet manual
>> 
> <snipped>
>> 
>> Now, when I run the command: sudo ifup wlan0
>> 
>> I get nothing as output..
>> 
>> If I run it again, I get: ifup: interface wlan0 already configured
>
> Yes. ifup only does something if the net device is not up already.
> Instead try:-
> # ifdown wlan0;ifup wlan0
>
>> 
>> but, the command sudo ifconfig -a gives to me only: eth0      Link
>> encap:Ethernet  HWaddr 00:22:02:00:07:3c
> <snipped>
>> 
>> eth1      Link encap:Ethernet  HWaddr 00:22:02:00:07:3d
> <snipped>
>> 
>> lo        Link encap:Local Loopback
> <snipped>
>> and sudo iwconfig lo        no wireless extensions.
>> 
>> eth0      no wireless extensions.
>> 
>> eth1      no wireless extensions.
>> 
>> Where is the wlan0 interface?
>
> You set it to manual (so it's off somewhere reading the manual?) ;p
>
> It's there, but you haven't specified it e.g.:-
> # iwconfig wlan0
> which is why iwconfig it's trying all of the *configured* network devices.
>
> man interfaces <snipped section>
> "The manual Method
>        This method may be used to define interfaces for which *no*
> configuration is done by default. Such interfaces can be configured
> manually by means of up and down commands or /etc/net‐work/if-*.d scripts."
>
> What I take that to mean is - that unless you have something in
> /etc/network/if-*.d then the if up/down commands need to be qualified.
> .i.e issuing:-
> # ifup wlan0
> is interpreted as "do nothing to wlan0". Compare that to "ifup eth1"
> which is interpreted as "ifup eth1 <use settings from section in
> interfaces>"

Well, my home network diagram is:

Internet
   \
    cable modem
         \
         eth0
          Bubba Two headless powerpc box -> wlan0 - USB wifi adapter )))
          eth1
            \
             switch
                \
                eth0
                 Debian SID desktop


 ))) laptop

 ))) android mobile phone

So I want to setup Bubba Two for my home wifi LAN for laptop and android
mobile phone.

My /etc/network/interfaces file is now, without the WiFi setup:
<interfaces>
auto lo br0
iface lo inet loopback

# Internet on eth0
allow-hotplug eth0
iface eth0 inet dhcp

# LAN on eth1
allow-hotplug eth1
iface eth1 inet static
    address 192.168.10.1
    netmask 255.255.255.0
</interfaces>


and with WiFi setup ( that doesn't work yet ):
<interfaces>
auto lo br0
iface lo inet loopback

# Internet on eth0
allow-hotplug eth0
iface eth0 inet manual

# LAN on eth1
allow-hotplug eth1
iface eth1 inet static
    address 192.168.10.1
    netmask 255.255.255.0

# for dhcp address
iface br0 inet dhcp
bridge_ports eth0 wlan0
</interfaces>

When I use this latter, I can't reach the Internet from my Debian SID
desktop, but can to ssh to my Bubba 2.

Moreover, with the latter interfaces setup, when I run the command as
root: 
hostapd -dd /etc/hostapd/hostapd.conf

I lose the ssh connection from desktop to Bubba.

The /etc/hostapd/hostapd.conf file is now:
<hostapd.conf>
### Wireless network name ###
interface=wlan0
### Set your bridge name ###
bridge=br0

driver=nl80211

country_code=RS
ieee80211d=1

ssid=Cs5P3

hw_mode=g

channel=6

wme_enabled=0

wpa=2

wpa_passphrase='*********************'

## Key management algorithms ##
wpa_key_mgmt=WPA-PSK

## Set cipher suites (encryption algorithms) ##
## TKIP = Temporal Key Integrity Protocol
## CCMP = AES in Counter mode with CBC-MAC
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1

## Accept all MAC address ###
macaddr_acl=0

ignore_broadcast_ssid=0
## Shared Key Authentication ##
</hostapd.conf>

This setup doesn't work. Why?
Any advices will be appreciated!

-- 
Regards from Pal


Reply to: