LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-02-2019, 06:36 AM   #1
kernash
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Rep: Reputation: Disabled
DWA-171 (WiFi dongle) identifies as mass storage device


Hi,

I'm trying to get the wifi dongle working. I'm running debian testing.

However, the dongle doesn't show up as wifi device:

dmesg when I plug it in:
Code:
[216138.343400] usb 2-7: new high-speed USB device number 59 using xhci_hcd
[216138.491639] usb 2-7: New USB device found, idVendor=0bda, idProduct=1a2b, bcdDevice= 2.00
[216138.491640] usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[216138.491641] usb 2-7: Product: DISK
[216138.491642] usb 2-7: Manufacturer: D-Link Corporation
[216138.492504] usb-storage 2-7:1.0: USB Mass Storage device detected
[216138.503415] scsi host6: usb-storage 2-7:1.0
[216139.509915] scsi 6:0:0:0: Direct-Access     Realtek  Driver Storage   1.00 PQ: 0 ANSI: 0 CCS
[216139.510151] sd 6:0:0:0: Attached scsi generic sg1 type 0
[216139.510524] sd 6:0:0:0: [sdb] 16000 512-byte logical blocks: (8.19 MB/7.81 MiB)
[216139.512960] sd 6:0:0:0: [sdb] Write Protect is on
[216139.512961] sd 6:0:0:0: [sdb] Mode Sense: 03 00 80 00
[216139.516237] sd 6:0:0:0: [sdb] No Caching mode page found
[216139.516241] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[216139.525975]  sdb:
[216139.531375] sd 6:0:0:0: [sdb] Attached SCSI removable disk
lsusb -v:
Code:
Bus 002 Device 059: ID 0bda:1a2b Realtek Semiconductor Corp. DISK
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x1a2b 
  bcdDevice            2.00
  iManufacturer           1 D-Link Corporation
  iProduct                2 DISK
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8a  EP 10 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
fdisk -l:
Code:
# fdisk -l /dev/sdb
Disk /dev/sdb: 7.8 MiB, 8192000 bytes, 16000 sectors
Disk model: Driver Storage  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6f20736b

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1        778135908 1919645538 1141509631 544.3G 72 unknown
/dev/sdb2        168689522 2104717761 1936028240 923.2G 65 Novell Netware 386
/dev/sdb3       1869881465 3805909656 1936028192 923.2G 79 unknown
/dev/sdb4                0 3637226495 3637226496   1.7T  d unknown

Partition table entries are not in disk order.
Ideas?

Last edited by kernash; 08-02-2019 at 06:41 AM.
 
Old 08-02-2019, 07:06 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I've always liked D-Link devices, and also bought one of these a few weeks (months ?) back. Surprisingly, this is as it is designed to be.
You plug it into a Windoze machine and the setup runs to reconfigure the device as the network dongle that you thought you bought originally. And of course it's a Realtek chip with a "Linux" driver that hasn't been updated since the dark ages.
What a f'ing joke - I took mine back for a refund the next day.

You might find a (source) driver on github that'll work, but I was so pissed off I gave up after looking at a couple of them.
Sorry to be the bearer of bad news.
 
Old 08-02-2019, 07:32 AM   #3
kernash
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks.

Wow, that's annoying.

At least I found out how to turn the "storage device" to a wifi-dongle using usb_modeswitch. non-persistent, apparently.
But I haven't found a working driver yet.
 
Old 08-02-2019, 07:39 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Yeah I looked at that too, but ISTR that most of what I found on the 'net was for the version 1 of the dongle - before they remodelled it as a disk.
Need to look at my notes on that machine - maybe tomorrow.
 
Old 08-02-2019, 07:44 AM   #5
kernash
LQ Newbie
 
Registered: Aug 2019
Posts: 12

Original Poster
Rep: Reputation: Disabled
Nevermind, that's not what I wanted when I bought a wifi-dongle. I'll try to return it.
 
Old 03-29-2020, 09:23 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I just bought one of these (D-Link DWA-171 Revision C) devices. Setting them up is still not trouble-free, so it's not surprising to me that we have a number of threads about them. Anyway, I just got it working on my Fedora 31 box, and this seems as good a thread as any to update.

First, I installed the driver:
Code:
git clone https://github.com/brektrou/rtl8821CU.git
cd rtl8821CU
chmod +x dkms-install.sh
sudo ./dkms-install.sh
This is from here: https://askubuntu.com/a/1164982

Then, I wrote a script to load the driver and switch the device from "Flash disk mode(default) to active adapter mode", as the official drivers put it. Respect to D-Link for providing official Linux drivers, but, well, they don't work. The repo above did. Anyway, here's the script, which is at /usr/local/bin/dwa171:
Code:
#!/usr/bin/env bash
/usr/sbin/modprobe 8821cu
/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b > /dev/null
And then I wrote a udev rule to load that script when the adapter is detected. It's at /etc/udev/rules.d/99-dwa171.rules
Code:
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1a2b", RUN+="/usr/local/bin/dwa171"
I have no idea if this is the best way to do it; it's just the first working setup I stumbled across.

Last edited by dugan; 03-30-2020 at 09:39 AM. Reason: Udev RUN script needs absolute paths
 
1 members found this post helpful.
Old 03-29-2020, 10:38 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Thanks for the update.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Wi-Fi USB Adapter D-Link DWA-171 l3vi Linux - Networking 4 05-14-2019 02:48 PM
[SOLVED] No internet with second wireless device d-link dwa-171 peterg17 Linux - Wireless Networking 16 07-04-2018 05:29 AM
LXer: Softpedia Linux Weekly, Issue 171 LXer Syndicated Linux News 0 10-31-2011 12:41 AM
LXer: NVIDIA 171.06 Linux Display Driver LXer Syndicated Linux News 0 03-08-2008 01:30 AM
How Linux usbcore identifies a new device seran Linux - General 1 02-15-2006 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration