nmcli to connect to specific bssid in ubuntu 16.04 - ubuntu-16.04

I have two diff wifi APs with same SSID.
I tried to use nmcli to connect to a specific BSSID but failed.
Can anybody help?
# nmcli -f "in-use,ssid,mode,chan,rate,signal,bars,security,bssid" dev wifi list |grep "AC5300 "
* ASUS_AC5300 Infra 9 54 Mbit/s 100 ▂▄▆█ WPA2 34:97:F6:6E:31:20
ASUS_AC5300 Infra 10 54 Mbit/s 82 ▂▄▆█ WPA2 88:D7:F6:88:AC:30
# nmcli dev wifi connect ASUS_AC5300 bssid 88:D7:F6:88:AC:30
Error: Failed to add/activate new connection: Active connection removed before it was initialized
This command seems to be worked on ubuntu 14.04. I dunno why.

Related

esm_cache.py crash with no network connectivity after

I've recently updated Ubuntu to 22.04, and it seemed to work perfectly fine for about 2 weeks. Yesterday while launching Rstudio I got a message about an internal error with title "esm_cache.py crashed with apt.cache.FetchFailedException" relating to package ubuntu-advantage-tools 27.13.2-22.04.1.
Afterwards I completely lost network connection and can't restore it in any way. This is a dual boot system, and the same ethernet cable still works on Windows 11.
I am very new to Ubuntu and am not able to think of any solution short of re-installing the system from scratch. After a search for similar issues, I tried to do some diagnostics:
sudo lshw -C network
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci#0000:04:00.0
version: 15
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list
configuration: latency=0
resources: ioport:f000(size=256) memory:fc604000-fc604fff memory:fc600000-fc603fff
nmcli device
DEVICE TYPE STATE CONNECTION
lo loopback unmanaged --
Any help would be very appreciated!

HW Debugging ARM Controller with J-Link error (Truncated register 16 in remote 'g' packet*)

I tried to debug my code with eclipse with the j-link debugger and gdb sserver and client.
I tried different settings but couldn't solve the error.
Eclipse error:
Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:2331
Error message from debugger back end:
Truncated register 16 in remote 'g' packet
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link LITE-Cortex-M-5V compiled Mar 3 2016 12:49:54
GDB Server output:
Hardware: V8.00
S/N: 638100545
Feature(s): GDB
Checking target voltage...
Target voltage: 5.03 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
GDB closed TCP/IP connection
Any hint what could solve my problem?

How to use non 22 ssh port in visual studio code insiders remote developments?

ssh login by authentication is working fine.
C:\Users\${DEVELOPER_NAME}>ssh ${HOST_IP_ADDRESS} -l ${DEVELOPER_NAME} -p ${SSHD_PORT} -i D:\prefix\PuTTY\${OPENSSH_FORMAT_PRIVATE_KEY}
Last login: Sun May 5 15:27:50 2019 from 10.40.171.44
Welcome to ...
[${DEVELOPER_NAME}#${HOST_AKA} ~]$
but sshd is running on 36000 not default 22 port, how can I tell that to vs code remote-ssh plugin
Host ${DEVELOPER_NAME}#${HOST_IP_ADDRESS}
HostName ${HOST_IP_ADDRESS}:${SSHD_PORT}
User ${DEVELOPER_NAME}
Port ${SSHD_PORT}
IdentityFile D:\prefix\PuTTY\${OPENSSH_FORMAT_PRIVATE_KEY}
this way gives me
Can't connect to ${DEVELOPER_NAME}#${HOST_IP_ADDRESS}: unreachable or not Linux x86_64 (ssh: connect to host ${HOST_IP_ADDRESS} port 22: Connection refused)
and
${DEVELOPER_NAME}#${HOST_IP_ADDRESS}:${SSHD_PORT}
in Remote-SSH: Connect to Host... gives me
Can't connect to ${DEVELOPER_NAME}#${HOST_IP_ADDRESS}:${SSHD_PORT}: unreachable or not Linux x86_64 (ssh: Could not resolve hostname ${HOST_IP_ADDRESS}:${SSHD_PORT}: Name or service not known)
Thanks to your question, I solved it. You may have already figured it out ... You do not need to add a port for HostName. Just write Port and it works.
Host ${HOST_NICKNAME}
User ${USER_ID_HOST}
HostName ${HOST_IP_ADDRESS}
Port ${SSHD_PORT}
IdentityFile ~/.ssh/id_rsa-remote-ssh

Vagrant startup times out on setup

I am doing this as part of the Ambari setup. followed the steps for quick start with Ambari and Vagrant.
I am using this CentOS 6.4 image:
https://github.com/u39kun/ambari-vagrant/blob/master/centos6.4/Vagrantfile
I did this on Google Cloud from RHEL 7.2 host and with VirtualBox 5, but went to install, as suggested, CentOS 6.4 guests.
I successfully installed and configured the pre-requisities (with tweaking required to make vbox 5 work on RHEL 7.2).
When I try to bring up 6 hosts, I see the timeouts where machines are not coming up.
Host machine I am running on is fast - 32 cores, 64 GB RAM, 500 GB SSD ...
Does anyone know what might be the issue?
Is there some firewall I need to turn off, etc.?
[<myuser>#ambari-host-rhel7 centos6.4]$ ./up.sh 6
Bringing machine 'c6401' up with 'virtualbox' provider...
==> c6401: Box 'centos6.4' could not be found. Attempting to find and install... c6401: Box Provider: virtualbox c6401: Box Version: >= 0
==> c6401: Box file was not detected as metadata. Adding it directly...
==> c6401: Adding box 'centos6.4' (v0) for provider: virtualbox c6401: Downloading: http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box
==> c6401: Box download is resuming from prior download progress
==> c6401: Successfully added box 'centos6.4' (v0) for 'virtualbox'!
==> c6401: Importing base box 'centos6.4'...
==> c6401: Matching MAC address for NAT networking...
==> c6401: Setting the name of the VM: centos64_c6401_1456171923223_2329
==> c6401: Clearing any previously set network interfaces...
==> c6401: Preparing network interfaces based on configuration... c6401: Adapter 1: nat c6401: Adapter 2: hostonly
==> c6401: Forwarding ports... c6401: 22 (guest) => 2222 (host) (adapter 1)
==> c6401: Running 'pre-boot' VM customizations...
==> c6401: Booting VM...
==> c6401: Waiting for machine to boot. This may take a few minutes... c6401: SSH address: 127.0.0.1:2222 c6401: SSH username: vagrant c6401: SSH auth method: private key
Timed out while waiting for the machine to boot. This means thatVagrant was unable to communicate with the guest machine withinthe configured ("config.vm.boot_timeout" value) time period.If you look above, you should be able to see the error(s) thatVagrant had when attempting to connect to the machine. These errorsare usually good hints as to what may be wrong.If you're using a custom box, make sure that networking is properlyworking and you're able to connect to the machine. It is a commonproblem that networking isn't setup properly in these boxes.Verify that authentication configurations are also setup properly,as well.If the box appears to be booting properly, you may want to increasethe timeout ("config.vm.boot_timeout") value.
As a final step I get this summary error:
There was an error while executing `VBoxManage`, a CLI used by Vagrantfor controlling VirtualBox.
The command and stderr is shown below.
Command: ["import", "/home/<me>/.vagrant.d/boxes/centos6.4/0/virtualbox/box.ovf", "--vsys", "0", "--vmname", "CentOS-6.4-x86_64_1456173504674_45962", "--vsys", "0", "--unit", "9", "--disk", "/home/<me>/VirtualBox VMs/CentOS-6.4-x86_64_1456173504674_45962/box-disk1.vmdk"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/<me>/.vagrant.d/boxes/centos6.4/0/virtualbox/box.ovf...OK.0%...
Progress state: VBOX_E_FILE_ERRORVBoxManage: error: Appliance import failedVBoxManage: error: Could not create the imported medium '/home/<me>/VirtualBox VMs/CentOS-6.4-x86_64_1456173504674_45962/box-disk1.vmdk'.
VBoxManage: error: VMDK: cannot write allocated data block in '/home/<me>/VirtualBox VMs/CentOS-6.4-x86_64_1456173504674_45962/box-disk1.vmdk' (VERR_DISK_FULL)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 877 of file VBoxManageAppliance.cpp
Any ideas what might be going on?
Do you still have free space on your drive ?
Generally VERR_DISK_FULL indicates that the hard drive is full, it cannot provision enough space for the vdi files.

Connecting BLE device to Raspberry fails

Trying to connect a Redbear Blend Micro Arduino board over BLE from a Rasperry Pi B+
Raspbian Jessie kernel 4.1.13+ (also tried on wheezy w identical issue)
Bluez 5.37
Tried several different ways of installing Bluez but in essence followed this http://www.elinux.org/RPi_Bluetooth_LE.
pi#raspberrypi:~ $ sudo hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 5C:F3:70:75:A3:EA ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING
RX bytes:1722 acl:0 sco:0 events:85 errors:0
TX bytes:788 acl:0 sco:0 commands:70 errors:0
pi#raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
EC:EA:FA:D8:F9:77 BlendMicro
EC:EA:FA:D8:F9:77 BlendMicro
pi#raspberrypi:~ $ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[EC:EA:FA:D8:F9:77][LE]> connect
Attempting to connect to EC:EA:FA:D8:F9:77
Error: connect: Connection refused (111)
[EC:EA:FA:D8:F9:77][LE]>
The same procedure on my Ubuntu:
ubuntu:~$ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[ ][EC:EA:FA:D8:F9:77][LE]> connect
[CON][EC:EA:FA:D8:F9:77][LE]> primary
[CON][EC:EA:FA:D8:F9:77][LE]>
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x0011 uuid: 713d0000-503e-4c75-ba94-3148f18d941e
attr handle: 0x0012, end grp handle: 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
[CON][EC:EA:FA:D8:F9:77][LE]>
What I tried:
Different versions of Bluez5 installation and don't think that is the issue.
I read that the Raspberian kernel version didn't support Bluez 5 and downgraded to 3.10.25+ which resulted in the Raspberry's USB ports being disconnected
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=120539&p=819468
Tried three different bluetooth dongles (including a plugable and a CSR) and they all give the same error on the RBi and works fine on the Ubuntu.
I'm aware of this stack posting.Cannot connect to BLE device on Raspberry Pi
This is solved.
Bluez 5 is not compatible with the default Kernel version 4.1.13 for Raspbian Jessie or Wheezy.
The solution is to step back to an earlier Kernel. In my case I first tried Kernel 3.10.25+ which killed all USB port on my RBi B+. Then downgraded to Kernel 3.12.36+ and that solved the issue and I can now connect from gatttool.
Downgrading is easy. Just do:
sudo rpi-update f74b92120e0d469fc5c2dc85b2b5718d877e1cbb
sudo reboot
And the connection below
pi#raspberrypi:~ $ sudo gatttool -b EC:EA:FA:D8:F9:77 -t random -I
[EC:EA:FA:D8:F9:77][LE]> connect
Attempting to connect to EC:EA:FA:D8:F9:77
Connection successful
[EC:EA:FA:D8:F9:77][LE]> primary
attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x000b uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x0011 uuid: 713d0000-503e-4c75-ba94-3148f18d941e
attr handle: 0x0012, end grp handle: 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb