Hi! Some general question + Wifi USB Realtek RTL8191S

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby Jocko » Thu Oct 24, 2013 7:14 pm

Glad to heard that :-D

That worked so far. Strange is the persisting IP of the wired connection.
even if you use iwconfig instead of ifconfig ?
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby matzi » Thu Oct 24, 2013 7:17 pm

For what should I use iwconfig instead? It has no "down" option.
matzi
Donator VIP
Donator VIP
 
Posts: 253
Joined: Wed Jul 06, 2011 8:08 am
Location: Hannover Germany

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby Jocko » Thu Oct 24, 2013 7:27 pm

Ok I made a mistake...

Currently I don't have more idea about this amazing wireless behaviour :scratch
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby matzi » Thu Oct 24, 2013 8:05 pm

OK. Enough for tonight. Thanks for your help :-D
Now I wait till fvdw comes along with wpa_supplicant... :please
And then I need to know in which script to put the commands as a startup. Think I need modprobe, iwconfig, ifconfig in that. I know there is rc.d, but what about runlevels?
matzi
Donator VIP
Donator VIP
 
Posts: 253
Joined: Wed Jul 06, 2011 8:08 am
Location: Hannover Germany

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby fvdw » Sun Oct 27, 2013 7:32 pm

ok a package is sent by pm, it will install a new version of openssl, libnl and wpa_supplicant

let us know if it works

ps many applications are compiled against libcrypto and libssl of the old version of openssl. This old libs will not be overwritten but some sym links pointing to it will now point to the new version. Be aware of some possible problems with existing applications
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby matzi » Tue Oct 29, 2013 8:57 pm

After many trials I have a running wpa2 connection! Not yet checked the situation when unplugging the cable.
Now I am trying to find the correct places for automatic setup for the wlan interface on boot up.

Some questions about that:
1. I placed modprobe 2800lib and modprobe 2800usb in /etc/init.d/insert-modules because there I saw some of your modifications. Good place?
2. Where to place iwconfig and ifconfig instructions and the wpa_supplicant startup command for boot up?
3. I created a file etc/network/interfaces. Is that file regarded by the current firmware? I am not quite sure because instructions there are not properly executed like "iface wlan0 dhcp".
4. udhcpc gets a lease with a valid and reasonnable IP. However when I check the IP assignment with ifconfig, it is not assigned, I have to do it manually with ifconfig wlan0 inet xxx.xxx.xxx.xxx. What can be the fault?

Remark: I have created a wpa_supplicant.conf file in /etc/wpa_supplicant.

A future wish 8-) : Would it be possible to add a section in the webinterface for wlan configuration?
matzi
Donator VIP
Donator VIP
 
Posts: 253
Joined: Wed Jul 06, 2011 8:08 am
Location: Hannover Germany

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby fvdw » Tue Oct 29, 2013 9:53 pm

matzi wrote:After many trials I have a running wpa2 connection! Not yet checked the situation when unplugging the cable.
Now I am trying to find the correct places for automatic setup for the wlan interface on boot up.

:rock good news so the binaries I have sent you do the job.
Some questions about that:
1. I placed modprobe 2800lib and modprobe 2800usb in /etc/init.d/insert-modules because there I saw some of your modifications. Good place?

That is the correct place
2. Where to place iwconfig and ifconfig instructions and the wpa_supplicant startup command for boot up?

what are the commands to add ?
Editing the boot scripts yourself is also possible but might lead to unexpected behaviour.
tell us and we wil sent you an update of the boot scripts. Otherwise your changes will be lost at each firmware upgrade (same for the insert-modules script)
3. I created a file etc/network/interfaces. Is that file regarded by the current firmware? I am not quite sure because instructions there are not properly executed like "iface wlan0 dhcp".

no it is not used by the firmware till now as there was no need for it. What do you want to put in there ?
4. udhcpc gets a lease with a valid and reasonnable IP. However when I check the IP assignment with ifconfig, it is not assigned, I have to do it manually with ifconfig wlan0 inet xxx.xxx.xxx.xxx. What can be the fault?

on this moment I have no idea, need to search the internet for that to see if others had this problem or buy such a thing myself to do detailed analysis
Remark: I have created a wpa_supplicant.conf file in /etc/wpa_supplicant.

It would be helpful if you write down what you did to get it working, we can then use it to integrate it in the firmware
A future wish 8-) : Would it be possible to add a section in the webinterface for wlan configuration?

yep, that is our intention as well !
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby matzi » Wed Oct 30, 2013 9:10 am

To point 4:

I did some research in the net and found that this file is the place where to set some important options

like dhcp setting (example):
iface default inet dhcp

static ip assigment (example):
iface default inet static
address 10.1.2.20
netmask 255.255.255.0
network 10.1.2.0
gateway 10.1.2.1

seems this cannot be placed in wpa_supplicant.conf. If this file is not regarded yet it could be the reason for the not assigned IP. Because option "iface default inet dhcp" is not set. An idea: Where is the current setting for eth0 stored? Maybe we can add wlan0 settings there?
For now I will go on fiddling. When it's perfectly running and booting, I will write a short How To and post my configuration files and procedures.
matzi
Donator VIP
Donator VIP
 
Posts: 253
Joined: Wed Jul 06, 2011 8:08 am
Location: Hannover Germany

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby Jocko » Wed Oct 30, 2013 9:41 am


3. I created a file etc/network/interfaces. Is that file regarded by the current firmware? I am not quite sure because instructions there are not properly executed like "iface wlan0 dhcp".

no it is not used by the firmware till now as there was no need for it. What do you want to put in there ?

As writing by fvdw, this file is not used by the firmware. this one is used by the commands ifup/down not by ifconfig and I assumed it's the same case with iwconfig.

Currently, eth0 settings are saved in the NAS database. I advice strongly not to play with it : you can lost easily all access to your NAS.

It's why if we implement the wan feature, we have to create some php codes and a specific menu in the web interface.
As it is a volatile feature (unplug/plug the wifi USB), we must also handle these events to restore the standard NIC (eth0). I already did that with an USB LAN adapter.
Remember some firmware features require eth0 as NIC but not main features(for example to get the MAC address or your public IP). So we must also do some changes so that the firmware uses the available NIC (eth0 or eth1, bond0... wlan0) instead of the default eth0.

But currently, I think the best way for you is to add some shell commands to config the wlan0 NIC and up it. So play carefully with rcS in /etc/init.d :ensure that after changing it has always the linux format (break line)and its run permission.
I advice you to add your wlan config command lines at this end of the file.

After releasing version 15.1, I can try to implement this new feature during December and you could test it as Christmas Gift ;)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Hi! Some general question + Wifi USB Realtek RTL8191S

Postby Jocko » Wed Oct 30, 2013 10:01 am

More information:

About rcS file, I advice you to use this trick :
add your commands within a if loop:
Code: Select all
if [ -f /etc/wlanenable ]
then
 unlink /etc/wlanenable
 (here your commands)
fi

To enable wlan configuration , a file 'wlanenable' must be existing in the folder etc and at boot this one is deleted.
(to create it just do
Code: Select all
touch /etc/wlanenable
)

So if there are some errors with your wlan settings, just make a reboot to restore the default configuration (eth0).

When you will get a right wlan settings, you could remove 'unlink command' so that at each boot your wlan NIC is brought up
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 14 guests