t1n1wall

t1n1wall Support (English) => General Questions => Topic started by: skua on January 23, 2017, 04:07:06 PM

Title: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 23, 2017, 04:07:06 PM
Hello!

I've got several old thin clients (Geode LX800 based) that I want to convert to wifi routers, using cheap usb dongles (Ralink RT5370).

Those boards do not have pci connectors, etc.. all components are soldered to the board so the only way is using usb-wifi adapters.

I downloaded and installed t1n1wall generic-pc-2.11.1b133. It is works good, but I just cannot add (assign) the wlan devices directly.

So I had to install smallwall 1.8.4, assign one usb wlan adapter and then backup the configuration, reinstall t1n1wall 2.11 and restore the config file.

It worked. At least now I can use one of the dongles (LAN). Problem is I need to install a second one (LAN) which is only supported in t1n1wall 2.11 (FreeBSD 11).

Am I doing something wrong? Or is it a bug?

Both usb adapters are recognized during boot. One uses rum0 and the other run0 drivers. So I think it must be something related to the WebGUI or xml.

Keep up the good work!

Awaiting responses,

Regards.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 23, 2017, 06:26:03 PM
Hi!

Can you post dmesg output here ?
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 24, 2017, 12:31:33 AM
Hi there...

Here it goes:

Code: [Select]
$ dmesg
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0: Tue Jan  3 16:49:53 GMT 2017
    [email protected]:/usr/t1n1wall/build11/tmp/sys/i386/compile/T1N1WALL_GENERIC i386
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
CPU: Geode(TM) Integrated Processor by AMD PCS (498.06-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x5a2  Family=0x5  Model=0xa  Stepping=2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 247357440 (235 MB)
avail memory = 202137600 (192 MB)
wlan: mac acl policy registered
random: entropy device external interface
kbd1 at kbdmux0
K6-family MTRR support enabled (2 registers)
cryptosoft0: <software crypto> on motherboard
acpi0: <GENSW OEM00001> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x73 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x9c10-0x9c13 on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: Length mismatch for 3 range: bff00000 vs bfefffff
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> mem 0xe0000000-0xe0ffffff,0xe1000000-0xe1003fff,0xe1004000-0xe1007fff,0xe1008000-0xe100bfff,0xe100c000-0xe100ffff irq 11 at device 1.1 on pci0
vgapci0: Boot video device
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
rl0: <RealTek 8139 10/100BaseTX> port 0xf800-0xf8ff mem 0xe1014000-0xe10140ff irq 10 at device 13.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 18:40:14:00:70:20
isab0: <PCI-ISA bridge> port 0xf400-0xf407,0xf000-0xf0ff,0xec00-0xec3f,0xe800-0xe81f,0xe400-0xe47f,0x9c40-0x9c7f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xdc00-0xdc0f at device 15.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <multimedia, audio> at device 15.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xe1015000-0xe1015fff irq 11 at device 15.4 on pci0
usbus0 on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xe1016000-0xe1016fff irq 11 at device 15.5 on pci0
ehci0: pre-2.0 USB revision (ignored)
usbus1: EHCI version 1.0
usbus1 on ehci0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xd27ff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
Timecounters tick every 1.000 msec
md0: Preloadusbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <AMD> at usbus1
uhub0: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <AMD> at usbus0
uhub1: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ed image </mfsroot> 23314432 bytes at 0xc10c3728
g_access(918): provider md0a has error
g_access(918): provider md0a has error
g_access(918): provider md0a has error
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <EXPERT FIC 30/06/03> ATA device
ada0: Serial Number FIC00001
ada0: 16.700MB/s transfers (PIO4, PIO 512bytes)
ada0: 249MB (510976 512 byte sectors)
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
Timecounter "TSC" frequency 498060726 Hz quality 800
Trying to mount root from ufs:/dev/md0 []...
uhub1: 4 ports with 4 removable, self powered
stray irq7
stray irq7
uhub0: 4 ports with 4 removable, self powered
random: unblocking device.
ugen1.2: <Ralink> at usbus1
rum0: <Ralink 802.11 bg WLAN, class 0/0, rev 2.00/0.01, addr 2> on usbus1
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528
glxsb0: <AMD Geode LX Security Block (AES-128-CBC, RNG)> mem 0xe1010000-0xe1013fff irq 11 at device 1.2 on pci0
rl0: link state changed to DOWN
done
stray irq7
wlan0: Ethernet address: 00:b0:8c:01:8c:c3
ugen0.2: <vendor 0x04d9> at usbus0
ukbd0: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on usbus0
kbd2 at ukbd0
ugen1.3: <Ralink> at usbus1
run0: <1.0> on usbus1
run0: MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R), address 7c:dd:90:a1:f7:89
pflog0: promiscuous mode enabled
done
done

I have 84 of those thin clients to convert to routers... So, any help is much appreciated.

Thank you.

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 24, 2017, 12:39:28 AM
Interface assignment screenshot:

(https://forums.t1n1wall.com/index.php?action=dlattach;topic=51.0;attach=11)

As the screenshot indicates, although FreeBSD 11 recognizes devices rum0 (ugen1.2) and run0 (ugen1.3), webgui dropdown box shows nothing.

I need to setup ugen1.2 as LAN and ugen1.3 as WAN.

rl0 as OPT1.

Ticking or UNticking the option to load Ralink firmware on "advanced" tab and rebooting has no effect also... I am clueless.

Thx.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 24, 2017, 10:29:30 PM
Thanks for the data, let me take a look at the code

Can you post the output of ifconfig ? 
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 12:30:39 AM
Sure:

Code: [Select]
$ ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (none)
status: no carrier
enc0: flags=0<> metric 0 mtu 1536
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33184
groups: pflog
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:b0:8c:01:8c:c3
inet6 fe80::2b0:8cff:fe01:8cc3%wlan0 prefixlen 64 scopeid 0x5
inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid Trump channel 1 (2412 MHz 11g) bssid 00:b0:8c:01:8c:c3
regdomain FCC country US authmode WPA2/802.11i privacy MIXED
deftxkey 2 TKIP 2:128-bit txpower 26 scanvalid 60 protmode CTS wme
dtimperiod 1 -dfs
groups: wlan

As I said, the only way I could make wlan0 to work, was by restoring the config file backed up from the former smallwall installation.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 25, 2017, 08:58:56 AM
The firmware for run wasn't loading , which is why ifconfig only shows one wlan interface

Can you try b134 which now has that firmware ?

the wlan interface is based on a regex of the output of
Code: [Select]
/usr/bin/netstat -inW -f link
can you post me the output of that command ?
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 11:08:55 AM
Hello there!

OK, let's break it down:

Upgraded to build 134 and did a reset to factory defaults. Here it is:


Code: [Select]
$ /usr/bin/netstat -inW -f link
Name      Mtu Network            Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
rl0      1500 <Link#1>           18:40:14:00:70:20      152     0     0      223     0     0
enc0*    1536 <Link#2>           enc0                     0     0     0        0     0     0
lo0     16384 <Link#3>           lo0                   3264     0     0     3264     0     0
pflog0* 33184 <Link#4>           pflog0                   0     0     0       14     0     0
vlan0    1500 <Link#5>           18:40:14:00:70:20        0     0     0       26     0     0


and


Code: [Select]
$ ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 10.1.1.10 netmask 0xffffff00 broadcast 10.1.1.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
enc0: flags=0<> metric 0 mtu 1536
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33184
groups: pflog
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%vlan0 prefixlen 64 scopeid 0x5
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 100 vlanpcp: 0 parent interface: rl0
groups: vlan


"Enable Ralink USB wireless devices" is ticked, but the system still cannot load usb wlan firmware.

By the way, I had to create the vlan0 device and assign it as WAN, otherwise I could not assign network ports and access the system (board has only one ethernet port).

I did the same procedure (create vlan0 -> assign wlan0 as WAN -> delete vlan0) on the former smallwall 1.8.4 installation and was able to use that wifi device.

I hope this info helps. Thank you.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 11:23:50 AM
dmesg of build 134:

Code: [Select]
$ dmesg
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0: Wed Jan 25 08:41:59 GMT 2017
    [email protected]:/usr/t1n1wall/build11/tmp/sys/i386/compile/T1N1WALL_GENERIC i386
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
CPU: Geode(TM) Integrated Processor by AMD PCS (498.06-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x5a2  Family=0x5  Model=0xa  Stepping=2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 247357440 (235 MB)
avail memory = 202137600 (192 MB)
random: entropy device external interface
wlan: mac acl policy registered
kbd1 at kbdmux0
K6-family MTRR support enabled (2 registers)
cryptosoft0: <software crypto> on motherboard
acpi0: <GENSW OEM00001> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x73 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x9c10-0x9c13 on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: Length mismatch for 3 range: bff00000 vs bfefffff
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> mem 0xe0000000-0xe0ffffff,0xe1000000-0xe1003fff,0xe1004000-0xe1007fff,0xe1008000-0xe100bfff,0xe100c000-0xe100ffff irq 11 at device 1.1 on pci0
vgapci0: Boot video device
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
rl0: <RealTek 8139 10/100BaseTX> port 0xf800-0xf8ff mem 0xe1014000-0xe10140ff irq 10 at device 13.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 18:40:14:00:70:20
isab0: <PCI-ISA bridge> port 0xf400-0xf407,0xf000-0xf0ff,0xec00-0xec3f,0xe800-0xe81f,0xe400-0xe47f,0x9c40-0x9c7f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xdc00-0xdc0f at device 15.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <multimedia, audio> at device 15.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xe1015000-0xe1015fff irq 11 at device 15.4 on pci0
usbus0 on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xe1016000-0xe1016fff irq 11 at device 15.5 on pci0
ehci0: pre-2.0 USB revision (ignored)
usbus1: EHCI version 1.0
usbus1 on ehci0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xd27ff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
Timecounters tick every 1.000 msec
mdusbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <AMD> at usbus1
uhub0: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <AMD> at usbus0
uhub1: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
0: Preloaded image </mfsroot> 23314432 bytes at 0xc10c5828
g_access(918): provider md0a has error
g_access(918): provider md0a has error
g_access(918): provider md0a has error
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <EXPERT FIC 30/06/03> ATA device
ada0: Serial Number FIC00001
ada0: 16.700MB/s transfers (PIO4, PIO 512bytes)
ada0: 249MB (510976 512 byte sectors)
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
Timecounter "TSC" frequency 498062319 Hz quality 800
Trying to mount root from ufs:/dev/md0 []...
uhub1: 4 ports with 4 removable, self powered
stray irq7
stray irq7
uhub0: 4 ports with 4 removable, self powered
random: unblocking device.

ugen1.2: <Ralink> at usbus1
rum0: <Ralink 802.11 bg WLAN, class 0/0, rev 2.00/0.01, addr 2> on usbus1
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528
glxsb0: <AMD Geode LX Security Block (AES-128-CBC, RNG)> mem 0xe1010000-0xe1013fff irq 11 at device 1.2 on pci0
rl0: link state changed to DOWN
done
stray irq7
ukbd0: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on usbus0
kbd2 at ukbd0
ugen1.3: <Ralink> at usbus1
run0: <1.0> on usbus1
run0: MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R), address 7c:dd:90:a1:f7:89
done
pflog0: promiscuous mode enabled
vlan0: link state changed to UP
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 11:59:19 AM
Now I tried generic-pc-1.8.2b78.img (FreeBSD 8.4) and, like smallwall 1.8.4:


Code: [Select]
$ ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 10.1.1.10 netmask 0xffffff00 broadcast 10.1.1.255
nd6 options=41<PERFORMNUD,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
enc0: flags=0<> metric 0 mtu 1536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=43<PERFORMNUD,ACCEPT_RTADV,NO_RADR>
rum0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:b0:8c:01:8c:c3
media: IEEE 802.11 Wireless Ethernet autoselect <adhoc> (autoselect)
status: no carrier
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%vlan0 prefixlen 64 scopeid 0x5
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
nd6 options=41<PERFORMNUD,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 100 parent interface: rl0


Code: [Select]
$ dmesg
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.4-RELEASE #0: Sun Dec 27 11:18:00 GMT 2015
    [email protected]:/usr/t1n1wall/build84/tmp/sys/i386/compile/T1N1WALL_GENERIC i386
gcc version 4.2.1 20070831 patched [FreeBSD]
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Geode(TM) Integrated Processor by AMD PCS (499.05-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x5a2  Family = 5  Model = a  Stepping = 2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 247357440 (235 MB)
avail memory = 202199040 (192 MB)
wlan: mac acl policy registered
kbd1 at kbdmux0
K6-family MTRR support enabled (2 registers)
cryptosoft0: <software crypto> on motherboard
acpi0: <GENSW OEM00001> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x9c10-0x9c13 on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> mem 0xe0000000-0xe0ffffff,0xe1000000-0xe1003fff,0xe1004000-0xe1007fff,0xe1008000-0xe100bfff,0xe100c000-0xe100ffff irq 11 at device 1.1 on pci0
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
rl0: <RealTek 8139 10/100BaseTX> port 0xf800-0xf8ff mem 0xe1014000-0xe10140ff irq 10 at device 13.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 18:40:14:00:70:20
rl0: [ITHREAD]
isab0: <PCI-ISA bridge> port 0xf400-0xf407,0xf000-0xf0ff,0xec00-0xec3f,0xe800-0xe81f,0xe400-0xe47f,0x9c40-0x9c7f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xdc00-0xdc0f at device 15.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata0: [ITHREAD]
ata1: <ATA channel> at channel 1 on atapci0
ata1: [ITHREAD]
pci0: <multimedia, audio> at device 15.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xe1015000-0xe1015fff irq 11 at device 15.4 on pci0
ohci0: [ITHREAD]
usbus0 on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xe1016000-0xe1016fff irq 11 at device 15.5 on pci0
ehci0: pre-2.0 USB revision (ignored)
ehci0: [ITHREAD]
usbus1: EHCI version 1.0
usbus1 on ehci0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x73 irq 8 on acpi0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xd27ff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
Timecounter "TSC" frequency 499049606 Hz quality 800
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
IP Filter: v4.1.34 initialized.  Default = block all, Logging = enabled
md0: Preloaded image </mfsrusbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ooad0: 249MB <EXPERT FIC 30/06/03> at ata0-master PIO4
t> 23611392 bytes at 0xc0e1c7d4
ugen0.1: <AMD> at usbus0
uhub0: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <AMD> at usbus1
uhub1: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
Root mount waiting for: usbus1 usbus0
uhub0: 4 ports with 4 removable, self powered
Root mount waiting for: usbus1
uhub1: 4 ports with 4 removable, self powered
Root mount waiting for: usbus1
ugen1.2: <Ralink> at usbus1
rum0: <Ralink 802.11 bg WLAN, class 0/0, rev 2.00/0.01, addr 2> on usbus1
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528
Root mount waiting for: usbus1
ugen0.2: <vendor 0x04d9> at usbus0
ukbd0: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on usbus0
kbd2 at ukbd0
Root mount waiting for: usbus1
ugen1.3: <Ralink> at usbus1
Trying to mount root from ufs:/dev/md0
glxsb0: <AMD Geode LX Security Block (AES-128-CBC, RNG)> mem 0xe1010000-0xe1013fff irq 11 at device 1.2 on pci0
rl0: link state changed to UP
vlan0: link state changed to UP
wlan999: Ethernet address: 00:b0:8c:01:8c:c3


Well... note the "wlan999: Ethernet address: 00:b0:8c:01:8c:c3" line.

Anyway, version 1.8.2 (FreeBSD 8.4) can see wlan rum driver (firmware RT2528), and webgui can assign it.

Is it possible to include firmware for RT5370 (MIMO 1T1R) on version 1.8.2 so we can give it a try?

Thank you.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 04:44:40 PM
In regard to dmesg's line "wlan999: Ethernet address: 00:b0:8c:01:8c:c3", I've found this:

http://forum.m0n0.ch/forum/topic,5657.15.html


Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 05:53:54 PM
Hello there Mr. White!

Well, continuing my tests here, I manually created the wlans (thru exec.php) on generic-pc-2.11.1b134 :

ifconfig wlan0 create wlandev rum0

ifconfig wlan1 create wlandev run0


now:

Code: [Select]
$ ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 10.1.1.10 netmask 0xffffff00 broadcast 10.1.1.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
enc0: flags=0<> metric 0 mtu 1536
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33184
groups: pflog
vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%vlan0 prefixlen 64 scopeid 0x5
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
vlan: 1 vlanpcp: 0 parent interface: rl0
groups: vlan
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:b0:8c:01:8c:c3
inet6 fe80::2b0:8cff:fe01:8cc3%wlan0 prefixlen 64 scopeid 0x6
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 MHz 11g)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme bintval 0
groups: wlan
wlan1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 MHz 11b)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 wme bintval 0
groups: wlan


But "Interfaces: Assign network ports: Edit WLAN --> Parent interface" on webGUI dropdown box, still shows no interfaces to choose from.

 


Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 25, 2017, 11:25:05 PM
Thanks for the detail.  one last request (I hope !)

can you send the output of

Code: [Select]
sysctl -A net.wlan.devices
It appears the netstat command has a bug introduce in freebsd11 , that it doesn't show wireless devices of this type.  I have filed a bug, it might get fixed.    but , depending on the output of above, I might be able to work around it with that new sysctl.

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 25, 2017, 11:54:01 PM
Ok...

Output of sysctl as requested:

Code: [Select]
$ sysctl -A net.wlan.devices
net.wlan.devices: run0 rum0

Thanks for the help.

Awaiting orders.

:-)
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 26, 2017, 01:05:41 AM
Can you try b135 ?
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 26, 2017, 01:46:44 AM
Hi...

Using b135 right now.

Good, webGUI Parent Interface now shows both dongles, but shows them like this:

(https://forums.t1n1wall.com/index.php?action=dlattach;topic=51.0;attach=13;image)

Both run0 and rum0 are displayed, but said "undetected".

I assigned run0, did a reboot, but ifconfig doesn't show it active.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 26, 2017, 09:40:27 AM
I'll look later today.

Undetected is because it could detect the Mac address, which is because of how I did the workaround , that should be fine.

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 26, 2017, 12:28:01 PM
Good morning!

And good news!

First I have to say I made a mistake last night:

I assigned both usb devices but forgot to associate them to LAN and WAN ports. After that was corrected and a system reboot, now wlan0 (rum -> LAN) and wlan1 (run -> WAN) are listed and active.

LAN in AP mode and wpa2 is working OK.

Weird things I noticed:

a) "Interfaces: Assign network ports: Edit WLAN --> Standard" dropdown box shows nothing.

b) WAN interface cannot get IP addresses from other wifi routers/APs, via DHCP. Assigning it a static IP address has no effect.

c) ifconfig shows WAN interface associated, even if using wrong encryption keys in its configuration:

Code: [Select]
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
inet6 fe80::7edd:90ff:fea1:f789%wlan1 prefixlen 64 scopeid 0x6
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet OFDM/24Mbps mode 11g
status: associated
ssid testing channel 7 (2442 MHz 11g) bssid 00:16:01:98:21:ed
regdomain FCC country US authmode OPEN privacy ON deftxkey 1
wepkey 1:104-bit txpower 30 bmiss 7 scanvalid 60 protmode CTS wme
groups: wlan

 By the way, is it possible somehow to use wpa2 on BSS (Station) mode?

P.S.: If I set rl0 as WAN, all works fine, just as expected.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 28, 2017, 12:57:24 AM
Well, after several tests and following this:

http://doc.m0n0.ch/handbook/troubleshooting-nointernetfromlan.html (http://doc.m0n0.ch/handbook/troubleshooting-nointernetfromlan.html)

I'm still unable to get a lease from other routers/APs.

Using static addresses also fails.

Am I missing something?

Any help is appreciated.

Thanks.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on January 31, 2017, 12:55:50 AM
My problem persists.

Maybe this can shed some light on it...

After some time console shows this message:

wlan1: ieee80211_new_state_locked: pending ASSOC -> RUN transition lost

ifconfig keeps showing:

Code: [Select]
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
inet6 fe80::7edd:90ff:fea1:f789%wlan1 prefixlen 64 scopeid 0x6
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet OFDM/6Mbps mode 11g
status: associated
ssid testing channel 4 (2427 MHz 11g) bssid 00:16:01:98:21:ed
regdomain FCC country US authmode OPEN privacy ON deftxkey 1
wepkey 1:104-bit txpower 30 bmiss 7 scanvalid 60 protmode CTS wme
groups: wlan

P.S.: If no encryption key is used, WAN (wlan1) connects and gets IP from DHCP servers as expected.

Thanks in advance.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on January 31, 2017, 10:45:22 PM
I'll look tomorrow, I have added a wifi device to my test unit

is your WAN setup with wpa ?
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 01, 2017, 12:35:07 AM
Hello there...

I am testing WAN connections using WEP encryption, because if I try to use wpa/wpa2, t1n1wall displays: "WPA is only supported in hostap mode." error message.

Is it possible to use wpa/wpa2 in BSS (Station) mode? I couldn't make it work...

t1n1wall fits like a glove in this geode hardware we got here, and having WAN connections using a higher security standard would be just right for our project.

Thank you for the replies.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on February 01, 2017, 10:57:21 PM
the wpa code is built into the hostapd daemon used for running in AP mode, so it was never supported for BSS mode.

I have changed the webui a little for wlan config, you should see xx's for the mac addr , and it should show the driver name correctly again.

I have added wpa_supplicant to t1n1wall, which is required for doing wpa in bss mode, and put in the code so it should work.  I can't test it as my compact flash in my test device died.  But it should create a file in /var/etc called wpa_supplicant-wlan0.conf , and it should execute wpa_supplicant then.  if it doesn't work can you check in status.php that wpa is or isn't running, and check if the wpa_supplicant file exists in /var/etc ?

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 02, 2017, 12:45:58 AM
Hello...

Testing b136 right now.

Unfortunately wpa_supplicant-wlan0.conf is not listed in /var/etc and status.php doesn't show wpa_supplicant's presence.

Code: [Select]
$ ls /var/etc
cfdevice
dhclient.conf
dnsmasq
hostapd-wlan0.conf
hosts
ntpd.conf
pf.ip4.conf
pf.ippools.conf
pf.nat4.conf
resolv.conf

Processes:
Code: [Select]
USER   PID %CPU %MEM   VSZ   RSS TT  STAT STARTED    TIME COMMAND
root    10 67.9  0.0     0     8  -  RL   00:36   1:24.63 [idle]
root   149  5.4  5.2 13972 10536  -  SN   00:38   0:00.64 /usr/local/bin/php status.php
root    14  3.6  0.0     0    80  -  DL   00:36   0:06.39 [usb]
root     0  3.1  0.1     0   104  -  DLs  00:36   0:03.38 [kernel]
root    11  3.1  0.0     0    96  -  WL   00:36   0:03.31 [intr]
root     1  0.0  2.2 18044  4428  -  ILs  00:36   0:00.04 /sbin/init --
root     2  0.0  0.0     0     8  -  DL   00:36   0:00.00 [crypto]
root     3  0.0  0.0     0     8  -  DL   00:36   0:00.00 [crypto returns]
root     4  0.0  0.0     0    16  -  DL   00:36   0:00.00 [cam]
root     5  0.0  0.0     0     8  -  DL   00:36   0:00.10 [pf purge]
root     6  0.0  0.0     0     8  -  DL   00:36   0:00.07 [rand_harvestq]
root     7  0.0  0.0     0     8  -  DL   00:36   0:00.10 [md0]
root     8  0.0  0.0     0     8  -  DL   00:36   0:00.00 [soaiod1]
root     9  0.0  0.0     0     8  -  DL   00:36   0:00.00 [soaiod2]
root    12  0.0  0.0     0     8  -  DL   00:36   0:00.00 [ng_queue]
root    13  0.0  0.0     0    24  -  DL   00:36   0:00.01 [geom]
root    15  0.0  0.0     0     8  -  DL   00:36   0:00.00 [soaiod3]
root    16  0.0  0.0     0     8  -  DL   00:36   0:00.00 [soaiod4]
root    17  0.0  0.0     0    16  -  DL   00:36   0:00.00 [pagedaemon]
root    18  0.0  0.0     0     8  -  DL   00:36   0:00.00 [pagezero]
root    19  0.0  0.0     0     8  -  DL   00:36   0:00.00 [idlepoll]
root    20  0.0  0.0     0     8  -  DL   00:36   0:00.00 [bufspacedaemon]
root    21  0.0  0.0     0     8  -  DL   00:36   0:00.00 [bufdaemon]
root    22  0.0  0.0     0     8  -  DL   00:36   0:00.00 [vnlru]
root    23  0.0  0.0     0     8  -  DL   00:36   0:00.01 [syncer]
root    24  0.0  0.0     0     8  -  DL   00:36   0:00.00 [flowcleaner]
root    73  0.0  4.1 18044  8276  -  Ss   00:36   0:00.02 /usr/sbin/hostapd -B -P /var/run/hostapd-wlan0.pid /var/etc/hostapd-wlan0.conf
root    86  0.0  3.8 11872  7852  -  Is   00:36   0:00.01 /sbin/dhclient -nw -cf /var/etc/dhclient.conf -sf /sbin/dhclient-script wlan1
root   109  0.0  0.9  6204  1904  -  Ss   00:36   0:00.01 /sbin/pfmon pflog0 /var/run/pfmon.pid
root   113  0.0  0.9  6080  1936  -  Ss   00:36   0:00.04 /usr/sbin/syslogd -ss
root   115  0.0  1.8  8244  3636  -  Ss   00:36   0:00.01 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxproc 16 -i /var/run/mini_httpd.pid
root   120  0.0  4.2 18052  8600  -  S<s  00:36   0:00.02 ntpd: ntp engine (ntpd)
root   121  0.0  4.2 18044  8536  -  Ss   00:36   0:00.04 ntpd: dns engine (ntpd)
root   122  0.0  4.2 18044  8508  -  I<s  00:36   0:00.00 ntpd: [priv] (ntpd)
nobody 127  0.0  4.2 18044  8492  -  I    00:36   0:00.02 /usr/local/sbin/dnsmasq --conf-dir=/var/etc/dnsmasq
root   138  0.0  4.1 18044  8320  -  I    00:36   0:00.03 /bin/sh /etc/rc.initial console
root   150  0.0  1.8  8244  3672  -  S    00:38   0:00.00 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxproc 16 -i /var/run/mini_httpd.pid
root   168  0.0  4.2 18044  8488  -  RN   00:38   0:00.05 ps xauww

Console shows that wlan0 is assigned as LAN (which is running in AP mode) and wlan1 is assigned as WAN (BSS). I don't know if this is related (I am not a programmer), but maybe it should be "wpa_supplicant-wlan1.conf" or not?

Proceeding with further tests here...

BRB. 


Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 02, 2017, 02:04:04 AM
Well...

In the last post I forgot to mention that WebGUI keeps displaying "WPA is only supported in hostap mode" if I try to use wpa/psk (build 136).

After the inclusion of wpa_supplicant in t1n1wall, what is the right way to configure wpa connections? I must be missing something...  :o

Anyway, WEP seems to be working incorrectly too.

e.g.: WAN connection associates to router/AP, using correct or incorrect WEP keys, but i get no DHCP lease in any case. Using static addresses has no effect. The only way I can get a DHCP lease is by using no encrypted connections.

Thanks.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on February 05, 2017, 09:21:11 PM
Can you try the new build 138 ?
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 06, 2017, 10:49:11 AM
Hello...

Trying b138:


Now I can assign wpa connections on webGUI, I can see wpa_supplicant listed on /var/etc/


Code: [Select]
$ ls /var/etc
cfdevice
dhclient.conf
dnsmasq
hostapd-wlan0.conf
hosts
ntpd.conf
pf.ip4.conf
pf.ippools.conf
pf.nat4.conf
resolv.conf
wpa_supplicant-wlan1.conf

But it seems not being able to run or the process dies somewhere during system boot, for some reason:


Code: [Select]
$ ps ax
PID TT  STAT     TIME COMMAND
  0  -  DLs   0:50.33 [kernel]
  1  -  SLs   0:00.04 /sbin/init --
  2  -  DL    0:00.00 [crypto]
  3  -  DL    0:00.00 [crypto returns]
  4  -  DL    0:00.00 [cam]
  5  -  DL    0:01.35 [pf purge]
  6  -  DL    0:00.81 [rand_harvestq]
  7  -  DL    0:00.12 [md0]
  8  -  DL    0:00.00 [soaiod1]
  9  -  DL    0:00.00 [soaiod2]
 10  -  RL   21:13.94 [idle]
 11  -  WL    0:48.84 [intr]
 12  -  DL    0:00.00 [ng_queue]
 13  -  DL    0:00.00 [geom]
 14  -  DL    1:34.29 [usb]
 15  -  DL    0:00.00 [soaiod3]
 16  -  DL    0:00.00 [soaiod4]
 17  -  DL    0:00.04 [pagedaemon]
 18  -  DL    0:00.00 [pagezero]
 19  -  DL    0:00.00 [idlepoll]
 20  -  DL    0:00.01 [bufspacedaemon]
 21  -  DL    0:00.02 [bufdaemon]
 22  -  DL    0:00.02 [vnlru]
 23  -  DL    0:00.05 [syncer]
 24  -  DL    0:00.00 [flowcleaner]
 73  -  Ss    0:00.04 /usr/sbin/hostapd -B -P /var/run/hostapd-wlan0.pid /var/e
 87  -  Is    0:00.03 /sbin/dhclient -nw -cf /var/etc/dhclient.conf -sf /sbin/d
110  -  Ss    0:00.11 /sbin/pfmon pflog0 /var/run/pfmon.pid
114  -  Ss    0:00.06 /usr/sbin/syslogd -ss
116  -  Ss    0:00.02 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxp
121  -  S<s   0:00.06 ntpd: ntp engine (ntpd)
122  -  Ss    0:00.48 ntpd: dns engine (ntpd)
123  -  I<s   0:00.00 ntpd: [priv] (ntpd)
128  -  S     0:00.05 /usr/local/sbin/dnsmasq --conf-dir=/var/etc/dnsmasq
139  -  I     0:00.03 /bin/sh /etc/rc.initial console
172  -  SN    0:00.45 /usr/local/bin/php exec.php
173  -  Z     0:00.00 <defunct>
174  -  S     0:00.00 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxp
175  -  RN    0:00.06 ps ax

Note process # 173 (??)


status.php doesn't show any trace of it too.
 

I am still unable to get DHCP leases from any server, AP or router using encrypted connections:


Code: [Select]
$ ifconfig
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 192.168.2.2 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (none)
status: no carrier
enc0: flags=0<> metric 0 mtu 1536
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33184
groups: pflog
wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:b0:8c:01:8c:c3
inet6 fe80::2b0:8cff:fe01:8cc3%wlan0 prefixlen 64 scopeid 0x5
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid TestLAN channel 11 (2462 MHz 11g) bssid 00:b0:8c:01:8c:c3
regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
deftxkey 3 TKIP 2:128-bit TKIP 3:128-bit txpower 26 scanvalid 60
protmode CTS wme dtimperiod 1 -dfs
groups: wlan
wlan1: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
inet6 fe80::7edd:90ff:fea1:f789%wlan1 prefixlen 64 scopeid 0x6
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid testing channel 11 (2462 MHz 11g)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 protmode CTS wme
groups: wlan
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 0a:e8:d4:30:77:e8
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: wlan0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
        ifmaxaddr 0 port 5 priority 128 path cost 370370
member: rl0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
        ifmaxaddr 0 port 1 priority 128 path cost 55


What could it be?

Thank you.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 07, 2017, 02:49:55 PM
Hi there...

This is the contents of /var/etc/wpa_supplicant-wlan1.conf of my t1n1wall testing unit (b138):

Code: [Select]
$ cat /var/etc/wpa_supplicant-wlan1.conf

network={
  ssid="testing"
  psk="poiuytrewq"
}

But, in order for me to connect my FreeBSD desktop to the external routers I need to use, this is the contents of wpa_supplicant.conf that works:

Code: [Select]
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1

network={
ssid="testing"
scan_ssid=1
key_mgmt=WPA-PSK
proto=RSN
psk="poiuytrewq"
}

Is there a way to add the options:

ap_scan=1

fast_reauth=1

scan_ssid=1

key_mgmt=WPA-PSK

proto=RSN


to t1n1wall's /var/etc/wpa_supplicant-wlan1.conf, so we could test it?

Is it needed to modify the webGUI?

Thank you.

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on February 09, 2017, 09:33:36 PM
Hi,

sorry, work has gotten really busy ....

if wpa_supplicant isn't executing,  can you try manually executing it

/usr/sbin/wpa_supplicant -s -i wlan1 -B -P /var/run/wpa_supplicant-wlan1.pid -c /var/etc/wpa_supplicant-wlan1.conf

I can add in the other options, I think can be done easily, but most of your settings are compatible with defaults (scan_ssid is normally 0)  see  https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf(5)
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 10, 2017, 04:58:42 AM
Hi there,

Well, by manually issuing that command, wpa works:

Code: [Select]
$ ps ax
PID TT  STAT    TIME COMMAND
  0  -  DLs  0:02.83 [kernel]
  1  -  ILs  0:00.04 /sbin/init --
  2  -  DL   0:00.00 [crypto]
  3  -  DL   0:00.00 [crypto returns]
  4  -  DL   0:00.00 [cam]
  5  -  DL   0:00.37 [pf purge]
  6  -  DL   0:00.21 [rand_harvestq]
  7  -  DL   0:00.11 [md0]
  8  -  DL   0:00.00 [soaiod1]
  9  -  DL   0:00.00 [soaiod2]
 10  -  RL   6:39.49 [idle]
 11  -  WL   0:03.41 [intr]
 12  -  DL   0:00.00 [ng_queue]
 13  -  DL   0:00.00 [geom]
 14  -  DL   0:05.76 [usb]
 15  -  DL   0:00.00 [soaiod3]
 16  -  DL   0:00.00 [soaiod4]
 17  -  DL   0:00.01 [pagedaemon]
 18  -  DL   0:00.00 [pagezero]
 19  -  DL   0:00.00 [idlepoll]
 20  -  DL   0:00.00 [bufspacedaemon]
 21  -  DL   0:00.00 [bufdaemon]
 22  -  DL   0:00.00 [vnlru]
 23  -  DL   0:00.02 [syncer]
 24  -  DL   0:00.00 [flowcleaner]
 73  -  Ss   0:00.03 /usr/sbin/hostapd -B -P /var/run/hostapd-wlan0.pid /var/et
 87  -  Is   0:00.01 /sbin/dhclient -nw -cf /var/etc/dhclient.conf -sf /sbin/dh
110  -  Ss   0:00.03 /sbin/pfmon pflog0 /var/run/pfmon.pid
114  -  Ss   0:00.06 /usr/sbin/syslogd -ss
116  -  Ss   0:00.01 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxpr
121  -  S<s  0:00.02 ntpd: ntp engine (ntpd)
122  -  Ss   0:00.12 ntpd: dns engine (ntpd)
123  -  I<s  0:00.00 ntpd: [priv] (ntpd)
128  -  S    0:00.04 /usr/local/sbin/dnsmasq --conf-dir=/var/etc/dnsmasq
139  -  I    0:00.04 /bin/sh /etc/rc.initial console
155  -  SNs  0:00.10 /usr/sbin/wpa_supplicant -s -i wlan1 -B -P /var/run/wpa_su
173  -  SN   0:00.43 /usr/local/bin/php exec.php
174  -  Z    0:00.00 <defunct>
175  -  S    0:00.00 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxpr
176  -  RN   0:00.05 ps ax

But... the system is still unable to get any DHCP lease.

Code: [Select]
wlan1: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
inet6 fe80::7edd:90ff:fea1:f789%wlan1 prefixlen 64 scopeid 0x6
inet 0.0.0.0 netmask 0x0 broadcast 255.255.255.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid testing channel 11 (2462 MHz 11g)
regdomain FCC country US authmode WPA1+WPA2/802.11i privacy MIXED
deftxkey UNDEF txpower 30 bmiss 7 scanvalid 60 protmode CTS wme
roaming MANUAL
groups: wlan

Adding those wpa options to the webGUI (if possible) would be nice, so we could perform some tests.

Thanks.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 14, 2017, 01:10:00 PM
Hello there!

Good news:

After some more testing here, I managed to make wpa2 work and connect, acquiring a DHCP lease at last. Bellow, the steps I took:

-- I wrote the following wpa_supplicant-wlan1.conf file, based on my FreeBSD desktop's wpa_supplicant.conf:

Code: [Select]
ctrl_interface=/var/run/wpa_supplicant-wlan1
ap_scan=1
fast_reauth=1

eapol_version=2

network={
ssid="testing"
scan_ssid=1
key_mgmt=WPA-PSK
proto=RSN
psk="poiuytrewq"
}

-- Using exec.php I uploaded it to my t1n1wall testing unit.

-- Moved it from /tmp to /var/etc

-- Executed /usr/sbin/wpa_supplicant -s -i wlan1 -B -P /var/run/wpa_supplicant-wlan1.pid -c /var/etc/wpa_supplicant-wlan1.conf

And voilą... It woked! I am using it right now to post this reply and It is performing just fine!

I have to say that the only way I could make it work and get a lease was by adding the option eapol_version=2 to the config file. This option is not needed on my FreeBSD desktop, that uses an Atheros chip based card.

So I think it is related to the RaLink chip on the USB dongle.

Anyway, wpa_supplicant keeps dying during boot, and I have to manually repeat the process every time.

What could be the reason?

Thank you!
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 14, 2017, 11:44:06 PM
Although entering those commands manually result in a connection, I forgot to mention that it takes about 2 minutes to get a lease from DHCP server after issuing /usr/sbin/wpa_supplicant -s -i wlan1 -B -P /var/run/wpa_supplicant-wlan1.pid -c /var/etc/wpa_supplicant-wlan1.conf

All my other devices, Android, Linux, Windows, FreeBSD based, connect and get leases from the same server in just a few seconds.

Now I'm stuck.

T.y.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 15, 2017, 10:11:47 AM
Good morning,

Testing b139 now. Yes, that new configuration for wpa_supplicant:

Code: [Select]
$ cat /var/etc/wpa_supplicant-wlan1.conf

fast_reauth=1
ap_scan=1
eapol_version=2

network={
scan_ssid=1
key_mgmt=WPA-PSK
ssid="testing"
psk="poiuytrewq"
proto=WPA RSN
pairwise=TKIP CCMP
}

works, but wpa_supplicant seems to keep dying during system boot.

I still have to manually enter the wpa_supplicant sequence commands and wait about 2 to 3 minutes for it to get a DHCP lease.

Here we go again!

I'm gonna configure and try different DHCP server hardware and see what happens with this very same t1n1wall config.

Brb...
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 15, 2017, 11:26:49 AM
Hi,

in regard to my last reply:

Same behavior using different servers/config: a delay of about 2 to 3 minutes to get a lease.

And wpa_supplicant keeps dying on boot.

Could something like ifconfig_wlan1="WPA SYNCDHCP" help in this case?

Thank you.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 15, 2017, 04:12:30 PM
Searching the internet, I've found this:

https://forums.freebsd.org/threads/46940/ (https://forums.freebsd.org/threads/46940/)

Can this be useful?

P.S.: If I use static addresses on WAN interface, system gets connected immediately after manually issuing the wpa_supplicant command.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 15, 2017, 06:28:12 PM
Analyzing dmesg I noticed that run0 firmare (run0: firmware RT3071 ver. 0.33) is loaded twice during boot process:

Code: [Select]
$ dmesg
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0: Wed Feb 15 08:45:33 GMT 2017
    [email protected]:/usr/t1n1wall/build11/tmp/sys/i386/compile/T1N1WALL_GENERIC i386
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
CPU: Geode(TM) Integrated Processor by AMD PCS (498.06-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x5a2  Family=0x5  Model=0xa  Stepping=2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>
real memory  = 247357440 (235 MB)
avail memory = 202137600 (192 MB)
random: entropy device external interface
wlan: mac acl policy registered
kbd1 at kbdmux0
K6-family MTRR support enabled (2 registers)
cryptosoft0: <software crypto> on motherboard
acpi0: <GENSW OEM00001> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x73 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x9c10-0x9c13 on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pcib0: Length mismatch for 3 range: bff00000 vs bfefffff
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> mem 0xe0000000-0xe0ffffff,0xe1000000-0xe1003fff,0xe1004000-0xe1007fff,0xe1008000-0xe100bfff,0xe100c000-0xe100ffff irq 11 at device 1.1 on pci0
vgapci0: Boot video device
pci0: <encrypt/decrypt, entertainment crypto> at device 1.2 (no driver attached)
rl0: <RealTek 8139 10/100BaseTX> port 0xf800-0xf8ff mem 0xe1014000-0xe10140ff irq 10 at device 13.0 on pci0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> PHY 0 on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
rl0: Ethernet address: 18:40:14:00:70:20
isab0: <PCI-ISA bridge> port 0xf400-0xf407,0xf000-0xf0ff,0xec00-0xec3f,0xe800-0xe81f,0xe400-0xe47f,0x9c40-0x9c7f at device 15.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD CS5536 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xdc00-0xdc0f at device 15.2 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pci0: <multimedia, audio> at device 15.3 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xe1015000-0xe1015fff irq 11 at device 15.4 on pci0
usbus0 on ohci0
ehci0: <AMD CS5536 (Geode) USB 2.0 controller> mem 0xe1016000-0xe1016fff irq 11 at device 15.5 on pci0
ehci0: pre-2.0 USB revision (ignored)
usbus1: EHCI version 1.0
usbus1 on ehci0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xd27ff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
ugen1.1: <AMD> at usbus1
uhub0: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.1: <AMD> at usbus0
uhub1: <AMD OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
md0: Preloaded image </mfsroot> 24145920 bytes at 0xc10c64a8
g_access(918): provider md0a has error
g_access(918): provider md0a has error
g_access(918): provider md0a has error
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <EXPERT FIC 30/06/03> ATA device
ada0: Serial Number FIC00001
ada0: 16.700MB/s transfers (PIO4, PIO 512bytes)
ada0: 249MB (510976 512 byte sectors)
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
taskqgroup_adjust failed cnt: 1 stride: 1 mp_ncpus: 1 smp_started: 0
Timecounter "TSC" frequency 498061562 Hz quality 800
Trying to mount root from ufs:/dev/md0 []...
uhub1: 4 ports with 4 removable, self powered
stray irq7
stray irq7
uhub0: 4 ports with 4 removable, self powered
random: unblocking device.
ugen1.2: <Ralink> at usbus1
rum0: <Ralink 802.11 bg WLAN, class 0/0, rev 2.00/0.01, addr 2> on usbus1
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528
glxsb0: <AMD Geode LX Security Block (AES-128-CBC, RNG)> mem 0xe1010000-0xe1013fff irq 11 at device 1.2 on pci0
rl0: link state changed to DOWN
done
stray irq7
wlan0: Ethernet address: 00:b0:8c:01:8c:c3
ugen0.2: <vendor 0x04d9> at usbus0
ukbd0: <vendor 0x04d9 product 0x1400, class 0/0, rev 1.10/1.43, addr 2> on usbus0
kbd2 at ukbd0
ugen1.3: <Ralink> at usbus1
run0: <1.0> on usbus1
run0: MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R), address 7c:dd:90:a1:f7:89
wlan1: Ethernet address: 7c:dd:90:a1:f7:89
run0: firmware RT3071 ver. 0.33 loaded
done
done
pflog0: promiscuous mode enabled
ifa_maintain_loopback_route: insertion failed for interface wlan1: 17
run0: firmware RT3071 ver. 0.33 loaded
wlan1: link state changed to UP
too many stray irq 7's: not logging anymore

Can that point the reason of wpa_supplicant's "death"?

I think the system is disconnecting interface wlan1 somehow, so wpa_supplicant loses it and dies in the sequence, then wlan1 reconnects again. (?)

And about the line: ifa_maintain_loopback_route: insertion failed for interface wlan1: 17 ??

Enabling or disabling System: Advanced setup --> Additional firmware --> Enable Ralink USB wireless devices
has no effect on wpa_supplicant boot behavior.

As a workaround, maybe running wpa_supplicant later in the boot process could do the trick?

Thanks in advance.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on February 15, 2017, 09:53:15 PM
I posted an updated version last night, can you test with that ?  it adds the eapol config , but also changes the flags to log properly (it wasn't actually logging correctly), so hopefully you might see some logs now with errors for wpa_supplicant on boot !

Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 15, 2017, 11:37:48 PM
Yes, I downloaded the last version (b139) and performed those tests with it.

Gonna analyze the logs better and see if I can find something relevant.

Thanks.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 16, 2017, 01:01:19 AM
I am using t1n1wall generic-pc-2.11.1b139.img

Well,

I couldn't find anything inside /var/log

Code: [Select]
$ ls /var/log
dhcpd.log
dmesg.boot
filter.log
portalauth.log
system.log
vpn.log

and its files related to wpa_supplicant, or wlan1 besides this (last part of /var/log/system.log):

Code: [Select]
Feb 15 22:26:59 cp-charlie2 kernel: run0: <1.0> on usbus1
Feb 15 22:26:59 cp-charlie2 kernel: run0: MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R), address 7c:dd:90:a1:f7:89
Feb 15 22:26:59 cp-charlie2 kernel: wlan1: Ethernet address: 7c:dd:90:a1:f7:89
Feb 15 22:26:59 cp-charlie2 kernel: run0: firmware RT3071 ver. 0.33 loaded
Feb 15 22:26:59 cp-charlie2 kernel: done
Feb 15 22:26:59 cp-charlie2 kernel: done
Feb 15 22:26:59 cp-charlie2 kernel: pflog0: promiscuous mode enabled
Feb 15 22:26:59 cp-charlie2 kernel: done
Feb 15 22:27:04 cp-charlie2 dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 12
Feb 15 22:26:59 cp-charlie2 last message repeated 2 times
Feb 15 22:27:04 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:04 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:04 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:04 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:14 cp-charlie2 ntpd[105]: no reply received in time, skipping initial time setting
Feb 15 22:27:14 cp-charlie2 kernel: done
Feb 15 22:27:16 cp-charlie2 dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 16
Feb 15 22:27:15 cp-charlie2 last message repeated 2 times
Feb 15 22:27:16 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:16 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:16 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:16 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:32 cp-charlie2 dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 17
Feb 15 22:27:32 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:32 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:32 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:32 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:49 cp-charlie2 dhclient: DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 10
Feb 15 22:27:49 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:49 cp-charlie2 dhclient: send_packet: Network is down
Feb 15 22:27:49 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:49 cp-charlie2 dhclient: dhclient.c:2303: Failed to send 300 byte long packet over wlan1 interface.
Feb 15 22:27:59 cp-charlie2 dhclient: No DHCPOFFERS received.
Feb 15 22:27:59 cp-charlie2 dhclient: No working leases in persistent database - sleeping.
Feb 15 22:28:12 cp-charlie2 hostapd: wlan0: STA 00:1d:0f:d9:7c:93 IEEE 802.11: associated
Feb 15 22:28:12 cp-charlie2 hostapd: wlan0: STA 00:1d:0f:d9:7c:93 RADIUS: starting accounting session 0CBE54D6-00000000
Feb 15 22:28:12 cp-charlie2 hostapd: wlan0: STA 00:1d:0f:d9:7c:93 WPA: pairwise key handshake completed (RSN)
Feb 15 22:28:13 cp-charlie2 kernel: too many stray irq 7's: not logging anymore

Also, status.php points to nothing related to wpa_supplicant... and the pure dump of dmesg I already posted second to last reply.

