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

Re: Wireless AP setup: RTL8188CUS



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.
>>>> >>>>>>>> I want to set it up on my headless Debian Wheezy server as a Wireless
>>>> >>>>>>>> Access Point. 
>>>> >>>>>>>>
>>>> >>>>> <snipped>
>>>> >>>>>>>>
>>>> >>>>>>>> However, I can't find the installed driver, and I don't know how can I
>>>> >>>>>>>> load it as a kernel module? 
>>>> >>>>>>>
>>>> >>>>>>> Had you read this wiki page about that chipset?
>>>> >>>>>>> https://wiki.debian.org/rtl819x
>>>> >>>>>>
>>>> >>>>>> Yes, I had. There I found that that my USB Wifi adapter is supported:
>>>> >>>>>>
>>>> >>>>>> when I plug in the WiFi usb adapter, lsusb shows the following:
>>>> >>>>>> Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS
>>>> >>>>>> 802.11n WLAN Adapter
>>>> >>>>>>
>>>> >>>>>> and on the webpage https://wiki.debian.org/rtl819x there is this davice
>>>> >>>>>> listed:
>>>> >>>>>>
>>>> >>>>>> USB: 0BDA:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN
>>>> >>>>>> Adapter 
>>>> >>>>>>
>>>> >>>>>> On the web page: https://wiki.debian.org/rtl819x there I found the
>>>> >>>>>> following information:
>>>> >>>>>>
>>>> >>>>>> rtl8192cu (supported devices)
>>>> >>>>>>
>>>> >>>>>>  Supports USB devices based on the RTL8188CUS and RTL8192CU chips.
>>>> >>>>>>
>>>> >>>>>>  Introduced in Linux 2.6.39, enabled at 
>>>> >>>>>>  linux-2.6  2.6.39~rc7-1~experimental.1. 
>>>> >>>>>>
>>>> >>>>>> So now what should I do to get this USB Wifi adapter works?
>>>> >>>> 
>>>> >>>>> Did you install the matching headers? 
>>>> >>>> 
>>>> >>>> I did install the linux-headers-2.6-powerpc.
>>>> >>>> 
>>>> >>>>> Do you get a match on the chipset series when greping through the
>>>> >>>>> likely modules after piping through string? 
>>>> >>>> 
>>>> >>>> When I run 'make menuconfig' in the kernel source directory, I found the
>>>> >>>> Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
>>>> >>>> module
>>>> >>>> 
>>>> >>>> in the 
>>>> >>>> 
>>>> >>>> Linux/powerpc 2.6.39.4-4 Kernel Configuration / \
>>>> >>>>  Device Drivers / Network device support / Wireless LAN 
>>>> >>>> 
>>>> >>>> In menuconfig I saved the setup in to .config file.
>>>> >>>> 
>>>> >>>> But when I run after 'make menuconfig' the 'make' command, I get
>>>> >>>> error message: 
>>>> >>>> 
>>>> >>>> arch/powerpc/kernel/align.c: In function ‘fix_alignment’:
>>>> >>>> arch/powerpc/kernel/align.c:704:33: error: variable ‘instruction’ set
>>>> >>>> but not used [-Werror=unused-but-set-variable]
>>>> >>>> cc1: all warnings being treated as errors
>>>> >>>> make[1]: *** [arch/powerpc/kernel/align.o] Error 1
>>>> >>>> make: *** [arch/powerpc/kernel] Error 2
>>>> >>>> 
>>>> >>>> What could be the problem here?
>>>> >>>
>>>> >>> Sorry (again). But I don't have clue.
>>>> >>> I can tell you how to suppress the warning (--disable-werror):-
>>>> >>> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
>>>> >>>
>>>> >>> but not how to fix the problem that generates it.
>>>> >>
>>>> >> I'm trying to fix this problem with installing gcc-4.4 on my Debian
>>>> >> Wheezy system.
>>>> >>
>>>> >> Now when I have installed the gcc-4.4, I made a symbolic link:
>>>> >> ls -l /usr/bin/gcc
>>>> >> lrwxrwxrwx 1 root root 16 febr   2 06:34 /usr/bin/gcc -> /usr/bin/gcc-4.4
>>>> >>
>>>> >> The gcc symbolic link are linked before this to the /usr/bin/gcc-4.6.
>>>> >>
>>>> >> Now I'm running the 'make' command in the kernel source file with the
>>>> >> .config setup file. Sofar it is successfull, but it is ongoing yet. I'm
>>>> >> waiting the make command to terminate successfull.
>>>> >
>>>> > It's done ( after 8 houers ):
>>>> >
>>>> > sudo dpkg -i bubba3-kernel-headers-powerpc_2.6.39.4-13_powerpc.deb
>>>> > bubba3-kernel_2.6.39.4-13_powerpc.deb
>>>> > (Adatbázis olvasása ... 76193 files and directories currently
>>>> > installed.)
>>>> > bubba3-kernel-headers-powerpc 1:2.6.39.4-13 cseréjének előkészítése (e
>>>> > csomaggal: bubba3-kernel-headers-powerpc_2.6.39.4-13_powerpc.deb) ...
>>>> > Csere kicsomagolása: bubba3-kernel-headers-powerpc ...
>>>> > Selecting previously unselected package bubba3-kernel.
>>>> > dpkg: considering removing bubba-kernel in favour of bubba3-kernel ...
>>>> > dpkg: yes, will remove bubba-kernel in favour of bubba3-kernel
>>>> > Kicsomagolás: bubba3-kernel innen: bubba3-kernel_2.6.39.4-13_powerpc.deb
>>>> > ...
>>>> > Beállítás: bubba3-kernel-headers-powerpc (1:2.6.39.4-13) ...
>>>> > Beállítás: bubba3-kernel (1:2.6.39.4-13) ...
>>>> > WARNING: could not open /lib/modules/2.6.39.4-13/modules.builtin: No
>>>> > such file or directory
>>>> >
>>>> > Well, about this WARNING at the end: is this serious?
>>>> >
>>>> > Should I reboot my Bubba box now safely?
>>>> 
>>>> I did the followings.
>>>> 
>>>> 1.
>>>> dget -xu \
>>>> http://b3.update.excito.org/pool/main/l/linux/linux_2.6.39.4-13.dsc
>>>> 
>>>> 2.
>>>> cd linux-2.6.39.4/
>>>> 
>>>> 3.
>>>> make menuconfig
>>>> 
>>>> 4.
>>>> Load the default excito configuration: From the menu, select Load an
>>>> Alternate Configuration File and enter the following path: 
>>>> arch/powerpc/configs/bubbatwo_defconfig
>>>> 
>>>> 5.
>>>> I customize the kernel so I included the rtl8192cu driver as a Module.
>>>> The resulting configuration are placed in 
>>>> arch/powerpc/configs/bubbatwo_defconfig
>>>> 
>>>> 6.
>>>> dpkg-buildpackage -us -uc -b -apowerpc
>>>> 
>>>> 7.
>>>> I get the resulting two packages in the parent directory:
>>>> bubba3-kernel_2.6.39.4-13_powerpc.deb
>>>> bubba3-kernel-headers-powerpc_2.6.39.4-13_powerpc.deb
>>>> 
>>>> 8.
>>>> I installed these packages with the command:
>>>> sudo dpkg -i \
>>>> bubba3-kernel-headers-powerpc_2.6.39.4-13_powerpc.deb \
>>>> bubba3-kernel_2.6.39.4-13_powerpc.deb 
>>>> 
>>>> 
>>>> I investigate a little and found that that the
>>>> /lib/modules/2.6.39.4-13/build/drivers/net/wireless/rtlwifi/rtl8192cu/
>>>> 
>>>> directory is empty..
>>>
>>> Shouldn't you be looking in 
>>> /lib/modules/2.6.39.4-13/kernel/drivers/net/wireless/rtlwifi/rtl8192cu/
>>>                          ^^^^^^
>>> Do you have a module there?
>>>
>>>
>>>> I don't understand the followings, quoted from the forum here:
>>>> http://forum.excito.net/viewtopic.php?f=9&t=4744
>>>> 
>>>> <quote>
>>>> Are you compiling on the B2 itself? I had a similar issue with one of my
>>>> first projects. The modules directory should contain a symlink to the
>>>> kernel source ( build -> ../../../usr/src/linux ). Obviously this means
>>>> you need to have the source and it needs to be prepared. 
>>>> </quote>
>>>> 
>>>> What missed I here?
>>>
>>> That looks like it's about getting compilation errors, but you seem to 
>>> have compiled fine so I don't think it's relevant.
>>
>> I have finally compiled and installed the custom 2.6.39.4-13 kernel with
>> modules too.
>>
>> What I did is the following.
>>
>> I download the kernel debian packages
>> bubba3-kernel_2.6.39.4-13_powerpc.deb
>> bubba3-kernel-headers-powerpc_2.6.39.4-13_powerpc.deb
>>
>>  from here:
>> http://b3.update.excito.org/pool/main/l/linux/
>>
>> then I installed these two debian packages, and reboot the Bubba 2
>> headless PC Box successfully.
>>
>> After that I did follow the steps described here:
>> http://wiki.excito.org/wiki/index.php/Building_a_custom_kernel
>>
>> with the small exception:
>>
>> In menuconfig I check the needed module:
>> ===========
>> arch/powerpc/configs/bubbatwo_defconfig - Linux/powerpc 2.6.39.4 Kernel
>> Configuration
>> Linux/powerpc 2.6.39.4 Kernel Configuration
>> Device Drivers -->
>> Netword Device Support -->
>> Wireless LAN -->
>> Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter
>>
>> Save the file in Menuconfig, then exit from there.
>>
>> cp arch/powerpc/configs/bubbatwo_defconfig .config
>>
>> make
>>
>> 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, rtlwifi to, but without any
>> success.
>> Which drivername is walid? How can I find the proper drivername for my
>> usb wireless network adapter?
>
> 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.
>
> How can I setup this, to always get the wlan0 name of the wifi interface?

