Jivin Sima Baymani lays it down ...
> Hi all,
> I've been lurking a bit on this list since I got a uClinux project in my lap 
> this summer. I've fiddled a bit with Linux, but this is my first uClinux 
> project and I've not worked this deep with linux drivers before even though 
> I'm familiar with working low level. 
> And now to the question! I know this is ancient 2.4, but this is what I have 
> to work with. I don't expect answers but am grateful for any advice or 
> thoughts you might have.
> 
> Platform: ARM7 from Nuvoton, more precisely called NUC745.
> uClinux version: 2.4.20
> The product is a webcam with ethernet and wifi, a clone of one of the FOSCAM 
> cameras, produced by Apexis. I need to do a lot of changes in the software 
> and the programs on it. They will not share their source code even though I 
> _know_ they have used uClinux and other open source software under GPL. I got 
> the uClinux-source from a BSP somewhere else. The BSP source runs fine with 
> ethernet working. My problem is that I need wifi to work as well. The driver 
> I have is the RT73 driver from Ralink. Apexis use the same driver but I don't 
> know how much they had to change it to work.
> 
> I have managed to add the driver to the kernel build and it seems to be 
> loaded (full logs at end of email):
> usb.c: registered new driver hub                                              
>                                                    
> add a static ohci host controller device                                      
>                                                    
> : USB OHCI at membase 0xfff05000, IRQ 15                                      
>                                                    
> hc_alloc_ohci                                                                 
>                                                    
> usb-ohci.c: AMD756 erratum 4 workaround                                       
>                                                    
> hc_reset                                                                      
>                                                    
> usb.c: new USB bus registered, assigned bus number 1                          
>                                                    
> Product: USB OHCI Root Hub                                                    
>                                                    
> SerialNumber: fff05000                                                        
>                                                    
> hub.c: USB hub found                                                          
>                                                    
> hub.c: 2 ports detected                                                       
>                                                    
> -RT73-<7>usb_rtusb_init--> //usb_rtusb_init is the module_init function 
> though this is a compiled in driver                                           
>       
> SIMA in da house!                                                             
>                                                    
> usb.c: registered new driver rt73                                             
>                                                    

This only tells you the driver was registered.  There doesn't seem to be any
device detected that matches the rt73 driver.


> SIMA - Registered RT73 driver!                                                
>                                                    
> Usb device driver by ns24 zswan designed successfully!                        
>                                                    
> Initializing USB Mass Storage driver...                                       
>                                                    
> usb.c: registered new driver usb-storage                                      
>                                                    
> USB Mass Storage support registered.   
> 
> But when I get to the prompt neither ifconfig nor iwconfig list any wireless 
> interfaces. If I compare to the original boot log, it looks like hub.c does a 
> bit of probing that my log doesn't have:
> 
> hub.c: connect-debounce failed, port 1 disabled
> new USB device :80fc8004-fed640
> hub.c: new USB device 1, assigned address 2
> probing sonix288 usb camera ...
> dvm camera registered as video0
> new USB device :80fc8604-fed640
> hub.c: new USB device 2, assigned address 3
> idVendor = 0x148f, idProduct = 0x2573 
> 
> trying to set up the wireless interfaces gives me this:
> /> ifconfig rausb0 inet 192.168.5.135 up                                      
>                                                    

How long after boot ?  Sometimes it takes a while for the usb devices to
appear,  but if you waited at least 15-20 seconds,  it isn't going to
show :-)

You need to get lsusb or look at the appropriate /proc files and see if
the wireless USB is actually appearing.


Cheers,
Davidm




> SIOCSIFADDR: No such device                                                   
>                                                    
> SIOCGIFFLAGS: No such device 
> 
> 
> So, it seems the driver is loaded but not started. I have double checked the 
> vend/prod id (0x148f/0x2573), and they seem to be right and in the source 
> code devices list. My first questions:
> - How can I start the driver? Is there a common practice/standard/usual way 
> of doing that? I'm totally in the dark about this =/
> 
> 
> The second question:
> Since this has been such a hassle for me, I'm thinking of switching to a 2.6 
> kernel. The driver has a version for that kernel as well and it might work 
> better there.
> But doing a simple find on "nuvoton" and "nuc" in my source code shows me 
> there are some drivers they have added to the build:
> vad...@ubuntu:~/nuc700_restart/uClinux-dist$ find . -iname *nuc*.c
> ./linux-2.4.x/drivers/mtd/nand/nuc700_128mb_nand.c
> ./linux-2.4.x/drivers/mtd/nand/nuc700_32mb_nand.c
> ./linux-2.4.x/drivers/mtd/maps/nuc700_map.c
> ./linux-2.4.x/drivers/scsi/nuc700_sd.c
> ./linux-2.4.x/drivers/video/nuc700_osd.c
> ./linux-2.4.x/drivers/video/nuc700fb.c
> ./linux-2.4.x/drivers/net/nuc740_mac.c
> ./linux-2.4.x/drivers/net/nuc700_mac.c
> ./linux-2.4.x/drivers/sound/nuc700_ac97.c
> ./linux-2.4.x/drivers/sound/nuc700_i2s.c
> ./linux-2.4.x/drivers/sound/nuc700_audio.c
> ./linux-2.4.x/drivers/usb/usbd/nuc700_vcom.c
> ./linux-2.4.x/drivers/usb/usbd/nuc700_mass.c
> ./linux-2.4.x/drivers/char/nuc700_ps2.c
> ./linux-2.4.x/drivers/char/nuc700_uart0.c
> ./linux-2.4.x/drivers/char/nuc700_uart1.c
> ./linux-2.4.x/drivers/char/nuc700_keymap.c
> ./linux-2.4.x/drivers/char/nuc740_uart.c
> ./linux-2.4.x/drivers/char/nuc700_i2c.c
> ./linux-2.4.x/drivers/char/nuc700_rtc.c
> ./linux-2.4.x/drivers/char/nuc700_keypad.c
> ./linux-2.4.x/drivers/char/nuc700_uart3.c
> ./linux-2.4.x/drivers/char/nuc700_sc.c
> ./linux-2.4.x/drivers/char/nuc700_spi.c
> ./linux-2.4.x/drivers/char/nuc700_uart2.c
> 
> I've read up a bit and it seems most people advice against porting from 2.4 
> to 2.6. I understand that for more complex devices like ethernet devices, the 
> changes between 2.4 and 2.6 are too big. But does anyone know if the changes 
> for i2c/uart/spi were simpler? I'm hoping to simply be able to move the 
> files, do some magic and hope to get it to work... right. Any thoughts?
> 
> Thanks for any advice on this!
> Below are full boot logs, first my boot log and then the original Apexis log.
> 
> -Sima
> 
> ------------------------- MY BOOT LOG-------------------------
> Linux version 2.4.20-uc0 (vad...@ubuntu) (gcc version 3.0) #73 Tue Sep 21 
> 16:46:52 CEST 2010                                     
> Processor: Nuvoton NUC745 revision 1                                          
>                                                    
> Architecture: NUC700                                                          
>                                                    
> On node 0 totalpages: 2048                                                    
>                                                    
> zone(0): 0 pages.                                                             
>                                                    
> zone(1): 2048 pages.                                                          
>                                                    
> zone(2): 0 pages.                                                             
>                                                    
> Kernel command line: root=/dev/nfs rw rootfstype=nfs 
> nfsroot=192.168.5.50:/srv/nfs/nuc700_fs ip=192.168.5.134:192.168.5.50:192.16
> 8.5.1:255.255.255.0:nuc700:eth0:off                                           
>                                                    
> Calibrating delay loop... 39.83 BogoMIPS                                      
>                                                    
> Memory: 8MB = 8MB total                                                       
>                                                    
> Memory: 6336KB available (1428K code, 231K data, 52K init)                    
>                                                    
> Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)                  
>                                                    
> Inode cache hash table entries: 512 (order: 0, 4096 bytes)                    
>                                                    
> Mount-cache hash table entries: 512 (order: 0, 4096 bytes)                    
>                                                    
> Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)                  
>                                                    
> Page-cache hash table entries: 2048 (order: 1, 8192 bytes)                    
>                                                    
> POSIX conformance testing by UNIFIX                                           
>                                                    
> Linux NET4.0 for Linux 2.4                                                    
>                                                    
> Based upon Swansea University Computer Society NET3.039                       
>                                                    
> Initializing RT netlink socket                                                
>                                                    
> Starting kswapd                                                               
>                                                    
> JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.                                
>                                                    
> Nuvoton NUC700 Serial driver version 1.0 (2005-08-15) with no serial options 
> enabled                                             
> ttyS00 at 0xfff80000 (irq = 9) is a NUC700                                    
>                                                    
> Nuvoton NUC7001 Serial driver version 1.0 (2005-08-15) with no serial options 
> enabled                                            
> ttyS00 at 0xfff80100 (irq = 10) is a NUC7001                                  
>                                                    
> Nuvoton NUC7002 Serial driver version 1.0 (2005-08-15) with no serial options 
> enabled                                            
> ttyS00 at 0xfff80200 (irq = 11) is a NUC7002                                  
>                                                    
> I2C Bus Driver has been installed successfully.                               
>                                                    
> Blkmem copyright 1998,1999 D. Jeff Dionne                                     
>                                                    
> Blkmem copyright 1998 Kenneth Albanowski                                      
>                                                    
> Blkmem 1 disk images:                                                         
>                                                    
> 0: 7F0E0000-7F1703FF [VIRTUAL 7F0E0000-7F1703FF] (RO)                         
>                                                    
> RAMDISK driver initialized: 16 RAM disks of 1024K size 1024 blocksize         
>                                                    
> loop: loaded (max 8 devices)                                                  
>                                                    
> SCSI subsystem driver Revision: 1.00                                          
>                                                    
> NUC700 Audio Driver v1.0 Initialization successfully.                         
>                                                    
> mtd flash device: Found 1 x16 devices at 0x0 in 16-bit bank                   
>                                                    
>  Amd/Fujitsu Extended Query Table at 0x0040                                   
>                                                    
> mtd flash device: Swapping erase regions for broken CFI table.                
>                                                    
> number of CFI chips: 1                                                        
>                                                    
> cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.      
>                                                    
> Creating 2 MTD partitions on "mtd flash device":                              
>                                                    
> 0x00000000-0x00300000 : "images 3M"                                           
>                                                    
> 0x00300000-0x00400000 : "user 1M"                                             
>                                                    
> usb.c: registered new driver hub                                              
>                                                    
> add a static ohci host controller device                                      
>                                                    
> : USB OHCI at membase 0xfff05000, IRQ 15                                      
>                                                    
> hc_alloc_ohci                                                                 
>                                                    
> usb-ohci.c: AMD756 erratum 4 workaround                                       
>                                                    
> hc_reset                                                                      
>                                                    
> usb.c: new USB bus registered, assigned bus number 1                          
>                                                    
> Product: USB OHCI Root Hub                                                    
>                                                    
> SerialNumber: fff05000                                                        
>                                                    
> hub.c: USB hub found                                                          
>                                                    
> hub.c: 2 ports detected                                                       
>                                                    
> -RT73-<7>usb_rtusb_init-->                                                    
>                                                    
> SIMA in da house!                                                             
>                                                    
> usb.c: registered new driver rt73                                             
>                                                    
> SIMA - Registered RT73 driver!                                                
>                                                    
> Usb device driver by ns24 zswan designed successfully!                        
>                                                    
> Initializing USB Mass Storage driver...                                       
>                                                    
> usb.c: registered new driver usb-storage                                      
>                                                    
> USB Mass Storage support registered.                                          
>                                                    
> NET4: Linux TCP/IP 1.0 for NET4.0                                             
>                                                    
> IP Protocols: ICMP, UDP, TCP                                                  
>                                                    
> IP: routing cache hash table of 512 buckets, 4Kbytes                          
>                                                    
> TCP: Hash tables configured (established 512 bind 1024)                       
>                                                    
>                                                                               
>                                                    
> Wait for auto-negotiation complete...OK                                       
>                                                    
> 100MB - FULL                                                                  
>                                                    
> IP-Config: Complete:                                                          
>                                                    
>       device=eth0, addr=192.168.5.134, mask=255.255.255.0, gw=192.168.5.1,    
>                                                    
>      host=nuc700, domain=, nis-domain=(none),                                 
>                                                    
>      bootserver=192.168.5.50, rootserver=192.168.5.50, rootpath=              
>                                                    
> Looking up port of RPC 100003/2 on 192.168.5.50                               
>                                                    
> Looking up port of RPC 100005/1 on 192.168.5.50                               
>                                                    
> VFS: Mounted root (nfs filesystem).                                           
>                                                    
> Freeing init memory: 52K                                                      
>                                                    
> Shell invoked to run file: /bin/init                                          
>                                                    
> Command: #!/bin/sh -t                                                         
>                                                    
> Command: #SIMA commented out                                                  
>                                                    
> Command: #/bin/ifconfig eth0 up                                               
>                                                    
> Command: mount -t proc none /proc                                             
>                                                    
> Command: mount -t ramfs none /tmp                                             
>                                                    
> new USB device :807ef804-7e68c0                                               
>                                                    
> hub.c: new USB device 1, assigned address 2                                   
>                                                    
> Manufacturer: Sonix Technology Co., Ltd.                                      
>                                                    
> Product: USB 2.0 Camera                                                       
>                                                    
> usb.c: USB device 2 (vend/prod 0xc45/0x62f1) is not claimed by any active 
> driver. 
> Command: #inetd&                                                              
>                                                    
> Command: #SIMA commented out                                                  
>                                                    
> Command: sh                                                                   
>                                                    
>                                                                               
>                                                    
> Sash command shell (version 1.1.1)                                            
>                                                    
> />
> 
> -------------------- APEXIS BOOT LOG------------------------------
> Linux version 2.4.20-uc0 (r...@maverick-linux) (gcc version 3.0) #1091 ?? 
> 12?? 10 09:18:28 CST 2009
> Processor: Winbond W90N745 revision 1
> Architecture: W90N745
> On node 0 totalpages: 4096
> zone(0): 0 pages.
> zone(1): 4096 pages.
> zone(2): 0 pages.
> Kernel command line: root=/dev/rom0 rw
> Calibrating delay loop... 39.83 BogoMIPS
> Memory: 16MB = 16MB total
> Memory: 14344KB available (1469K code, 287K data, 40K init)
> Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
> Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
> Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
> Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
> POSIX conformance testing by UNIFIX
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> Starting kswapd
> PTZ Driver has been installed successfully.
> Winbond W90N745 Serial driver version 1.0 (2005-08-15) with no serial options 
> enabled
> ttyS00 at 0xfff80000 (irq = 9) is a W90N745
> Winbond W90N7451 Serial driver version 1.0 (2005-08-15) with no serial 
> options enabled
> ttyS00 at 0xfff80100 (irq = 10) is a W90N7451
> I2C Bus Driver has been installed successfully.
> Blkmem copyright 1998,1999 D. Jeff Dionne
> Blkmem copyright 1998 Kenneth Albanowski
> Blkmem 1 disk images:
> 0: 7F0E0000-7F1853FF [VIRTUAL 7F0E0000-7F1853FF] (RO)
> W19B320BTT Flash Detected
> 01 eth0 initial ok!
> which:0
> PPP generic driver version 2.4.2
> Linux video capture interface: v1.00
> Winbond Audio Driver v1.0 Initialization successfully.
> usb.c: registered new driver hub
> add a static ohci host controller device
> : USB OHCI at membase 0xfff05000, IRQ 15
> hc_alloc_ohci
> usb-ohci.c: AMD756 erratum 4 workaround
> hc_reset
> usb.c: new USB bus registered, assigned bus number 1
> hub.c: USB hub found
> hub.c: 2 ports detected
> usb.c: registered new driver audio
> audio.c: v1.0.0:USB Audio Class driver
> usb.c: registered new driver serial
> usbserial.c: USB Serial Driver core v1.4
> 
>  _____     ____    _    ____
> |__  /   _|  _ \  / \  / ___|
>   / / | | | | | |/ _ \ \___ \
>  / /| |_| | |_| / ___ \ ___) |
> /____\__, |____/_/   \_\____/
>      |___/
> ZD1211B - version 2.24.0.0
> usb.c: registered new driver zd1211b
> main_usb.c: VIA Networking Wireless LAN USB Driver 1.20.04
> usb.c: registered new driver vntwusb
> usb.c: registered new driver rt73
> dvm usb cam driver 0.0.0.0 by Maverick Gao in 2006-8-12
> usb.c: registered new driver dvm
> dvm usb cam driver 0.1 for sonix288 by Maverick Gao in 2009-4-20
> usb.c: registered new driver dvm usb cam driver for sonix288
> NET4: Linux TCP/IP 1.0 for NET4.0
> IP Protocols: ICMP, UDP, TCP
> IP: routing cache hash table of 512 buckets, 4Kbytes
> TCP: Hash tables configured (established 1024 bind 2048)
> VFS: Mounted root (romfs filesystem) readonly.
> Freeing init memory: 40K
> BINFMT_FLAT: bad magic/rev (0x6e74202d, need 0x4)
> BINFMT_FLAT: bad magic/rev (0x6e74202d, need 0x4)
> Shell invoked to run file: /bin/init
> Command: 
> Command: mount -t proc none /proc
> Command: mount -t ramfs none /usr
> Command: mount -t ramfs none /swap
> Command: mount -t ramfs none /var/run
> Command: mount -t ramfs none /etc
> Command: mount -t ramfs none /flash
> Command: mount -t ramfs none /home
> Command: mount -t ramfs none /tmp
> Command: 
> Command: camera&
> no support
> [8]
> Command: 
> Command: #need to wait for connection to get up before we try downloading
> Command: sleep 40
> hub.c: connect-debounce failed, port 1 disabled
> new USB device :80fc8004-fed640
> hub.c: new USB device 1, assigned address 2
> probing sonix288 usb camera ...
> dvm camera registered as video0
> new USB device :80fc8604-fed640
> hub.c: new USB device 2, assigned address 3
> idVendor = 0x148f, idProduct = 0x2573 
> aw version is 0.22.2.14
> aw version is 20.8.2.26
> 
> Wait for auto-negotiation complete...OK
> 100MB - FULL
> video0 opened
> 1
> 1
> 1
> 1
> 1
> 1
> unknown command
> __pthread_initial_thread_bos:35c000
> manage pid:15
> 2
> 2
> 2
> 2
> 2
> 2
> audio_dev.state not AU_STATE_RECORDING
> wb_audio_start_record
> inet_sr.c INET_rinput 321
> action===1
> options==33
> inet_sr.c INET_setroute 75
> *args===255.255.255.255
> *args===netmask
> *args===eth0
> [27]
> 
> 

> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev


-- 
David McCullough,      david_mccullo...@mcafee.com,  Ph:+61 734352815
McAfee - SnapGear      http://www.mcafee.com         http://www.uCdot.org
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to