LINUX.ORG.RU

Rasp Pi3 и USB Wi-fi Broadcomm 5 ghz

 , , ,


0

2

Здравствуйте. в линуксах я немножко нуб.

Как завести USB свисток Wi-fi?

Встроенный довольно слабенький и нет 5 ггц. но тут есть USB свисток. а его никак не получается завести.

Bus 001 Device 005: ID 043e:3001 LG Electronics USA, Inc. AN-WF100 802.11abgn Wireless Adapter [Broadcom BCM4323]

По Ifconfig видно только wlan0

Уже установлен пакет firmware-brcm80211 самой новой версии (1:20161130-3+rpi2).

pi@raspberrypi:~ $ uname -a Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Lnux pi@raspberrypi:~ $

Много всего гуглил, но ничего дельного.

Благодарю за помощь.

Ответ на: комментарий от cyber_eagle

И используемый системой драйвер:

найди ссылку на драйвер в /sys/bus/usb/devices по устройству Bus 001 Device 005: ID 043e:3001

cyber_eagle
()

Еще может быть, что ifconfig просто не показывает выключенный интерфейс. Попробуй ifconfig -d

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

[ 3.243240] usb 1-1.3: new high-speed USB device number 5 using dwc_otg

[ 3.339081] usb 1-1.3: New USB device found, idVendor=043e, idProduct=3001

[ 3.339088] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 3.339094] usb 1-1.3: Product: Remote Download Wireless Adapter

[ 3.339100] usb 1-1.3: Manufacturer: Broadcom

[ 3.339105] usb 1-1.3: SerialNumber: 0

[ 37.247634] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists

lrwxrwxrwx 1 root root 0 Jun 14 10:15 1-1.3 -> ../../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3

lrwxrwxrwx 1 root root 0 Jun 14 10:15 1-1.3:1.0 -> ../../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0

Apophis
() автор топика
Ответ на: комментарий от Apophis

[ 37.247634] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists

Добавь в /etc/udev/rules.d/70-persistent-net.rules строку

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:00:00:00:00:00", NAME="wlan4"
где 00:00:00:00:00:00 заменяешь на MAC встроенной сетевой карты.

Затем перезагружаешь систему и подключаешь свисток. Он должен определится, как wlan0, а встроенная будет wlan4

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

Добавь в /etc/udev/rules.d/70-persistent-net.rules строку

Каталог /etc/udev/rules.d есть. а 70-persistent-net.rules нет файла. и вообще пустой каталог

как быть? у меня есть каталог /usr/lib/udev/rules.d там много файлов.

Apophis
() автор топика
Ответ на: комментарий от Apophis

ls -la /usr/lib/udev/rules.d total 63 drwxr-xr-x 2 root root 889 Sep 27 14:39 . drwxr-xr-x 5 root root 247 Sep 27 14:39 .. -rw-r--r-- 1 root root 1064 Sep 27 14:34 30- disable-wakeup.rules -rw-r--r-- 1 root root 1195 Sep 27 14:34 40- modeswitch.rules -rw-r--r-- 1 root root 3310 Sep 27 14:35 50-udev- default.rules -rw-r--r-- 1 root root 606 Sep 27 14:35 60- block.rules -rw-r--r-- 1 root root 910 Sep 27 14:35 60- cdrom_id.rules -rw-r--r-- 1 root root 153 Sep 27 14:35 60-drm.rules -rw-r--r-- 1 root root 738 Sep 27 14:35 60-evdev.rules -rw-r--r-- 1 root root 616 Sep 27 14:35 60-persistent-alsa.rules -rw-r--r-- 1 root root 2464 Sep 27 14:35 60-persistent-input.rules -rw-r--r-- 1 root root 4903 Sep 27 14:35 60-persistent-storage.rules -rw-r--r-- 1 root root 1420 Sep 27 14:35 60-persistent-storage-tape.rules -rw-r--r-- 1 root root 769 Sep 27 14:35 60-persistent-v4l.rules -rw-r--r-- 1 root root 1190 Sep 27 14:35 60-serial.rules -rw-r--r-- 1 root root 1107 Sep 27 14:35 61-cdrom.rules -rw-r--r-- 1 root root 418 Sep 27 14:35 64-btrfs.rules -rw-r--r-- 1 root root 233 Sep 27 14:39 70-infrared.rules -rw-r--r-- 1 root root 734 Sep 27 14:35 70-mouse.rules -rw-r--r-- 1 root root 942 Sep 27 14:35 70-power-switch.rules -rw-r--r-- 1 root root 2591 Sep 27 14:35 70-uaccess.rules -rw-r--r-- 1 root root 2718 Sep 27 14:35 71-seat.rules -rw-r--r-- 1 root root 596 Sep 27 14:35 73-seat-late.rules -rw-r--r-- 1 root root 452 Sep 27 14:35 75-net-description.rules -rw-r--r-- 1 root root 174 Sep 27 14:35 75-probe_mtd.rules -rw-r--r-- 1 root root 4505 Sep 27 14:35 78-sound-card.rules -rw-r--r-- 1 root root 187 Sep 27 14:35 80-clock.rules -rw-r--r-- 1 root root 618 Sep 27 14:35 80-drivers.rules -rw-r--r-- 1 root root 1069 Sep 27 14:39 90-alsa-restore.rules -rw-r--r-- 1 root root 969 Sep 27 14:39 95-udevil-mount.rules -rw-r--r-- 1 root root 1677 Sep 27 14:35 97-hid2hci.rules -rw-r--r-- 1 root root 8964 Sep 27 14:39 98-eventlircd.rules -rw-r--r-- 1 root root 2492 Sep 27 14:39 98-lircd.rules -rw-r--r-- 1 root root 3855 Sep 27 14:35 99-systemd.rules -rw-r--r-- 1 root root 1238 Sep 27 14:35 99-wakeup-eth.rules