OK, I have now the followings in my /etc/network/interfaces file:

<file>
auto lo
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

# wifi on wlan0
allow-hotplug wlan0
iface wlan0 inet manual

# for static ip
iface br0 inet static
bridge_ports eth0 wlan0
# adapt with your network settings
address 192.168.10.250
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1
</file>

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

but, the command
sudo ifconfig -a
gives to me only:
eth0      Link encap:Ethernet  HWaddr 00:22:02:00:07:3c  
          inet addr:95.85.143.55  Bcast:95.85.143.255
          Mask:255.255.252.0
          inet6 addr: fe80::222:2ff:fe00:73c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:827310 errors:0 dropped:0 overruns:0 frame:0
          TX packets:187232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:400388262 (381.8 MiB)  TX bytes:46632384 (44.4 MiB)
          Base address:0x8000 

eth1      Link encap:Ethernet  HWaddr 00:22:02:00:07:3d  
          inet addr:192.168.10.1  Bcast:192.168.10.255
          Mask:255.255.255.0
          inet6 addr: fe80::222:2ff:fe00:73d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:179577 errors:0 dropped:0 overruns:0 frame:0
          TX packets:269461 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:47300513 (45.1 MiB)  TX bytes:345162067 (329.1 MiB)
          Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8398 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8398 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2537465 (2.4 MiB)  TX bytes:2537465 (2.4 MiB)

and
sudo iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      no wireless extensions.

Where is the wlan0 interface?

-- 
Regards from Pal


Reply to: