Nick Fedchik | 1 Feb 12:08 2006
Picon

Re: STLabs (SigmaTel) 4220 module

В сообщении от Tuesday 31 January 2006 21:07 Samuel Ortiz написал(a):
> > Above is about the SigmaTel 4220.
> It seems to be a 4210 in fact.
Yep, tnx!

> > Can anybody told me the reason of "int=00 Assertion failed!"
> Because the dongle reports an output bulk transfer size of 512 bytes,
> while it can't be larger than 64 bytes according to the spec.

> The driver should fetch the firmware from userspace and push it to the
> chip. Look at how the Sigmatel driver does that.
Each time when the driver (kernel module) should be loaded?

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
Nick Fedchik | 1 Feb 12:59 2006
Picon

Re: STLabs (SigmaTel) 4220 module

> > > Above is about the SigmaTel 4220.
> > It seems to be a 4210 in fact.
> Yep, tnx!
Actually NOT a fact than it 4210, because this is a module output.
stir4210.c:
/* These are the currently known IrDA USB dongles. Add new dongles here */
static struct usb_device_id dongles[] = {
  /* SigmaTel 4210 device */
 { USB_DEVICE(0x66f, 0x4210), .driver_info = SIGMATEL_4210 | IUC_SPEED_BUG },
 { }, /* The end */
};
...
IRDA_MESSAGE("IRDA-USB found at address %d, Vendor: %x, Product: %x\n",
             dev->devnum, le16_to_cpu(dev->descriptor.idVendor),
             le16_to_cpu(dev->descriptor.idProduct));

At this moment I don't know how to differ STIR4210/4220/4116 if they all have 
same identifier. 

"The STIR4210 supports data rates up to 4 Mbits per second (FIR) and the 
STIR4220 supports data rates up to 16 Mbits per second (VFIR) including FIR, 
MIR, and SIR. STIR4116 provides SIR with rates up to 115 Kbits per second. 
The STIR4210 and STIR4220 devices support all of the lower data rates defined 
by the IrDA specification (SIR and MIR)."

I see only oone way is to check max speed to determine the Bridge Controller 
type.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
(Continue reading)

Thomas Ilnseher | 1 Feb 13:09 2006
Picon
Picon

Re: STLabs (SigmaTel) 4220 module

Nick Fedchik schrieb:

>В сообщении от Tuesday 31 January 2006 21:07 Samuel Ortiz написал(a):
>  
>
>>>Above is about the SigmaTel 4220.
>>>      
>>>
>>It seems to be a 4210 in fact.
>>    
>>
>Yep, tnx!
>
>  
>
>>>Can anybody told me the reason of "int=00 Assertion failed!"
>>>      
>>>
>>Because the dongle reports an output bulk transfer size of 512 bytes,
>>while it can't be larger than 64 bytes according to the spec.
>>    
>>
>
>  
>
>>The driver should fetch the firmware from userspace and push it to the
>>chip. Look at how the Sigmatel driver does that.
>>    
>>
>Each time when the driver (kernel module) should be loaded?
(Continue reading)

Samuel Ortiz | 1 Feb 14:57 2006

Re: STLabs (SigmaTel) 4220 module

Thomas Ilnseher wrote :
> Nick Fedchik schrieb:

> yes, the original (2.4) source avail at www.sigmatel.com  contained a
> driver and a userspace app.
> steps:
>
> a) insmod driver
> b) start userspace app to upload the firmware-patch using the driver
> c) use driver (eg. irattach)
>
>
> i think it should be fairly easy to write an hotplug script.
I think we can use the firmware hotplug kernel code, in which case we can
use the standard firmware hotplug scripts.

Cheers,
Samuel.

>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files
>>for problems?  Stop!  Download the new AJAX search engine that makes
>>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>>http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642
>>_______________________________________________
>>irda-users mailing list
>>irda-users@...
>>http://lists.sourceforge.net/lists/listinfo/irda-users
(Continue reading)

Nick Fedchik | 2 Feb 12:46 2006
Picon

Re: About stir4210.c and SigmaTel 4220 support

В сообщении от Thursday 02 February 2006 12:26 Вы написали:
> Yes. They are VERY different. 4210 is "almost" usb-irda compatible.
> Whereas 4200 is not usb-irda compatible at all.
Well now I insert stir4210.c to my kernel sources (2.6.15.1).
A few modifications for now:
1) stir4210-ioctl.h inserted to stir4210.h
2) SigmaTel 4220 dongle added
/* These are the currently known IrDA USB dongles. Add new dongles here */
static struct usb_device_id dongles[] = {
        /* SigmaTel 4210 device */
 { USB_DEVICE(0x66f, 0x4210), .driver_info = SIGMATEL_4210 | IUC_SPEED_BUG },
 { USB_DEVICE(0x66f, 0x4220), .driver_info = SIGMATEL_4210 | IUC_SPEED_BUG },
 { }, /* The end */
};

3)/etc/hotplug/usb.distmap:
stir4200             0x0003 0x066f   0x4200    ...
stir4210             0x0003 0x066f   0x4210    ...
stir4220             0x0003 0x066f   0x4220    ...

When I plug in my U-290 (4220 based), kernel says:
usb 1-4: new high speed USB device using ehci_hcd and address 4
IRDA-USB found at address 4, Vendor: 66f, Product: 4210
irda_usb_parse_endpoints(): our endpoints are: in=02, out=01 (512), int=00
Assertion failed! drivers/net/irda/irda-usb.c:irda_usb_parse_endpoints:1247 
self->bulk_out_mtu == 64
irda_usb_init_qos(), dongle says speed=0x37F, size=0x20, window=0x8, 
bofs=0x80, turn=0x4
IrDA: Registered device irda0

(Continue reading)

Guennadi Liakhovetski | 2 Feb 12:52 2006
Picon

Re: About stir4210.c and SigmaTel 4220 support

On Thu, 2 Feb 2006, Nick Fedchik wrote:

> When I plug in my U-290 (4220 based), kernel says:
> usb 1-4: new high speed USB device using ehci_hcd and address 4
> IRDA-USB found at address 4, Vendor: 66f, Product: 4210

 						     ^^^^

Why do you think it's a 4220? The above says 4210.

> irda_usb_parse_endpoints(): our endpoints are: in=02, out=01 (512), int=00
> Assertion failed! drivers/net/irda/irda-usb.c:irda_usb_parse_endpoints:1247
> self->bulk_out_mtu == 64
> irda_usb_init_qos(), dongle says speed=0x37F, size=0x20, window=0x8,
> bofs=0x80, turn=0x4
> IrDA: Registered device irda0
>
> And module stir4210 doesn't loaded
> [root <at> titan hotplug]# lsmod | grep ir
> irda_usb               14980  0
> irda                  167740  1 irda_usb
> crc_ccitt               3072  1 irda
> usbcore               107780  5 hci_usb,irda_usb,uhci_hcd,ehci_hcd
>
> Don't know where the hooks inside of irda-usb module to bind my stir4210
> module, because of my hack stir42xx (based on stir4200) has been loaded when
> I plugged dongle to USB socket...

You don't need irda-usb. stir4210 is standalone, in fact, it is just a 
modified version of irda-usb. So, irda-usb should not bind to your device 
(Continue reading)

Nick Fedchik | 2 Feb 13:16 2006
Picon

Re: Re: About stir4210.c and SigmaTel 4220 support

В сообщении от Thursday 02 February 2006 13:52 Guennadi Liakhovetski 
написал(a):
> > IRDA-USB found at address 4, Vendor: 66f, Product: 4210
>  						     ^^^^
> Why do you think it's a 4220? The above says 4210.
Because the dongle has a label about SigmaTel 4220
See also http://www.st-lab.com/u290.htm
So I just guess than SigmaTel 4210/4220/4116 USB 2.0 Hi-Speed IrDA Bridge 
Controller identified only as 4210. For example:
# lsusb
Bus 001 Device 006: ID 066f:4210 SigmaTel, Inc.

http://www.sigmatel.com/products/portable/wireless/stir4210.asp

> > Don't know where the hooks inside of irda-usb module to bind my stir4210
> > module, because of my hack stir42xx (based on stir4200) has been loaded
> > when I plugged dongle to USB socket...
> You don't need irda-usb. stir4210 is standalone, in fact, it is just a
> modified version of irda-usb. So, irda-usb should not bind to your device
> at all. 
> Have you added 4210 to its USB Product-ID list? If so - remove it.
You mean the /usr/share/usb.ids file as the USB Product-ID list?