Apophis
() автор топика
Ответ на: комментарий от Apophis

Будьте добры использовать разметку https://www.linux.org.ru/help/lorcode.md в своих сообщениях.

Каталог /etc/udev/rules.d есть. а 70-persistent-net.rules нет файла. и вообще пустой каталог

Создавай пустой файл 70-persistent-net.rules и добавляй туда строку. Должно получится так:


# ls /etc/udev/rules.d/
70-persistent-net.rules

# cat /etc/udev/rules.d/70-persistent-net.rules 
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:00:00:00:00:00", NAME="wlan4"

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

Ничего. С чего вдруг такой интерес к нему? После перезагрузки чтото поменялось?

Ничего не поменялась. встроенный Wi-Fi по-прежнему Wlan0 и его mac адрес я вписывал. потом перезагружался.

Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

Странно. У меня /usr/lib/udev отсутствует вовсе. Покажи 75-net-[code=tex]description.rules в /usr/lib/udev/rules.d

# do not edit this file, it will be overwritten on update

ACTION==«remove», GOTO=«net_end» SUBSYSTEM!=«net», GOTO=«net_end»

IMPORT{builtin}=«net_id»

SUBSYSTEMS==«usb», IMPORT{builtin}=«usb_id», IMPORT{builtin}=«hwdb --subsystem=usb» SUBSYSTEMS==«usb», GOTO=«net_end»

SUBSYSTEMS==«pci», ENV{ID_BUS}=«pci», ENV{ID_VENDOR_ID}=«$attr{vendor}», ENV{ID_MODEL_ID}=«$attr{device}» SUBSYSTEMS==«pci», IMPORT{builtin}=«hwdb --subsystem=pci»

LABEL=«net_end»

Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

И попробуй выполнить

Выполнил. ошибок нет. перезагружаться? но тогда по-моему опять надо вашу команду выполнять?

Apophis
() автор топика
Ответ на: комментарий от Apophis
grep 'SUBSYSTEM=="net"' -r -i ./
./70-persistent-net.rules:SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="*************-чтоб не светить", NAME="wlan4"
Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

А теперь то же самое, но в директории /usr/lib/udev/rules.d

grep 'SUBSYSTEM=="net"' -r -i ./
./99-systemd.rules:SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name"
./99-systemd.rules:ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name"
Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

[ 6.908846] brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists

Apophis
() автор топика

Ошибка в названии образа GNU/Lnux?

Выполни

#ifconfig wlan0 down
#ip link set wlan0 name wlan4

И подключи свисток без перезагрузки.

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

В dmesg все еще появляется ошибка «brcmfmac: brcmf_add_if: ERROR: netdev:wlan0 already exists»?

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

Всё тоже самое. но на Wlan0 не ругается.

[ 2737.181277] usb 1-1.3: new high-speed USB device number 15 using dwc_otg
[ 2737.277528] usb 1-1.3: New USB device found, idVendor=043e, idProduct=3001
[ 2737.277551] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2737.277564] usb 1-1.3: Product: Remote Download Wireless Adapter
[ 2737.277575] usb 1-1.3: Manufacturer: Broadcom
[ 2737.277586] usb 1-1.3: SerialNumber: 0

Apophis
() автор топика
Ответ на: комментарий от cyber_eagle
ls -l -a /sys/class/net
total 0
drwxr-xr-x    2 root     root             0 Jun 14 10:15 .
drwxr-xr-x   46 root     root             0 Jan  1  1970 ..
lrwxrwxrwx    1 root     root             0 Jun 14 10:15 eth0 -> ../../devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/net/eth0
lrwxrwxrwx    1 root     root             0 Jun 14 10:15 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx    1 root     root             0 Jun 14 10:15 wlan4 -> ../../devices/platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan4
Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

Хорошо. спасибо за потраченное на меня время. пока тоже идей нет.

Apophis
() автор топика
Ответ на: комментарий от cyber_eagle

Ненавижу linux за то, что после того, как ввяжешься в решение какой нибудь проблемы - оставить незаконченной очень тяжело.

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

вот:

udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[5958.118152] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[5958.120126] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV  [5958.121518] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV  [5958.124668] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[5963.750671] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/bsg/4:0:0:0 (bsg)
KERNEL[5963.750838] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_device/4:0:0:0 (scsi_device)
KERNEL[5963.750928] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_disk/4:0:0:0 (scsi_disk)
UDEV  [5963.754227] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/bsg/4:0:0:0 (bsg)
KERNEL[5963.756235] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sda/sda1 (block)
UDEV  [5963.756888] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_device/4:0:0:0 (scsi_device)
UDEV  [5963.758509] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_disk/4:0:0:0 (scsi_disk)
KERNEL[5963.759305] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sda (block)
KERNEL[5963.759529] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0 (scsi)
KERNEL[5963.759631] remove   /devices/virtual/bdi/8:0 (bdi)
KERNEL[5963.759725] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0 (scsi)
KERNEL[5963.759816] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/scsi_host/host4 (scsi_host)
KERNEL[5963.759910] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4 (scsi)
UDEV  [5963.761617] remove   /devices/virtual/bdi/8:0 (bdi)
KERNEL[5963.762395] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [5963.762580] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/scsi_host/host4 (scsi_host)
KERNEL[5963.762879] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 (usb)
UDEV  [5964.099541] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sda/sda1 (block)
UDEV  [5964.102182] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sda (block)
UDEV  [5964.102455] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0 (scsi)
UDEV  [5964.103329] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0 (scsi)
UDEV  [5964.104317] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host4 (scsi)
UDEV  [5964.106484] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [5964.110896] remove   /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 (usb)
KERNEL[5964.302962] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[5964.304227] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV  [5964.307605] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV  [5964.310368] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[5965.580887] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 (usb)
KERNEL[5965.582295] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
KERNEL[5965.583266] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5 (scsi)
KERNEL[5965.583355] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/scsi_host/host5 (scsi_host)
UDEV  [5965.585708] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 (usb)
UDEV  [5965.588250] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [5965.589536] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5 (scsi)
UDEV  [5965.590333] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/scsi_host/host5 (scsi_host)
KERNEL[5966.595010] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0 (scsi)
KERNEL[5966.595109] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0 (scsi)
KERNEL[5966.595403] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0 (scsi_disk)
KERNEL[5966.595455] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
KERNEL[5966.597673] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/bsg/5:0:0:0 (bsg)
UDEV  [5966.597777] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0 (scsi)
KERNEL[5966.598484] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [5966.601142] add      /devices/virtual/bdi/8:0 (bdi)
UDEV  [5966.603497] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0 (scsi)
UDEV  [5966.604696] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/scsi_disk/5:0:0:0 (scsi_disk)
UDEV  [5966.605553] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/scsi_device/5:0:0:0 (scsi_device)
UDEV  [5966.606671] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/bsg/5:0:0:0 (bsg)
KERNEL[5966.619956] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/block/sda (block)
KERNEL[5966.620076] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/block/sda/sda1 (block)
UDEV  [5966.822117] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/block/sda (block)
UDEV  [5967.154569] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/host5/target5:0:0/5:0:0:0/block/sda/sda1 (block)

Apophis
() автор топика
Ответ на: комментарий от Apophis

Вот покороче.

KERNEL[6119.459886] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[6119.465095] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV  [6119.467495] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV  [6119.473589] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)

Apophis
() автор топика
Ответ на: комментарий от Apophis

Получается ты сначала запустил «udevadm monitor», а потом отключил и обратно подключил адаптер? Мне кажется он определился, как блочное устройство.

Чтобы окончательно убедится, нужно 1. Отключить адаптер 2. Выполнить ls /dev | grep sda и записать вывод 3. Подключить адаптер 4. Выполнить ls /dev | grep sda и записать вывод

cyber_eagle
()
Ответ на: комментарий от cyber_eagle

Ничего не выводится в обеих случаях. я для надёжности отключил USB-HDD

Apophis
() автор топика

В /etc/udev/rules.d/70-persistent-net.rules напиши

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="mac адаптера", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wl*", NAME="wlan1"

hbars ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.