WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wifi is eth1 - Fn keys  (Read 2370 times)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
wifi is eth1 - Fn keys
« on: June 18, 2015, 06:28:46 PM »
Hi,

Core 6.x x86.

I have installed a Broadcom wireless card into my netbook that I gathered from a dead laptop.
Code: [Select]
02:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)

Using boot code  blacklist=ssb,b43,bcma .

It works but ...

1).
It's indicated as eth1 (eth0 is actal wired ethernet).
Can I make it show as wlan0?

2).
The module (wl-modules-3.16.6-tinycore.tcz) has to be loaded while the wifi is activated (via Fn keys).
Otherwise it won't be able to lurk for connections unless I  rmmod wl  an then  modprobe wl  (again, if wifi is activated via Fn keys).

Also,  dmesg  spits out these messages about Unknown keys.
Code: [Select]
atkbd serio0: Unknown key pressed (translated set 2, code 0xf6 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.
atkbd serio0: Unknown key released (translated set 2, code 0xf6 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.
cfg80211: Calling CRDA to update world regulatory domain
wl: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint
eth1: Broadcom BCM4315 802.11 Hybrid Wireless Controller 6.30.223.248 (r487574)
atkbd serio0: Unknown key pressed (translated set 2, code 0xf6 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.
atkbd serio0: Unknown key released (translated set 2, code 0xf6 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.
atkbd serio0: Unknown key pressed (translated set 2, code 0xe2 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e062 <keycode>' to make it known.
atkbd serio0: Unknown key released (translated set 2, code 0xe2 on isa0060/serio0).
atkbd serio0: Use 'setkeycodes e062 <keycode>' to make it known.

Thanks.


I wasn't happy with the driver for the wireless card (Realtek RTL8187SE) that was installed in my netbook.
Bad signal strength and random loss of connection - both Core 5.x and 6.x.
In 6.x, Fn keys didn't work - though no external driver needed.
In 5.x, Fn keys did work - wl-r8187se-KERNEL.tcz was needed.
But it showed as wlan0 - both Core 5.x and 6.x.
« Last Edit: June 18, 2015, 06:31:13 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: wifi is eth1 - Fn keys
« Reply #1 on: June 19, 2015, 04:24:40 AM »
You can use the built-in nameif tool to rename network interfaces.
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: wifi is eth1 - Fn keys
« Reply #2 on: June 19, 2015, 08:21:19 AM »
Thanks curaga,
this works
Code: [Select]
sudo nameif wlan0 `cat /sys/class/net/eth1/address`

I'd like it to be automated via bootlocal.sh and also to work on other computers too without messing up anything in case of different interface names and (not)present hardware.
I hacked this together:
Code: [Select]
# Rename wifi eth* to wlan*.
IFNUM=0
for i in /sys/class/net/eth* ; do
if [ -d $i/wireless ]; then
[ -e /sys/class/net/wlan${IFNUM} ] && IFNUM=$((IFNUM+1))
nameif wlan${IFNUM} `cat $i/address`
IFNUM=$((IFNUM+1))
fi
done

Would be great if anyone could tell me if the directory  /sys/class/net/?/wireless  does always exist if it is a wireless device? Alternatively I could use the file  /sys/class/net/?/uevent  which contains the text "DEVTYPE=wlan" (again, not sure if always true).
Any other advice related my scripting is very welcome as well.

Cheers!
Download a copy and keep it handy: Core book ;)