Also I remove the urda-usb module from memory, then insert stir4210 module and 
plug in the dongle. 
# rmmod irda-usb
# lsmod | grep stir
stir4210               17796  0
irda                  167740  1 stir4210
usbcore               107780  5 stir4210,hci_usb,uhci_hcd,ehci_hcd
(Continue reading)

Nick Fedchik | 2 Feb 17:41 2006
Picon

Re: Re: About stir4210.c (SigmaTel 4210/4220 /4116)

В сообщении от Thursday 02 February 2006 13:52 Guennadi Liakhovetski 
написал(a):

> You don't need irda-usb. stir4210 is standalone, in fact, it is just a
> modified version of irda-usb. So, irda-usb should not bind to your device
> at all. 
Well, one time today I got success with my dongle, even I upload image from my 
Siemens S55 to host... unfortunately can't reproduce it again.
What I've for now: easily modified module stir4210.ko integrated to my 2.6.15 
kernel. Dongle unplugged.
#rmmod irda_usb stir4210 
#lsmod
irda                  167740  0
usbcore               107780  4 hci_usb,uhci_hcd,ehci_hcd
#insmod stir4210
#dmesg
+++
usbcore: registered new driver stir4210
USB IrDA support registered
# ip link show irda0
Device "irda0" does not exist.
[now I plugin dongle]
# lsmod|grep stir
stir4210               19844  0
irda                  167740  2 irda_usb,stir4210
usbcore               107780  6 irda_usb,stir4210,hci_usb,uhci_hcd,ehci_hcd
# ip link show irda0
10: irda0: <NOARP> mtu 2048 qdisc noop qlen 8
    link/irda
# dmesg
(Continue reading)

Thomas Ilnseher | 2 Feb 19:47 2006
Picon
Picon

Re: Re: About stir4210.c (SigmaTel 4210/4220 /4116)

Nick Fedchik schrieb:

>В сообщении от Thursday 02 February 2006 13:52 Guennadi Liakhovetski 
>написал(a):
>
>  
>
>>You don't need irda-usb. stir4210 is standalone, in fact, it is just a
>>modified version of irda-usb. So, irda-usb should not bind to your device
>>at all. 
>>    
>>
>Well, one time today I got success with my dongle, even I upload image from my 
>Siemens S55 to host... unfortunately can't reproduce it again.
>What I've for now: easily modified module stir4210.ko integrated to my 2.6.15 
>kernel. Dongle unplugged.
>#rmmod irda_usb stir4210 
>#lsmod
>irda                  167740  0
>usbcore               107780  4 hci_usb,uhci_hcd,ehci_hcd
>#insmod stir4210
>#dmesg
>+++
>usbcore: registered new driver stir4210
>USB IrDA support registered
># ip link show irda0
>Device "irda0" does not exist.
>[now I plugin dongle]
># lsmod|grep stir
>stir4210               19844  0
(Continue reading)

Nick Fedchik | 3 Feb 10:32 2006
Picon

Re: Re: About stir4210.c (SigmaTel 4210/4220 /4116)

В сообщении от Thursday 02 February 2006 20:47 Thomas Ilnseher написал(a):
> >any hints?
>
> dumb question:
> did you run irattach ?
I think it's need no.
Weirdly - today I easily establish connection to my Siemens S55 via U-290 
(stir4210 module).

Here the sequence below:
(For begin I unplug the dongle, than plugin it again)
[root <at> titan tools]# ip link show irda0
Device "irda0" does not exist.
[root <at> titan tools]# dmesg | tail
usb 1-4: USB disconnect, address 4
irda_usb_receive(), RX status -108,transfer_flags 0x0000
irda_usb_submit(), Failed to submit Rx URB -19
irda_usb_disconnect(), USB IrDA Disconnected
usb 1-4: new high speed USB device using ehci_hcd and address 5
IRDA-USB found at address 5, Vendor: 66f, Product: 4210
irda_usb_parse_endpoints(), And our endpoints are : in=02, out=01 (512), 
int=00
Assertion failed! drivers/net/irda/stir4210.c:irda_usb_parse_endpoints:1694 
self->bulk_out_mtu == 64
irda_usb_init_qos(), dongle says speed=0x2, size=0x20, window=0x8, bofs=0x80, 
turn=0x4
IrDA: Registered device irda0
[root <at> titan tools]# ip link show irda0
5: irda0: <NOARP> mtu 2048 qdisc noop qlen 8
    link/irda
(Continue reading)


Gmane