linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Question regarding Linux RTL driver
       [not found]       ` <CAOVbLLFcja-DV1bEq9C2U8q5eohc7O0AE=oymfjMMBOBi4D52g@mail.gmail.com>
@ 2012-01-26 18:49         ` Larry Finger
       [not found]           ` <CAOVbLLHirAKiDehW=79dv1ku1pB0JdpA9SfFkLTcLk5NZctX7A@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Larry Finger @ 2012-01-26 18:49 UTC (permalink / raw)
  To: Nikola Gacic; +Cc: wireless

On 01/26/2012 11:37 AM, Nikola Gacic wrote:
> Hello Mr. Finger,
>
>      I don't know if this is the right way for contacting you but I couldn't
> find the other way.
>      Firstly, I want to say that I am student at School of electrical
> Engineering in Belgrade and I am working on some embedded project where I tried
> to use you RTL8187 Linux driver to communicate with PIC32 microcontroller over USB.
>      I would appreciate any help with my problem. If you could spare some time
> to read this it would be great. I have several questions. Initialization worked
> fine I think (I get ACK packets), but when I try to finally send IN packet to
> endpoint 0x81 I get NAK packets all the time!
>      I checked code in microcontroller several times and, of course, maybe error
> could be somewhere in initialization, but would that block my IN packets to
> device? I know that PIC32 cannot work in high-speed mode, only  in full-speed,
> but in the datasheet for this dongle it says it can work in full-speed. So I
> want to know does USB card set its speed to full-speed automatically?
>      I think my understanding of driver code is good so you can give me some
> general guidelines regarding initialization if you don't want to go to
> details.Thank you in advance.

Contacting me is OK, but all communication should also be Cc'd to the 
linux-wireless mailing list.

Could you please give me some more details? Is this setup as an ad-hoc wireless 
connection? I know that rtl8187 does not work in AP mode, but I'm not sure about 
ad-hoc mode, and I am unable to test that at the moment.

Which device are you using - RTL8187L, or RTL8187B? The USB ID should tell that.

Yes, the device will work with USB1.1 hardware, and it might even work with 
USB1.0, but I have never tested that.

Larry












^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question regarding Linux RTL driver
       [not found]           ` <CAOVbLLHirAKiDehW=79dv1ku1pB0JdpA9SfFkLTcLk5NZctX7A@mail.gmail.com>
@ 2012-01-26 22:51             ` Nikola Gacic
  2012-01-26 23:29             ` Larry Finger
  1 sibling, 0 replies; 4+ messages in thread
From: Nikola Gacic @ 2012-01-26 22:51 UTC (permalink / raw)
  To: Larry Finger; +Cc: wireless

OK, thank you for your answer. Sorry for reporting this late. I will
send mails to mailing list too.

I don't know which device is RTL8187L but this device definitely isn't
RTL8187B because it doesn't use RTL8187B routines and field
rtl8187_priv.is_rtl8187b is FALSE.

I am using MANAGED  BSS STATION  interface  for device, but I also
tried MONITOR interface to try to capture beacons from AP on any
channel. It was the same, I can't read anything from 0x81 endpoint
because I am always getting NAK packets.

If I am not mistaken endpoint 2 is used for sending and 0x81 for
receiving, but enumeration shows there is endpoint 3 also. Do you
remember what is it used for?

I again inspected rtl8187_start() routine and I am now inspecting
rtl8187_probe() again but it is much bigger and I will need more time.
Is the rtl8187_probe() crucial for initializing device or just for
getting device information and allocating resources? I mean, will some
false bits when writing to endpoint 0 cause the device to stop
responding in this routine?

Thanks,
Nikola

On Thu, Jan 26, 2012 at 7:49 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
>
> On 01/26/2012 11:37 AM, Nikola Gacic wrote:
>>
>> Hello Mr. Finger,
>>
>>     I don't know if this is the right way for contacting you but I couldn't
>> find the other way.
>>     Firstly, I want to say that I am student at School of electrical
>> Engineering in Belgrade and I am working on some embedded project where I tried
>> to use you RTL8187 Linux driver to communicate with PIC32 microcontroller over USB.
>>     I would appreciate any help with my problem. If you could spare some time
>> to read this it would be great. I have several questions. Initialization worked
>> fine I think (I get ACK packets), but when I try to finally send IN packet to
>> endpoint 0x81 I get NAK packets all the time!
>>     I checked code in microcontroller several times and, of course, maybe error
>> could be somewhere in initialization, but would that block my IN packets to
>> device? I know that PIC32 cannot work in high-speed mode, only  in full-speed,
>> but in the datasheet for this dongle it says it can work in full-speed. So I
>> want to know does USB card set its speed to full-speed automatically?
>>     I think my understanding of driver code is good so you can give me some
>> general guidelines regarding initialization if you don't want to go to
>> details.Thank you in advance.
>
>
> Contacting me is OK, but all communication should also be Cc'd to the linux-wireless mailing list.
>
> Could you please give me some more details? Is this setup as an ad-hoc wireless connection? I know that rtl8187 does not work in AP mode, but I'm not sure about ad-hoc mode, and I am unable to test that at the moment.
>
> Which device are you using - RTL8187L, or RTL8187B? The USB ID should tell that.
>
> Yes, the device will work with USB1.1 hardware, and it might even work with USB1.0, but I have never tested that.
>
> Larry
>
>
>
>
>
>
>
>
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question regarding Linux RTL driver
       [not found]           ` <CAOVbLLHirAKiDehW=79dv1ku1pB0JdpA9SfFkLTcLk5NZctX7A@mail.gmail.com>
  2012-01-26 22:51             ` Nikola Gacic
@ 2012-01-26 23:29             ` Larry Finger
  2012-01-26 23:58               ` Nikola Gacic
  1 sibling, 1 reply; 4+ messages in thread
From: Larry Finger @ 2012-01-26 23:29 UTC (permalink / raw)
  To: Nikola Gacic; +Cc: wireless

On 01/26/2012 04:44 PM, Nikola Gacic wrote:
> I don't know which device is RTL8187L but this device definitely isn't RTL8187B
> because it doesn't use RTL8187B routines and field rtl8187_priv.is_rtl8187b is
> FALSE.

If you only have the 3 endpoints, then it is an RTL8187L.

> I am using MANAGED  BSS STATION  interface  for device, but I also tried MONITOR
> interface to try to capture beacons from AP on any channel. It was the same, I
> can't read anything from 0x81 endpoint because I am always getting NAK packets.
>
> If I am not mistaken endpoint 2 is used for sending and 0x81 for receiving, but
> enumeration shows there is endpoint 3 also. Do you remember what is it used for?

No, we do not use it, and you are correct in that the endpoint with the address 
0x81 is used for input, and the one for address 0x02 for output.

> I again inspected rtl8187_start() routine and I am now inspecting
> rtl8187_probe() again but it is much bigger and I will need more time. Is the
> rtl8187_probe() crucial for initializing device or just for getting device
> information and allocating resources? I mean, will some false bits when writing
> to endpoint 0 cause the device to stop responding in this routine?

The devices are very sensitive to the initialization. A mistake there could 
completely lock the device. I have never tried to use raw in/out on any of these 
devices. If I were to do what you are trying, I would use the ioctl's that are 
used by aircrack to inject packets. Those should setup the receiver correctly. 
In particular, the RX descriptor would be critical.

Have you been using usbmon to look at the traffic between the CPU and the device?

Larry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question regarding Linux RTL driver
  2012-01-26 23:29             ` Larry Finger
@ 2012-01-26 23:58               ` Nikola Gacic
  0 siblings, 0 replies; 4+ messages in thread
From: Nikola Gacic @ 2012-01-26 23:58 UTC (permalink / raw)
  To: Larry Finger; +Cc: wireless

I put some printk() functions in driver functions to print arguments
in log and then I used these same arguments in my code for firmware in
microcontroller.

Good idea with aircrack and injecting raw packets. I will check this right now.

Nikola

On Fri, Jan 27, 2012 at 12:29 AM, Larry Finger
<Larry.Finger@lwfinger.net> wrote:
> On 01/26/2012 04:44 PM, Nikola Gacic wrote:
>>
>> I don't know which device is RTL8187L but this device definitely isn't
>> RTL8187B
>> because it doesn't use RTL8187B routines and field
>> rtl8187_priv.is_rtl8187b is
>> FALSE.
>
>
> If you only have the 3 endpoints, then it is an RTL8187L.
>
>> I am using MANAGED  BSS STATION  interface  for device, but I also tried
>> MONITOR
>> interface to try to capture beacons from AP on any channel. It was the
>> same, I
>> can't read anything from 0x81 endpoint because I am always getting NAK
>> packets.
>>
>> If I am not mistaken endpoint 2 is used for sending and 0x81 for
>> receiving, but
>> enumeration shows there is endpoint 3 also. Do you remember what is it
>> used for?
>
>
> No, we do not use it, and you are correct in that the endpoint with the
> address 0x81 is used for input, and the one for address 0x02 for output.
>
>> I again inspected rtl8187_start() routine and I am now inspecting
>> rtl8187_probe() again but it is much bigger and I will need more time. Is
>> the
>> rtl8187_probe() crucial for initializing device or just for getting device
>> information and allocating resources? I mean, will some false bits when
>> writing
>> to endpoint 0 cause the device to stop responding in this routine?
>
>
> The devices are very sensitive to the initialization. A mistake there could
> completely lock the device. I have never tried to use raw in/out on any of
> these devices. If I were to do what you are trying, I would use the ioctl's
> that are used by aircrack to inject packets. Those should setup the receiver
> correctly. In particular, the RX descriptor would be critical.
>
> Have you been using usbmon to look at the traffic between the CPU and the
> device?
>
> Larry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-26 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAOVbLLHPdC3XkuTs6OapNMFkSbWaRq54D5U3RDY=N4ugZfEKKQ@mail.gmail.com>
     [not found] ` <CAOVbLLHK=3K5KfYs7V+9PyE2joWTewuXvpS7RzU63GJS0C2=ug@mail.gmail.com>
     [not found]   ` <CAOVbLLH_RXSzXeQ-g7--6QrUBGD63o-9-7a7NjKc=LM8UL2+GA@mail.gmail.com>
     [not found]     ` <CAOVbLLEzuyBkQv0a238SfDrNXi3hf72Kzyjv8L=m9hokhGjx5A@mail.gmail.com>
     [not found]       ` <CAOVbLLFcja-DV1bEq9C2U8q5eohc7O0AE=oymfjMMBOBi4D52g@mail.gmail.com>
2012-01-26 18:49         ` Question regarding Linux RTL driver Larry Finger
     [not found]           ` <CAOVbLLHirAKiDehW=79dv1ku1pB0JdpA9SfFkLTcLk5NZctX7A@mail.gmail.com>
2012-01-26 22:51             ` Nikola Gacic
2012-01-26 23:29             ` Larry Finger
2012-01-26 23:58               ` Nikola Gacic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).