2013-11-25 18:04:31

by p2p

[permalink] [raw]
Subject: RTL8188S

Hello,

I have a WLAN dongle with Realtek RTL8188S chip.
I don't want to use r8712u driver with wext interface because I want to
establish a wifi direct p2p connection.
Unfortunately the original Realtek driver from hp didn't work with p2p
too.
I thought RTL8192cu will work, but Larry F. told me it doesn't.

He said there is a new driver in development.
I'm searching for information. Please can someone tell me about the
project, its status, and if someone can take part.

Best regards
p2p


2013-11-25 21:57:18

by Christian Lamparter

[permalink] [raw]
Subject: Re: RTL8188S

T24gTW9uZGF5LCBOb3ZlbWJlciAyNSwgMjAxMyAwNjo1NzozMiBQTSBwMnBAcG9zdGVvLmRlIHdy
b3RlOgo+IEkgaGF2ZSBhIFdMQU4gZG9uZ2xlIHdpdGggUmVhbHRlayBSVEw4MTg4UyBjaGlwLgo+
IEkgZG9uJ3Qgd2FudCB0byB1c2Ugcjg3MTJ1IGRyaXZlciB3aXRoIHdleHQgaW50ZXJmYWNlCj4g
YmVjYXVzZSBJIHdhbnQgdG8gZXN0YWJsaXNoIGEgd2lmaSBkaXJlY3QgcDJwIGNvbm5lY3Rpb24u
CgpBRklDVCwgeW91IHNob3VsZCBiZSBhYmxlIHRvIGNvbm5lY3QgdG8gYSBwMnAtZ28gcGVlcgpl
dmVuIGlmIHlvdXIgZGV2aWNlIChpbiB0aGlzIGNhc2UgcnRsODE4OHMpIG9ubHkgc3VwcG9ydHMK
c3RhdGlvbiBtb2RlLi4uCgo+IFVuZm9ydHVuYXRlbHkgdGhlIG9yaWdpbmFsIFJlYWx0ZWsgZHJp
dmVyIGZyb20gaHAgZGlkbid0Cj4gd29yayB3aXRoIHAycCB0b28uCldoeSwgd2hhdCBoYXBwZW5z
IGluIHRoaXMgY2FzZT8KCj4gSSB0aG91Z2h0IFJUTDgxOTJjdSB3aWxsIHdvcmssIGJ1dCBMYXJy
eSBGLiB0b2xkIG1lIGl0IGRvZXNuJ3QuCk9LPyAoY2FyZSB0byBleHBsYWluPykKCj4gSGUgc2Fp
ZCB0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syXS4KClRoZSBkcml2ZXIg
aXMgbG9jYXRlZCBpbjoKICBFZGltYXgvc3JjL2tlcm5lbC9saW51eC0yLjYuMTguOC9kcml2ZXJz
L3VzYi9uZXQvODE5MnN1CgpUaGUgZmlybXdhcmUgKyBwaHkgdmFsdWVzOgogIEVkaW1heC9zcmMv
a2VybmVsL2xpbnV4LTIuNi4xOC44L3Vzci9yYW1mcy91c3IvcnRsODE5MnN1CgAgCkhvd2V2ZXIs
IHRoZXJlJ3MgbXVjaCB0aGF0IG5lZWRzIHRvIGJlIGRvbmUuIFNvLCBpZiB5b3Ugd2FudCB0byBo
ZWxwCnlvdSBjYW4gImtpY2tzdGFydCIgdGhlIHBvcnQgOi0pLgoKUmVnYXJkcwoKQ2hyCgpbMF0g
PGh0dHA6Ly93d3cuc3Bpbmljcy5uZXQvbGlzdHMvbGludXgtd2lyZWxlc3MvbXNnMTE0MjEzLmh0
bWw+IChqdXN0IGZvbGxvdyB0aGUgdGhyZWFkKQpbMV0gPGh0dHA6Ly93d3cuc3Bpbmljcy5uZXQv
bGlzdHMvbGludXgtd2lyZWxlc3MvbXNnMTE0MjE1Lmh0bWw+ClsyXSA8aHR0cDovL3d3dy5lZGlt
YXguY29tL2ltYWdlcy9JbWFnZS9PcGVuU291cmNlQ29kZS9XaXJlbGVzcy9Sb3V0ZXIvQVItNzI4
NFduQS9BUi03Mjg0V25BJkJfU0RLXzYyMjIudGFyLnppcD4=


2013-11-26 20:38:59

by Christian Lamparter

[permalink] [raw]
Subject: Re: RTL8188S

Dear Ms./Mr. ...?

On Tuesday, November 26, 2013 05:47:48 PM [email protected] wrote:
> Am 25.11.2013 22:57 schrieb Christian Lamparter:
> > On Monday, November 25, 2013 06:57:32 PM [email protected] wrote:
> >> I have a WLAN dongle with Realtek RTL8188S chip.
> >> I don't want to use r8712u driver with wext interface
> >> because I want to establish a wifi direct p2p connection.
> >
> > AFICT, you should be able to connect to a p2p-go peer
> > even if your device (in this case rtl8188s) only supports
> > station mode...
> >
> How do I do this?
"station mode"!

The theory is: the p2p group owner (go) peer behaves pretty much
like an Access Point. Hence, legacy devices like the rtl81yySx
can connect to it the same way like they would connect to an
accesspoint or router.

No "magic" driver or anything is needed. If you can connect to a
run-of-the-mill protected AP, you can connect to a running wifi-direct
network.

> >> Unfortunately the original Realtek driver from hp didn't
> >> work with p2p too.
> > Why, what happens in this case?
> >
>
> I have downloaded the driver from:
> http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8188SU

this would also have worked with r8712u or r92su.

> Installed and loaded the module 8712u.
>
> "iw list" doesn't list p2p-client or p2p-go.

"station mode" "station mode" and again "station mode".

"station mode" != "p2p-go" or "p2p-client". Just fire up your peer
device and let the driver connect (either via WPA2-PSK or WPS). You
don't need to deal with the console at all, this all can be done
with the push of a GUI button (NetworkManager, wicd, ...).

Remember: Do it like you simply want to connect to your AP.
(no p2p magic!)

> >> I thought RTL8192cu will work, but Larry F. told me it doesn't.
> > OK? (care to explain?)
> >
> >> He said there is a new driver in development.
> > Sort of. There's r92su, however this driver only supports what the
> > firmware is able to do (station, ad-hoc and a limited monitor mode).
> >
> >> I'm searching for information. Please can someone tell me about
> >> the project, its status, and if someone can take part.
> > Hey that's good to hear. The future of "r92su" was discussed in [0],
> > [1], ... The good news is:
> >
>
> I followed the thread.
> It shows me that it makes no sense. I am a beginner and I only can
> spent time for it if someone tells me for example: fill this module with
> code for this specific function. I have good literature and I think I
> can try to help but not lead something.

Hey that's great, that's exactly what needs to be "done". ;-)

Larry has already written a framework for realtek wifi devices. The rtl8192su
device can make use of this. You just need to lift the "firmware parser",
"device initialization" from the other vendor driver at: [0]. And wire it into
the Larry's rtlwifi framework.

You don't need to start from scratch either. In the git-tree of r92su, there
is already an directory with an old rtl8192su driver [it also uses the r92su
firmware and not the one from the driver in [0], so needs to be considered].
But definitely not like the material isn't there. It just hasn't been put
together. Also, you can look at rtl8192cu and rtl8192se if you need some
guidance with rtlwifi. They should provide enough ideas to get a working
driver.

Regards,

Christian

[0] <http://www.edimax.com/images/Image/OpenSourceCode/Wireless/Router/AR-7284WnA/AR-7284WnA&B_SDK_6222.tar.zip>
(See the post in the ML thread, it lists the directory of the driver and
firmware components)

2013-11-25 22:12:16

by Larry Finger

[permalink] [raw]
Subject: Re: RTL8188S

On 11/25/2013 03:57 PM, Christian Lamparter wrote:
>> I thought RTL8192cu will work, but Larry F. told me it doesn't.
> OK? (care to explain?)

The driver for an RTL81{88,92}CU device (rtl8192cu) will not work for the
RTL81{88,92}SU device. There are substantial differences between the CU and SU
chips.

Larry



2013-11-26 16:47:59

by p2p

[permalink] [raw]
Subject: Re: RTL8188S

Dear Mr. Lamparter,

Am 25.11.2013 22:57 schrieb Christian Lamparter:
> On Monday, November 25, 2013 06:57:32 PM [email protected] wrote:
>> I have a WLAN dongle with Realtek RTL8188S chip.
>> I don't want to use r8712u driver with wext interface
>> because I want to establish a wifi direct p2p connection.
>
> AFICT, you should be able to connect to a p2p-go peer
> even if your device (in this case rtl8188s) only supports
> station mode...
>

How do I do this?

>> Unfortunately the original Realtek driver from hp didn't
>> work with p2p too.
> Why, what happens in this case?
>

I have downloaded the driver from:
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8188SU

Installed and loaded the module 8712u.

"iw list" doesn't list p2p-client or p2p-go.

wpa_cli command p2p_find results in FAIL.

wpa_supplicant ouput:

CTRL_IFACE monitor attached - hexdump(len=21): 2f 74 6d 70 2f 77 70 61
5f 63 74 72 6c 5f 32 34 39 37 2d 32 00
1385328422.214780: RX ctrl_iface - hexdump_ascii(len=8):
50 32 50 5f 46 49 4e 44 P2P_FIND
1385328422.214893: wlan0: Control interface command 'P2P_FIND'

-> but nothing more...

>> I thought RTL8192cu will work, but Larry F. told me it doesn't.
> OK? (care to explain?)
>
>> He said there is a new driver in development.
> Sort of. There's r92su, however this driver only supports what the
> firmware is able to do (station, ad-hoc and a limited monitor mode).
>
>> I'm searching for information. Please can someone tell me about
>> the project, its status, and if someone can take part.
> Hey that's good to hear. The future of "r92su" was discussed in [0],
> [1], ... The good news is:
>

I followed the thread.
It shows me that it makes no sense. I am a beginner and I only can
spent time for it if someone tells me for example: fill this module with
code for this specific function. I have good literature and I think I
can try to help but not lead something.

Best regards
p2p

2013-11-25 22:59:06

by Christian Lamparter

[permalink] [raw]
Subject: Re: RTL8188S

On Monday, November 25, 2013 04:12:14 PM Larry Finger wrote:
> On 11/25/2013 03:57 PM, Christian Lamparter wrote:
> >> I thought RTL8192cu will work, but Larry F. told me it doesn't.
> > OK? (care to explain?)
>
> The driver for an RTL81{88,92}CU device (rtl8192cu) will not work for the
> RTL81{88,92}SU device. There are substantial differences between the CU and SU
> chips.

Thanks. I first thought a RTL81xyCU device was involved somehow (for example
as the P2P GO peer on the other end, or as a replacement for rtl8192su device).

But apparently not... well, that's too bad.

Regards

Christian

2013-12-04 19:20:38

by Christian Lamparter

[permalink] [raw]
Subject: Re: RTL8188S

(readded cc)

Hello Peter,

On Wednesday, December 04, 2013 07:10:01 PM [email protected] wrote:
> >> I don't know yet if I have the time to take part. But as I wrote I
> >> have a good book which describes in detail driver development for
> >> 2.6 kernel.
> >>
> >> What do you think how many LOC have to been written?
> > Ok?!
> >
> > rtl8192cu has around 8600 LOCs, rtl8192se has around 10700. That
> > said,
> > realtek's own 8190n driver comes in at 90 000+ LOCs driver [of
> > course,
> > that driver comes with its own stack, sme and maybe a few other bells
> > and whiles]. I guess the answer here is really: take what ever number
> > you prefer :-D.
> >
>
> What do you think how many percent can be written by copy and paste?

I think this problem has to be approached from two sides.

1.
In theory (as in CS theory) everything you need is basically a carefully
selected string of 0 and 1s. [That said: it is very hard to develop this way.
but it would be cool - certainly a "one of a kind" approach in these days.
It would be familiar with those who ever had to use punch cards and a
"one-shot" hole puncher].
=> need to copy & paste just 2 bits

2.
rtlwifi should already provide a decent framework/foundation for such a
driver. So no need to copy anything, you just have to use the API that's
already in place. If you need a function from rtl8192se or rtl8192cu, you
shouldn't copy it, but move it to the shared library code instead.
=> no copy & paste at all.

