This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Trouble with USB WLAN driver on IPNC DM368

 

Dear experts,

I'm trying to install usb wlan driver for IPNC DM368 (APPRO/Montavista 5.0 kernel 2.6.18).

I followed this article : http://processors.wiki.ti.com/index.php/Davinci_USB_WLan

I compiled without error and loaded rt73.ko on IPNC, but IPNC didn't recognize usb wifi.

  • Config kernel

==============================

#make menuconfig

Device Drivers -> Generic Device Options -> Userspace firmware loading support <*>

Device Drivers -> Networking device support -> Wireless Lan (non-hamradio) ->  Wireless LAN drivers (non-hamradio) & Wireless Extensions [*]

Networking -> Enable Generic 802.11 and Enable WEP/Other Schemes you might need.

==============================

 

  • This is build result (driver):

==============================

 make[1]: Entering directory `/home/vvtoan/IPNC_DM36x/ipnc25/ti-davinci'

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_main.o

/home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_main.c:112: warning: ‘rt73_suspend’ declared ‘static’ but never defined

/home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_main.c:113: warning: ‘rt73_resume’ declared ‘static’ but never defined

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/mlme.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/connect.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtusb_bulk.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtusb_io.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/sync.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/assoc.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/auth.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/auth_rsp.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtusb_data.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_init.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/sanity.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_wep.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_info.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rtmp_tkip.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/wpa.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/md5.o

  CC [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rt2x00debug.o

  LD [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rt73.o

  Building modules, stage 2.

  MODPOST

  CC      /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rt73.mod.o

  LD [M]  /home/vvtoan/IPNC_DM36x/ipnc25/rt73-cvs-2009041204/Module/rt73.ko

make[1]: Leaving directory `/home/vvtoan/IPNC_DM36x/ipnc25/ti-davinci'

*** Module rt73.ko built successfully

 ==============================

 

  • This is module loading result (after rebuild kernel and copy rt73.bin into /lib/firmware IPNC target folder)

==============================

 # insmod rt73.ko

rt73: init

usbcore: registered new driver rt73

 ==============================

 

  • Checking

==============================

 # ls /sys/class/firmware/

timeout

 

# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0E:0C:A0:24:AC

          inet addr:192.168.0.52  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:117 errors:0 dropped:0 overruns:0 frame:0

          TX packets:64 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:33554 (32.7 KiB)  TX bytes:14466 (14.1 KiB)

          Interrupt:52 Base address:0x7000

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:10 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:2395 (2.3 KiB)  TX bytes:2395 (2.3 KiB)

 ==============================

Is it firmware problem?  Can anybody help me?

Thanks in advance.

 

  • Do you see any error after connecting the wifi device to DM368 ? Please provide the output of

    1. cat /proc/driver/musb_hdrc

    2. enable debug messages $ echo D8 > /proc/driver/musb_hdrc and send us the log.

    Reagrds,

    Ajay

  •  

    Hi Ajay,

    Thank for you replying.

    After loading the module, I looked for directory /proc/driver/musb_hdrc. But it doesn't exist.

    Is there something wrong?

    This is IPNC kernel message:

    --------------------------------------------------------------------------------------------------------

    <6>davinci-mmc davinci-mmc.0: Supporting 4-bit mode

    <6>davinci-mmc davinci-mmc.0: Using DMA mode

    <6>usbcore: registered new driver usbfs

    <6>usbcore: registered new driver hub

    <6>musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0

    <6>musb_hdrc musb_hdrc: No DMA interrupt line

    <7>musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)

    <7>musb_hdrc: MHDRC RTL version 1.500

    <7>musb_hdrc: setup fifo_mode 2

    <7>musb_hdrc: 8/9 max ep, 3392/4096 memory

    <7>musb_hdrc: hw_ep 0shared, max 64

    <7>musb_hdrc: hw_ep 1tx, max 512

    <7>musb_hdrc: hw_ep 1rx, max 512

    <7>musb_hdrc: hw_ep 2tx, max 512

    <7>musb_hdrc: hw_ep 2rx, max 512

    <7>musb_hdrc: hw_ep 3tx, max 512

    <7>musb_hdrc: hw_ep 3rx, max 512

    <7>musb_hdrc: hw_ep 4shared, max 256

    <6>musb_hdrc: USB Peripheral mode controller at c38f8000 using DMA, IRQ 12

    <6>Loading iSCSI transport class v1.1-646.<5>iscsi: registered transport (tcp)

    <6> sbulla: unknown partition table

    <6>applying Intel LTX971 workaround..

    <6>g_file_storage gadget: File-backed Storage Gadget, version: 28 November 2005

    <6>g_file_storage gadget: Number of LUNs=1

    <6>g_file_storage gadget-lun0: ro=0, file: /dev/sbulla

    <4>system_server/519[CPU#0]: BUG in local_bh_enable at kernel/softirq.c:196

    <6>rt73: init

    <6>usbcore: registered new driver rt73

    --------------------------------------------------------------------------------------------------------

     2821.dmesg.txt

     

  • you need to enable "debug" at USB support -> Inventra -> Enable debug for proc entries.

    Regards,
    Ajay

  • Hi Ajay,

    There isn't any settings like that. 

    I followed your answers at USB mouse for DM6446. And I set the log level to 1.

    Please check the following logs:

    # cat /proc/driver/musb_hdrc

    Status: MHDRC, Mode=Peripheral (Power=f0, DevCtl=90)

    OTG state: b_idle; active

    Options: cppi-dma, peripheral, debug=1 [eps=5]

    Peripheral address: 01

    DaVinci: ctrl=00 stat=0 phy=21e0

            rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

    Gadget driver: g_file_storage

    ep0 (hw0): 1buf, csr 0000 maxp 0000

            (queue empty) 

    # insmod rt73.ko rt73: init

    usbcore: registered new driver rt73

    # cat /proc/driver/musb_hdrc

    Status: MHDRC, Mode=Peripheral (Power=f0, DevCtl=90)

    OTG state: b_idle; active

    Options: cppi-dma, peripheral, debug=1 [eps=5]

    Peripheral address: 01

    DaVinci: ctrl=00 stat=0 phy=21e0

            rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

    Gadget driver: g_file_storage

    ep0 (hw0): 1buf, csr 0000 maxp 0000

            (queue empty)

    #echo D8 > /proc/driver/musb_hdrc

    # cat /proc/driver/musb_hdrc

    Status: MHDRC, Mode=Peripheral (Power=f0, DevCtl=90)

    OTG state: b_idle; active

    Options: cppi-dma, peripheral, debug=8 [eps=5]

    Peripheral address: 01

    DaVinci: ctrl=00 stat=0 phy=21e0

            rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

    Gadget driver: g_file_storage

    ep0 (hw0): 1buf, csr 0000 maxp 0000

            (queue empty)

    Thanks.

  • DEVCTL is -0x90 showing the controller is in device mode (D7=1) so can you confirm if you are using mini-A plug or jumper as proper place (ID pin jumper grounded) to connect the device to DM368 ? please note that mini-A is different than mini-B.

    Regards,
    Ajay

  • Hi Ajay,

    I think I plugged jumper at proper place.

    I found that Mode=Peripheral is wrong and it should be Mode=Host .

    So, I change kernel setting at Device driver > USB support > [*]USB device filesystem and Device driver > USB support > Davinci 644x USB support > Driver Mode (USB Host)

    After I rebuild kernel ,restart IPNCamera, load rt73 module and plug USB wifi. I got the the following message logs:

     

    -------------------------------------------------------------------------------------------

    usb 1-1: new high speed USB device using musb_hdrc and address 2

    usb 1-1: Product: 802.11g WLAN Drive

    usb 1-1: Manufacturer: ASUS

    usb 1-1: configuration #1 chosen from 1 choice

    -------------------------------------------------------------------------------------------

     

     

    Other message logs:

    # ifconfig (before and after loading module & plug USB device --> same)

    eth0      Link encap:Ethernet  HWaddr 00:EE:EE:EE:EE:06

              inet addr:192.168.0.56  Bcast:192.168.0.255  Mask:255.255.255.0

              UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

              ..............

              Interrupt:52 Base address:0x7000

    lo        Link encap:Local Loopback

              inet addr:127.0.0.1  Mask:255.0.0.0

              UP LOOPBACK RUNNING  MTU:16436  Metric:1

              ...............

              RX bytes:2395 (2.3 KiB)  TX bytes:2395 (2.3 KiB)

     

    # cat /proc/driver/musb_hdrc (before)

     

    Status: MHDRC, Mode=Host (Power=e0, DevCtl=19)

    OTG state: a_wait_vrise; active

    Options: cppi-dma, host, debug=1 [eps=5]

    Root port status: 00000100

    DaVinci: ctrl=00 stat=1 phy=21e0

            rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

     

     

    # cat /proc/driver/musb_hdrc (after)

    Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)

    OTG state: a_host; active

    Options: cppi-dma, host, debug=1 [eps=5]

    Root port status: 00000503

    DaVinci: ctrl=00 stat=1 phy=21e0

            rndis=00000 auto=0000 intsrc=00000000 intmsk=01ff1e1f

    CPPI: txcr=1 txsrc=0 txena=f; rxcr=1 rxsrc=0 rxena=f

    # ls /dev/  (before)

    MAKEDEV         edma            mtd4ro          shm

    audio           fd              mtd5            snd

    bus             full            mtd5ro          sndstat

    cmem            i2c             mtdblock0       sound

    console         initctl         mtdblock1       stderr

    core            irqk            mtdblock2       stdin

    csl0            kmem            mtdblock3       stdout

    csl1            kmsg            mtdblock4       tts

    csl2            loop            mtdblock5       tty

    csl3            mem             net             urandom

    csl4            mixer           null            usbdev1.1_ep00

    csl5            mtd0            port            usbdev1.1_ep81

    csl6            mtd0ro          ppp             v4l

    csl7            mtd1            ptmx            vc

    csl8            mtd1ro          pts             vcc

    csl9            mtd2            random          video2

    dev_dma         mtd2ro          rd              video3

    dev_i2c         mtd3            rtc             watchdog

    dm365mmap       mtd3ro          rtc0            zero

    dsp             mtd4            sbulla

    #ls /dev  (after)

    MAKEDEV         fd              mtd5ro          sound

    audio           full            mtdblock0       stderr

    bus             i2c             mtdblock1       stdin

    cmem            initctl         mtdblock2       stdout

    console         irqk            mtdblock3       tts

    core            kmem            mtdblock4       tty

    csl0            kmsg            mtdblock5       urandom

    csl1            loop            net             usbdev1.1_ep00

    csl2            mem             null            usbdev1.1_ep81

    csl3            mixer           port            usbdev1.2_ep00

    csl4            mtd0            ppp             usbdev1.2_ep01

    csl5            mtd0ro          ptmx            usbdev1.2_ep81

    csl6            mtd1            pts             v4l

    csl7            mtd1ro          random          vc

    csl8            mtd2            rd              vcc

    csl9            mtd2ro          rtc             video2

    dev_dma         mtd3            rtc0            video3

    dev_i2c         mtd3ro          sbulla          watchdog

    dm365mmap       mtd4            shm             zero

    dsp             mtd4ro          snd

    edma            mtd5            sndstat

    I think that IPNC detected USB wifi. 

    Is there something wrong?

  • I also try to install Wlan USB WL 167g Asus driver into DM368 IPNC camera. I am using rt2570-cvs-2009041204. When I plug my device to camera I got message as below:

    usb 1-1: new high speed USB device using musb_hdrc and address 6

    usb 1-1: configuration #1 chosen from 1 choice

    rt2570: idVendor = 0xb05, idProduct = 0x1706

    rt2570: using permanent MAC addr

    rt2570: Active MAC addr: 00:17:31:eb:95:64.

     

    but I still can not see the wlan device in /dev and ifconfig didn't show any specific information for Wlan device.

    Please help me!

    thanks

     

  • These messages shows that device is detected successfully and also the control is given to WLAN driver. Now it's responsibility of WLAN driver and other componen if needed to create ifconfig node. Please check with WLAN manual/datasheet if you need to add some other driver?

    Regards,
    ajay

  • Thank for your replying. It helped me a lot.

    I changed to use driver rt2570 and it detected usb wifi successfully. 

    Now I can config new device (ifconfig, iwlist, iwconfig,...). It detected my Wireless Access Point  successfully but it could't connect to AP.

    ----------------------------------------------------------------

    ifconfig rausb0 up --> OK

    iwconfig rausb0 mode managed --> OK

    iwlist rausb0 scanning --> detected AP successfully

    iwconfig rausb0 essid "my_ap"  --> cannot connect to AP (ping failed)

    config static ip

    -----------------------------------------------------------------

    Does anyone have this case before?

  • Does IPNC DM368 support USB wifi?

    What type wifi does IPNC DM368 support ?