What should I do now?

Tks.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: andywhite on February 18, 2017, 07:43:39 PM
Please try b140.  wpa_supplicant was exiting before syslog started to record that it was exiting.

b140 starts syslog earlier, and also fixes the reason why it was exiting (due to the interface going down in the wan configuration code)
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 20, 2017, 02:46:33 AM
G'night!

Well, good news and bad news using b140.

Now my t1n1wall unit connects to the DHCP server thru WAN just fine and fast, as expected. wpa_supplicant seems to be running nicely.

But I can only check the system status via console now. For some reason b140 introduced a problem:

it just stopped broadcasting the LAN's SSID in AP mode (it is not hidden), so I cannot connect to it and access to check it via webGUI.

I reseted the system to factory defaults, made a fresh & clean reinstall via dd, but it didn't solve the problem.

I think we're almost there...

Regards.
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 20, 2017, 03:40:04 AM
Hello,

it is worth to mention that if I change position of the dongles on the thin client usb ports, LAN starts to broadcast SSID again, but now it can't assign a DHCP lease to my computer, as if all the problem was inverted from WAN to LAN:

My desktop's ifconfig dump:

Code: [Select]
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:1d:0f:xx:xx:xx
inet6 fe80::21d:fff:fed9:7c93%wlan0 prefixlen 64 scopeid 0x4
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11g
status: associated
ssid TestLAN channel 11 (2462 MHz 11g) bssid 00:b0:8c:01:8c:c3
regdomain FCC country US indoor ecm authmode WPA2/802.11i privacy ON
deftxkey UNDEF TKIP 2:128-bit txpower 30 bmiss 7 scanvalid 60
protmode CTS wme burst roaming MANUAL
groups: wlan
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on February 24, 2017, 03:20:29 AM
Hi,

Now that t1n1wall b140 made wpa_supplicant work correctly, it looks like hostapd is the one now being killed for some reason:

Code: [Select]
$ ps ax
PID TT  STAT     TIME COMMAND
  0  -  DLs   0:00.34 [kernel]
  1  -  ILs   0:00.05 /sbin/init --
  2  -  DL    0:00.00 [crypto]
  3  -  DL    0:00.00 [crypto returns]
  4  -  DL    0:00.00 [cam]
  5  -  DL    0:00.53 [pf purge]
  6  -  DL    0:00.29 [rand_harvestq]
  7  -  DL    0:00.11 [md0]
  8  -  DL    0:00.00 [soaiod1]
  9  -  DL    0:00.00 [soaiod2]
 10  -  RL   10:05.11 [idle]
 11  -  WL    0:01.32 [intr]
 12  -  DL    0:00.00 [ng_queue]
 13  -  DL    0:00.00 [geom]
 14  -  DL    0:01.18 [usb]
 15  -  DL    0:00.00 [soaiod3]
 16  -  DL    0:00.00 [soaiod4]
 17  -  DL    0:00.02 [pagedaemon]
 18  -  DL    0:00.00 [pagezero]
 19  -  DL    0:00.00 [idlepoll]
 20  -  DL    0:00.01 [bufspacedaemon]
 21  -  DL    0:00.01 [bufdaemon]
 22  -  DL    0:00.01 [vnlru]
 23  -  DL    0:00.03 [syncer]
 24  -  DL    0:00.00 [flowcleaner]
 48  -  Ss    0:00.05 /usr/sbin/syslogd -ss
 93  -  Ss    0:00.02 /usr/sbin/wpa_supplicant -s -i wlan1 -B -P /var/run/wpa_s
 97  -  Is    0:00.01 /sbin/dhclient -nw -cf /var/etc/dhclient.conf -sf /sbin/d
120  -  Ss    0:00.05 /sbin/pfmon pflog0 /var/run/pfmon.pid
124  -  Ss    0:00.04 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxp
129  -  S<s   0:00.06 ntpd: ntp engine (ntpd)
130  -  Is    0:00.02 ntpd: dns engine (ntpd)
143  -  I<s   0:00.00 ntpd: [priv] (ntpd)
148  -  I     0:00.01 /usr/local/sbin/dnsmasq --conf-dir=/var/etc/dnsmasq
159  -  I     0:00.03 /bin/sh /etc/rc.initial console
287  -  SN    0:00.43 /usr/local/bin/php exec.php
288  -  Z     0:00.00 <defunct>
289  -  S     0:00.00 /usr/local/sbin/mini_httpd -c **.php|**.cgi -u root -maxp
290  -  RN    0:00.05 ps ax

In order to access webGUI, now I have to connect an ethernet cable to OPT1 (rl0 bridged to LAN) and manually remove the usb dongle (rum0) assigned to LAN.

Then reinserting the dongle and executing ifconfig wlan0 create wlandev rum0 and ifconfig wlan0 192.168.2.1 netmask 255.255.255.0 to reconfigure the interface:

Code: [Select]
$ ifconfig
rl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2008<VLAN_MTU,WOL_MAGIC>
ether 18:40:14:00:70:20
inet6 fe80::1a40:14ff:fe00:7020%rl0 prefixlen 64 scopeid 0x1
inet 192.168.2.2 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
enc0: flags=41<UP,RUNNING> metric 0 mtu 1536
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33184
groups: pflog
wlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 7c:dd:90:a1:f7:89
inet6 fe80::7edd:90ff:fea1:f789%wlan1 prefixlen 64 scopeid 0x6
inet 192.168.1.12 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=61<PERFORMNUD,AUTO_LINKLOCAL,NO_RADR>
media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
status: associated
ssid "testing" channel 1 (2412 MHz 11g) bssid 72:59:b1:34:ca:45
regdomain FCC country US authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 60
protmode CTS wme roaming MANUAL
groups: wlan
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether ae:0f:55:ab:2a:06
nd6 options=1<PERFORMNUD>
groups: bridge
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: rl0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
        ifmaxaddr 0 port 1 priority 128 path cost 55
wlan0: flags=8c02<BROADCAST,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:b0:8c:01:8c:c3
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::2b0:8cff:fe01:8cc3%wlan0 prefixlen 64 tentative scopeid 0x5
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 7 (2442 MHz 11g)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme
groups: wlan

But if I try to run hostapd -B -P /var/run/hostapd-wlan0.pid /var/etc/hostapd-wlan0.conf, it gives me this:

Code: [Select]
$ hostapd -B -P /var/run/hostapd-wlan0.pid /var/etc/hostapd-wlan0.conf
Configuration file: /var/etc/hostapd-wlan0.conf
bsd_set_if_media: SIOCSIFMEDIA Device not configured
bsd_init: failed to set operation mode
bsd driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started
ELOOP: remaining socket: sock=6 eloop_data=0x28c52000 user_data=0x0 handler=0x81f6650

I hope that such info can help someway.

TY
Title: Re: Can't assign wlan device on generic-pc-2.11.1b133
Post by: skua on March 08, 2017, 03:17:45 PM
Hello...

Still stuck here. Any help?