Summary:
"A driver can be copied & pasted together from just two bits (that would a
cool "best case")... or it could be: every single line needs to be written
by hand (is this the "worst case"? or is it the other way around)."

[I think these "statistics" only work, if the project is already "done",
or at least at the "almost nearly done" milestone.]

Regards,

Christian

2013-12-03 19:14:22

by p2p

[permalink] [raw]
Subject: Re: RTL8188S

Dear Mr. Lamparter,

Am 26.11.2013 21:38 schrieb Christian Lamparter:
> Dear Ms./Mr. ...?
>
> On Tuesday, November 26, 2013 05:47:48 PM [email protected] wrote:
>> Am 25.11.2013 22:57 schrieb Christian Lamparter:
>> > On Monday, November 25, 2013 06:57:32 PM [email protected] wrote:
>> >> I have a WLAN dongle with Realtek RTL8188S chip.
>> >> I don't want to use r8712u driver with wext interface
>> >> because I want to establish a wifi direct p2p connection.
>> >
>> > AFICT, you should be able to connect to a p2p-go peer
>> > even if your device (in this case rtl8188s) only supports
>> > station mode...
>> >
>> How do I do this?
> "station mode"!
>
> The theory is: the p2p group owner (go) peer behaves pretty much
> like an Access Point. Hence, legacy devices like the rtl81yySx
> can connect to it the same way like they would connect to an
> accesspoint or router.
>
> No "magic" driver or anything is needed. If you can connect to a
> run-of-the-mill protected AP, you can connect to a running
> wifi-direct
> network.
>
>> >> Unfortunately the original Realtek driver from hp didn't
>> >> work with p2p too.
>> > Why, what happens in this case?
>> >
>>
>> I have downloaded the driver from:
>>
>> http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8188SU
>
> this would also have worked with r8712u or r92su.
>
>> Installed and loaded the module 8712u.
>>
>> "iw list" doesn't list p2p-client or p2p-go.
>
> "station mode" "station mode" and again "station mode".
>
> "station mode" != "p2p-go" or "p2p-client". Just fire up your peer
> device and let the driver connect (either via WPA2-PSK or WPS). You
> don't need to deal with the console at all, this all can be done
> with the push of a GUI button (NetworkManager, wicd, ...).
>
> Remember: Do it like you simply want to connect to your AP.
> (no p2p magic!)
>

We need the "p2p magic" to develop a linux miracast sink.

>> I followed the thread.
>> It shows me that it makes no sense. I am a beginner and I only can
>> spent time for it if someone tells me for example: fill this module
>> with
>> code for this specific function. I have good literature and I think
>> I
>> can try to help but not lead something.
>
> Hey that's great, that's exactly what needs to be "done". ;-)
>

I don't know yet if I have the time to take part. But as I wrote I have
a good book which describes in detail driver development for 2.6 kernel.

What do you think how many LOC have to been written?

Best regards
p2p


2013-12-03 20:14:27

by Christian Lamparter

[permalink] [raw]
Subject: Re: RTL8188S

Hello - Still don't know your Name -
On Tuesday, December 03, 2013 08:14:08 PM [email protected] wrote:
> Am 26.11.2013 21:38 schrieb Christian Lamparter:
>
> We need the "p2p magic" to develop a linux miracast sink.
Sounds a bit like OpenWFD [0], or is this unrelated?

> >> I followed the thread.
> >> It shows me that it makes no sense. I am a beginner and I only can
> >> spent time for it if someone tells me for example: fill this module
> >> with
> >> code for this specific function. I have good literature and I think
> >> I
> >> can try to help but not lead something.
> >
> > Hey that's great, that's exactly what needs to be "done". ;-)
> >
>
> I don't know yet if I have the time to take part. But as I wrote I have
> a good book which describes in detail driver development for 2.6 kernel.
>
> What do you think how many LOC have to been written?
Ok?!

rtl8192cu has around 8600 LOCs, rtl8192se has around 10700. That said,
realtek's own 8190n driver comes in at 90 000+ LOCs driver [of course,
that driver comes with its own stack, sme and maybe a few other bells
and whiles]. I guess the answer here is really: take what ever number
you prefer :-D.

Regards,

Christian

[0] <http://www.freedesktop.org/wiki/Software/openwfd/>