How do I set up WIFI to start automatically[Solved]

Help with setting up network cards, including WiFi cards.
plumtreed
Posts: 68
Joined: Sat Nov 03, 2018 7:14 am
Location: Australia

How do I set up WIFI to start automatically[Solved]

Post by plumtreed »

I have wifi working on my GhostBSD install.......I am using an Edimax USB adaptor which I thought would be easier than trying to get myBCM4312 going.

The problem is that I have to start it manually in a terminal via two commands "/etc/rc.d/netif restart" and "/etc/rc.d/routing restart"

This brings it up as WIFI 2 in Network manager and it connects and runs OK.......Network manager doesn't show any other connections which usually appear. ........I don't know how to configure WIFI 2 to start automatically!
Last edited by plumtreed on Sat Feb 02, 2019 9:47 pm, edited 1 time in total.
plumtreed
Posts: 68
Joined: Sat Nov 03, 2018 7:14 am
Location: Australia

Re: How do I set up WIFI to start automatically

Post by plumtreed »

..........don't think there is an answer to this........there is no way to 'edit' network manager.
User avatar
NevilleGoddard
Developer
Posts: 517
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan

Re: How do I set up WIFI to start automatically

Post by NevilleGoddard »

Hi. Sorry about the trouble you're having.
What is the output of

rc-status

and

rc-status --crashed
plumtreed
Posts: 68
Joined: Sat Nov 03, 2018 7:14 am
Location: Australia

Re: How do I set up WIFI to start automatically

Post by plumtreed »

Hello, thanks and as requested rc-status & crashed


Runlevel: default
dbus [ started 00:08:52 (0) ]
webcamd [ started ]
devfs [ started ]
moused [ started ]
netmount [ started ]
local [ started ]
xconfig [ crashed ]
hald [ started ]
cupsd [ started 00:08:51 (0) ]
slim [ started ]
Dynamic Runlevel: hotplugged
moused.psm0 [ started ]
dhcpcd.wlan1 [ started ]
wpa_supplicant.wlan1 [ started ]
wpa_supplicant.wlan0 [ started ]
Dynamic Runlevel: needed/wanted
ldconfig [ started ]
var [ started ]
cleanvar [ started ]
tmp [ started ]
cleartmp [ started ]
Dynamic Runlevel: manual
root@plumtreed:/usr/home/plumtreed/Desktop # rc-status --crashed
xconfig

..............clearly xconfig has crashed but where to from here?
User avatar
NevilleGoddard
Developer
Posts: 517
Joined: Thu Dec 22, 2016 10:30 pm
Location: Japan

Re: How do I set up WIFI to start automatically

Post by NevilleGoddard »

Maybe the problem is that you have 2 wlan devices. Try disabling wlan0 in the bios. This may fix the problem. What is wlan0? What is the chipset? Is it not supported?
plumtreed
Posts: 68
Joined: Sat Nov 03, 2018 7:14 am
Location: Australia

Re: How do I set up WIFI to start automatically

Post by plumtreed »

Wlan0 is bcm4312 (802.11b/g LP-PHY) which has been difficult to set up in BSD................but my initial 'boot-up' of a 'live' usb installer dongle on a desktop without a wired connection showed that wifi was working with the Edimax dongle fitted and all I had to do was put in a password!

Things didn't go so well on the installed version and it has been necessary to manipulate things to get both wired and wireless to work.

I am not able to disable wlan0(wifi1) in the bios.........but thanks for the idea.......I'll try to get the bcm4312 working;(
wb7odyfred
Posts: 203
Joined: Sat Nov 12, 2016 5:44 pm

Re: How do I set up WIFI to start automatically

Post by wb7odyfred »

https://forums.ghostbsd.org/viewtopic.p ... e511#p6436

Read my post on setting up wifi manually. Edit the three files.


Hope this helps a little. Lots of URL. links you can read.

There is a command called wlandebug that you can read about to help you.
Yes I wonder how FreeBSD deals with more than one wifi device. Plumtreed, Please reply back here and share what you learn so others can be efit from your research.

Wifimgr application was searching for a term like WPA in the output description from the networking details to determine which network interface was WIFI interface. Maybe something similar for Network mgr APPLication uses to determine which network interface is the right wifi interface to activate.
plumtreed
Posts: 68
Joined: Sat Nov 03, 2018 7:14 am
Location: Australia

Re: How do I set up WIFI to start automatically

Post by plumtreed »

Thanks ....Fred, I have already read thru what you have set out..........I do have have a result but it is pretty messy. I have wifi but it needs manual input to get it up.....and then it is not inclined to stay if it goes into sleep mode.

I guess having two wifi devices may be a problem.....dunno?
wb7odyfred
Posts: 203
Joined: Sat Nov 12, 2016 5:44 pm

List some system information from your GhostBSD system

Post by wb7odyfred »

can you post some information like output from your freebsd system? Your post will benefit others using a Edimax USB nano Dongle and having a 2nd Wifi interface. You can read https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 Edimax EW-7811un Wifi USB nano dongle; 10.3 & 11.0 setup for my values using the Edimax from these same commands or this URL https://forums.ghostbsd.org/viewtopic.php?f=64&t=570 RealTek RTL8188CE Wii-Fi PCI network hardware setup
https://www.freebsd.org/cgi/man.cgi?que ... ease-ports FreeBSD man page for rtwn(4) merged RealTek driver

Code: Select all

kldstat
pciconfi -lv
usbconfig list
usbconfig  dump_device_desc
dmesg | tail -20
sysctl -n net.wlan.devices
uname -a
Quote the contents of those three files and show us how you set them up.
In this example below, I was creating a device wlan2 to use for the wifi network connection to not interfere with the Broadcom BCM4312 wifi device.
So I am unsure if urtwn0 is correct nomenclature for creating a wlan2 network interface name?

# 3 Files to add configuration lines into /boot/loader.conf /etc/rc.conf /etc/wpa_supplicant.conf
#/boot/loader.conf

Code: Select all

if_urtwn_load="YES"
legal.realtek.license_ack=1
# /etc/rc.conf add 2 lines for Edimax EW-7811utn. creating a wlan2 network interface name to use

Code: Select all

wlans_urtwn0="wlan2"
ifconfig_urtwn0="DHCP"
# /etc/wpa_supplicant.conf for an Open Network connection

Code: Select all

network={
 	ssid="innflux"
        key_mgmt=NONE
}
Maybe in your .bashrc file you can place some commands that would enable automatic / manual boot wifi when you login?? I did see instructions for using the BCM4312 wifi interface. I will place them in the following post.

kldunload or kldload command might help in disabling the BCM4312 wifi interface or just using the correct network name interface.
I am going by memory because I am running http://Q4OS.org Debian 9 "Stretch" software and don't have a running GhostBSD yet available.

Fred

Use the following line for testing with the Debug and Password debug printout options. The wpa_supplicant sets up the PSK or WEP or WPA2 details Wpa_supplicant command is not needed for an "OPEN" network connection but issue this command anyway for completeness. The dhclient command request a DHCP IP allocation for your network connection wlan2. Change urtwn0 to match your wifi device kernel driver file??? Maybe with the new TrueOS Kernel 18.12 based on FreeBSD 12, the wifi device kernel driver is rtwn0? Please post what driver name "rtwn0" for RealTek RTL8192cu works for your GhostBSD 18.12 installation.

Code: Select all

ifconfig wlan2 create wlandev rtwn0
https://gnix0.wordpress.com/2018/03/07/ ... reebsd-11/
https://www.freebsd.org/cgi/man.cgi?que ... ease-ports FreeBSD man page for rtwn(4) merged RealTek driver

Code: Select all

ifconfig wlan2 create wlandev urtwn0
killall dhclient
wpa_supplicant -d -K -i wlan2 -c /etc/wpa_supplicant.conf 
dhclient wlan2 

Manually issue the wpa_supplicant with the background Dameon option and dhclient commands

Code: Select all

killall dhclient
wpa_supplicant -B -i wlan2 -c /etc/wpa_supplicant.conf 
dhclient wlan2
# restart the two network services: network interface and network routing

Code: Select all

service  netif restart
service routing restart
Refernce URL Forum posts

