Skip to main content
Topic: CLI to enable and get connected to internet (by wifi) as in CL Iso installer (Read 880 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CLI to enable and get connected to internet (by wifi) as in CL Iso installer

How to really get connected into internet by wifi when being in Artix CLI installer / ISO as:

Code: [Select]
$ rc-status
Runlevel: default
 syslog-ng                                                                                                [  started 01:09:39 (0) ]
 acpid                                                                                                    [  started 01:09:39 (0) ]
 artix-live                                                                                                           [  started  ]
 dbus                                                                                                     [  started 01:09:41 (0) ]
 connmand                                                                                                 [  started 01:09:40 (0) ]
 bluetoothd                                                                                               [  started 01:09:40 (0) ]
 cronie                                                                                                   [  started 01:09:39 (0) ]
 cupsd                                                                                                    [  started 01:09:39 (0) ]
 netmount                                                                                                             [  started  ]
 lightdm                                                                                                  [  started 01:09:38 (0) ]
 pacman-init                                                                                                          [  started  ]
 local                                                                                                                [  started  ]
 agetty.tty1                                                                                              [  started 01:09:27 (0) ]
 agetty.tty2                                                                                              [  started 01:09:27 (0) ]
 agetty.tty3                                                                                              [  started 01:09:27 (0) ]
 agetty.tty4                                                                                              [  started 01:09:27 (0) ]
 agetty.tty5                                                                                              [  started 01:09:27 (0) ]
 agetty.tty6                                                                                              [  started 01:09:27 (0) ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 avahi-daemon                                                                                             [  started 01:09:39 (0) ]
 haveged                                                                                                  [  started 01:09:40 (0) ]
 gnupg-mount                                                                                                          [  started  ]
Dynamic Runlevel: manual
 openrc-settingsd


means all works, and after artix-chroot,
still not really enabled and connected to internet even if

Code: [Select]
rc-service connmand restart
rc-service netmount restart

was done
So what definitive command to  really enabled and connected to internet when being there

Re: CLI to enable and get connected to internet (by wifi) as in CL Iso installer

Reply #1
...
So what definitive command to  really enabled and connected to internet...
Search for connmanctl  keyword returns several topics, which describe how to establish WiFi connection using ConnMan  in base Artix ISO:
  - here
  - here
  - here

WiFI connection is fulfilled by wpa_supplicant.  ArchWiki describes how to configure wpa_supplicant.  The article requires thorough reading and much patience.  ConnMan is not required for wpa_supplicant to work and to connect to WiFi.

ConnMan merely simplifies initial Wifi configuration and connection, occasional re-configurations, auto-connections.  Six ConnMan commands are sufficient to be connected through WiFi.  Remember, the real WiFi job is still performed by wpa_supplicant, in background.

Follows a brief ConnMan summary.  The example uses my (scrambled) WiFi ID - use yours instead.  There's no need to type in long hex WiFi ID entirely - ConnMan supports TAB-expansion.  Type in a few initial chars, sufficient to uniquely identify your ID, then hit TAB to expand it.

Code: [Select]
# connmanctl technologies
# connmanctl enable wifi
# connmanctl services
# connmanctl
connmanctl> agent on
connmanctl> connect wifi_bc723779b87b_4187222f64526f6d+managed_psk
[--> agent asks for passphrase to connect <--]
connmanctl> quit
# ping artixlinux.org
PING artixlinux.org (104.21.79.75) 56(84) bytes of data.
64 bytes from 104.21.79.75 (104.21.79.75): icmp_seq=1 ttl=57 time=11.1 ms
64 bytes from 104.21.79.75 (104.21.79.75): icmp_seq=2 ttl=57 time=10.9 ms
64 bytes from 104.21.79.75 (104.21.79.75): icmp_seq=3 ttl=57 time=11.2 ms
64 bytes from 104.21.79.75 (104.21.79.75): icmp_seq=4 ttl=57 time=17.9 ms
^C
--- artixlinux.org ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 10.936/12.789/17.880/2.940 ms
#
These should be the first commands, executed right after you're logged in into base ISO bash shell.

Edit: IIRC, connman is not transferred from the base ISO into installed system.  It's a pure bash, without Xorg and without DE.  If you wish to continue using it with ConnMan, then you should:
  - explicitly install connman-... package, corresponding to chosen init system
  - repeat six ConnMan commands above to get connected in the installed system

Re: CLI to enable and get connected to internet (by wifi) as in CL Iso installer

Reply #2
So sorry, still have not tested into real doing so just ask back again, which connmanctl CLI  actually would really work i.e. would ask user to enter wifi password then having all set and running right off smoothly ?

Re: CLI to enable and get connected to internet (by wifi) as in CL Iso installer

Reply #3
You'll be asked for WiFi passphrase by the command (use your WiFi ID, not mine):
Code: [Select]
connmanctl> connect wifi_bc723779b87b_4187222f64526f6d+managed_psk
This command is entered in ConnMan shell:
Code: [Select]
connmanctl>
You enter in ConnMan shell from root bash shell with the command:
Code: [Select]
# connmanctl
If you add connman-[your-init-system] package to the installed system, and repeat six connection steps inside it, then ConnMan will automagically reconnect you to WiFi on each boot, without asking for password.

Re: CLI to enable and get connected to internet (by wifi) as in CL Iso installer

Reply #4
"use your WiFi ID"

How to have one, our own  WiFi ID ?

Re: CLI to enable and get connected to internet (by wifi) as in CL Iso installer

Reply #5
You'll find your own WiFi ID in the list of nearby WiFi networks, returned by the command:
Code: [Select]
# connmanctl services
Simply execute the commands I wrote in sequence, from first to last, from top to bottom.  It's counterproductive to learn them in reversed order, from last to first, from bottom to top.