Other URL Links to read
https://forums.ghostbsd.org/viewtopic.php?f=64&t=1165 Re: Try these manual steps to enable networking.
https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 Edimax EW-7811un Wifi USB nano dongle; 10.3 & 11.0 setup
https://forums.ghostbsd.org/viewtopic.php?f=64&t=570 RealTek RTL8188CE Wii-Fi PCI network hardware setup
https://gnix0.wordpress.com/2018/03/07/ ... reebsd-11/ Setup USB Wireless adapter FreeBSD 11
https://unix.stackexchange.com/question ... d-live-usb Intel iwm 8000 driver
https://forums.freebsd.org/threads/wifi ... ont.67487/ urtwn and rtwn driver
https://www.freebsd.org/cgi/man.cgi?que ... ease-ports FreeBSD man page for rtwn(4) merged RealTek driver


use Netstat commands to list out the new network interface connections
use Sockstat commands to list out the socket connections

Code: Select all

netstat -r
or network status interface

Code: Select all

netstat -i
or socket status ipv4

Code: Select all

sockstat -4
Check connectivity with ping command to a specific IP address like Google Domain Name service
Ping google Domain Naming Service (DNS) 3 times.

Code: Select all

ping -c 3 8.8.8.8
Ping Open Domain Naming Service (DNS) 3 times.

Code: Select all

ping -c 3 208.67.222.222
Ping Hurricane Electric Internet Service Provider 3 times.

Code: Select all

ping -c 3 he.net
Ping an OpenNic DNS server in Colorado ns4.co.us.dns.opennic.glue https://servers.opennicproject.org/

Code: Select all

ping -c 3 63.231.92.27
http://sleepyhead.de/howto/?href=network Various OS including FreeBSD networking commands.

# Several manual pages to read more about wlan device drivers for FreeBSD

Code: Select all

man wlan
man rtwn
man utrwn
man rtwn_pci
man rtwn_usb
man rtwnfw
man wlandebug
man sysctl
# Use wlandebug and sysctl -a | grep wlan to explore settings and debug non-working system problems.

Code: Select all

wlandebug --help
sysctl -a | grep wlan
wb7odyfred
Posts: 203
Joined: Sat Nov 12, 2016 5:44 pm

Re: How do I set up WIFI for BCM4312 Broadcom device

Post by wb7odyfred »

https://basicbsd.wordpress.com/2018/01/ ... ebsd-11-1/
I copied the following post from the above URL.

To load the required modules into the kernel, you need the kernel source code. Use subversion to download and unpack into the correct location:

Code: Select all

svnlite checkout https://svn.freebsd.org/base/releng/11.1/ /usr/src
Before downloading the required kernel modules, update and download the ports tree:

Code: Select all

portsnap fetch extract
Build and install Portmaster for simpler port management:

Code: Select all

cd /usr/ports/ports-mgmt/portmaster
make install clean
Then install the Broadcom BCM 4312 modules:

Code: Select all

portmaster sysutils/b43-fwcutter net/bwn-firmware-kmod
Instruct FreeBSD to load modules into the kernel during boot by adding the following lines to /boot/loader.conf

Code: Select all

siba_bwn_load="YES"
if_bwn_load="YES"
bwn_v4_lp_ucode_load="YES"
If you don’t have the Broadcom BCM4312 low power model as is installed in this system, change the last line to:

Code: Select all

bwn_v4_ucode_load="YES"
Now edit the system processes file /etc/rc.conf and add the following lines:

Code: Select all

wlans_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
Create the /etc/wpa_supplicant.conf file to setup WiFi details as follows:

Code: Select all

network={
 ssid="YOUR WIFI NETWORK"
 psk="YOUR WIFI PASSWORD"
}
Reboot the system with

Code: Select all

shutdown -r now
and you should have WiFi up and running.

https://www.freebsd.org/cgi/man.cgi?bwn(4) FreeBSD Man page for bwn driver.
https://www.freebsd.org/cgi/man.cgi?que ... +and+Ports FreeBSD 12.0 Man page for bhnd driver
http://landonf.org/code/freebsd/Broadco ... 80122.html Bhnd driver details and supported chip set page. Landon Fuller FreeBSD Broadcom Wi-Fi Improvements
07 Feb 2018, 17:13 PST
https://www.youtube.com/watch?reload=9&v=rOyjhVzQ1vo FreeBSD BCM4312: bwn driver - Notes on installation and configuration
Post Reply