I am unable to retrieve the signal strength on a Sierre Wireless MC7304.
Also sending an AT command via mmcli does not seem to work.
:~ $ sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --signal-get
error: modem has no extended signal capabilities
:~ $ sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command=AT+CSQ
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unauthorized: Cannot send AT command to modem: operation only allowed in debug mode'
/org/freedesktop/ModemManager1/Modem/0 (device id
'dd26a5483d051c6e25a7ca10f4d36a94791c7ebf')
-------------------------
Hardware | manufacturer: 'Sierra Wireless, Incorporated'
| model: 'MC7304'
| revision: 'SWI9X15C_05.05.16.02 r21040 carmd-fwbuild1
2014/03/17 23:49:48'
| supported: 'gsm-umts, lte'
| current: 'gsm-umts, lte'
| equipment id: 'unknown'
-------------------------
System | device:
'/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5'
| drivers: 'qmi_wwan, qcserial'
| plugin: 'Gobi'
| primary port: 'ttyUSB2'
| ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net),
wwan1 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'unknown'
| state: 'connected'
| power state: 'on'
| access tech: 'lte'
| signal quality: '0' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g, 4g; preferred: none'
| current: 'allowed: 2g, 3g, 4g; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: 'unknown'
| enabled locks: 'none'
| operator id: 'hidden'
| operator name: 'hidden'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/0'
When using the modem inside for example an Mikrotik 922 card i seem to get the signal strength just fine.
I am using mmcli version: 1.4.0-1 and Kernel 4.450 on a raspberry pi.
Several issues here:
The modem wasn't properly detected as a QMI modem by ModemManager (see that there is no cdc-wdm port listed in the Ports section output of mmcli). Being this a custom system, you need to make sure that the kernel USB cdc-wdm driver is built and installed, otherwise you won't be able to use the QMI mode as there won't be any /dev/cdc-wdm port to probe
You were not able to run AT commands via mmcli --command because that operation is only allowed when the ModemManager daemon runs in --debug mode. This is a command that developers use to run quick checks on the modem during development, not supported for general users.
You are seeing a signal quality equal to 0 in the mmcli output because ModemManager had only one AT port to use (ttyUSB2) and if that was connected (with PPP) there was no way to refresh the quality. If you used the modem in QMI mode you wouldn't be using PPP at all over the TTY.
Replying to the other answer in this question: ModemManager of course supports signal quality retrieval in QMI modems! Actually, the special Signal interface (which provides more detailed signal quality values, like access technology specific items) was originally developed only for QMI modems themselves.
The MC7304 modem is using QMI, Modemmanager does not support signal strength via QMI.
Use libqmi instead:
sudo qmicli -d /dev/cdc-wdm0 --nas-get-signal-strength
Related
I have an AV Receiver that I want to turn on from standby using cec-client on raspberry pi. The physicall setup is as follows:
RPI --HDMI--> AV Receiver
TV <--ARC_HDMI--> AV Receiver
Scanning my HDMI devices with echo "scan" | cec-client -s -d 1 I get following output:
opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address: 0.0.0.0
active source: no
vendor: Samsung
osd string: TV
CEC version: unknown
power status: standby
language: ger
device #1: Recorder 1
address: 1.0.0.0
active source: no
vendor: Pulse Eight
osd string: CECTester
CEC version: 1.4
power status: on
language: eng
device #5: Audio
address: 3.0.0.0
active source: no
vendor: Harman/Kardon
osd string: H/K AVR
CEC version: 1.4
power status: standby
language: ???
As you can see, my AV Receiver has the device number #5 and physical address 3.0.0.0
I tried following already, using cec-o-matic as reference:
echo "on 3.0.0.0" | cec-client -s -d 0
echo "on 5" | cec-client -s -d 0
echo "tx 15:04" | cec-client -s -d 0
But neither command turns on the AV Receiver. The same commands addressing the TV work without an issue.
After a lot of trial and error, I found out that rebooting my Raspberry Pi actually turns on the receiver! Nice, at least something. Investigating further I found out that in /boot/config.txt one can add/set the hdmi_ignore_cec_init=1 parameter to indicate whether the Raspberry Pi should send an active source message while rebooting. Depending on whether this is set to 0 or 1 my AV receiver turns on when I boot/reboot my RPI.
Now, I obviously don't want to reboot my RPI whenever I want to turn on my AV Receiver. So my question is what is the specific CEC-message the Raspberry sends on boot, so I can replicate it with the cec-client with something along the lines of echo "tx <specific-cec-message>" | cec-client -s -d 1
I already tried monitoring cec traffic on boot with cec-client -f cec.log, but monitoring starts too late and misses the send signal from RPI on boot.
The easiest way to find this out would probably to have a second Raspberry Pi monitoring the bus while the other one boots, but I only have 1 RPI, so I can not test it myself.
Does anyone have an idea, or at least a source for me? Big Thanks for taking the time!
In case it matters here also the specific device models.
TV: Samsung ue55f8090
AVR: Harman Kardon AVR 156
RPI: Raspberry Pi 4 Model B Rev 1.4
RPI_OS: Raspbian GNU/Linux 10 (buster) armv
RPI_KERNEL: Kernel: 5.10.103-v7l+
After more digging, I finally found a solution to my specific problem.
For my setup, as described in my question, one can turn on the Harman Kardon AVR 156 by broadcasting an active source message with the physical address of the TV.
echo "tx 1f:82:00:00" | cec-client -s -d 1
A breakdown of the CEC Frame:
1 = Recording 1 (Raspberry Pi)
F = Broadcast
82 = Active Source
00 00 = ID (TV)
I hope this helps anyone stumbling on this in the future!
I have a pci address for a device, and need to find the pci address of its hostbridge. In FreeBSD 11 it is very easy to do that using "devinfo -v" as you can grep the pci address of the device and then you can find its parent in the tree which is the hostbridge. Now in FreeBSD 10 there is no any pci address in the output of the "devinfo -v". Example of "devinfo -v" output in FreeBSD 11:
pcib4 pnpinfo vendor=0x8086 device=0x2f08 subvendor=0x15d9 subdevice=0x0833 class=0x060400 at pci0:0:3:0 handle=\_SB_.PCI0.BR3A
pci4
mlx5_core1 pnpinfo vendor=0x15b3 device=0x1013 subvendor=0x15b3 subdevice=0x0010 class=0x020700 at pci0:3:0:0 handle=\_SB_.PCI0.BR3A.H000
mlx5_core2 pnpinfo vendor=0x15b3 device=0x1013 subvendor=0x15b3 subdevice=0x0010 class=0x020700 at pci0:3:0:1 handle=\_SB_.PCI0.BR3A.H001
Example of "devinfo -v" output in FreeBSD 10:
pcib4 pnpinfo vendor=0x8086 device=0x2f08 subvendor=0x15d9 subdevice=0x0833 class=0x060400
pci4
mlx5_core1 pnpinfo vendor=0x15b3 device=0x1013 subvendor=0x15b3 subdevice=0x0010 class=0x020700
mlx5_core2 pnpinfo vendor=0x15b3 device=0x1013 subvendor=0x15b3 subdevice=0x0010 class=0x020700
So You can see that the pci addresses are not appearing in output of FreeBSD10
There is 2-step workaround. At first find device name:
pciconf -l -v | grep "pci0:2:0:0" | cut -f 1 -d #
In my case it's sdhci_pci0.
Then find location in devinfo:
$ devinfo | grep -B 5 sdhci_pci0
pcm2
pcm3
pcm4
pcib1
pci2
sdhci_pci0
Note:
On FreeBSD10.2-STABLE I can see PCI info in output of devinfo.
Another possibility is to walk through the dev sysctl tree:
You can grep for the PCI address you have in the %location OID:
$ sysctl dev | grep %location
dev.hdac.1.%location: pci0:0:27:0 handle=\_SB_.PCI0.HDEF
dev.hdac.0.%location: pci0:2:0:1
dev.vgapci.0.%location: pci0:2:0:0 handle=\_SB_.PCI0.PEG3.MXM3
dev.hostb.15.%location: pci0:255:5:3
dev.hostb.14.%location: pci0:255:5:2
You can then find the parent using the %parent OID. For instance, the parent of pci0:2:0:0 (listed in the example above) is pci1:
$ sysctl dev.vgapci.0.%parent
dev.vgapci.0.%parent: pci1
The parent has its own sysctl tree:
$ sysctl dev.pcib.1.%location
dev.pcib.1.%location: pci0:0:3:0 handle=\_SB_.PCI0.PEG3
Not the most straightforward approach, but it should work accross different versions of FreeBSD (and probably DragonFlyBSD FWIW).
Try devinfo -rv.
A snippet of output on FreeBSD 10.3:
atapci1 pnpinfo vendor=0x8086 device=0x27c0 subvendor=0x1043 subdevice=0x8179 class=0x01018f at p
ci0:0:31:2 handle=\_SB_.PCI0.IDE1
Interrupt request lines:
0x13
I/O ports:
0xb880-0xb88f
0xbc00-0xbc03
0xc000-0xc007
0xc080-0xc083
0xc400-0xc407
ata2 at channel=0
ata3 at channel=1
i've been looking for a solution for this for a while, hope you can help me.
I have a network at home like this.
+----------+
| INTERNET |
+-----+----+
|
+-----+----+
| CABLE |
| MODEM |
+-----+----+
|
+----------+---------+
| |
| |
+-----v-----+ +-----v-----+
+--------+ D-LINK | | D-LINK |
| | DIR-600 | | DI-524 |
| +-----------+ +-----+-----+
| | |
| | |
+ +-----+-----+ |
192.168.2.XXX---> Windows7 | |
+ | | |
| +-----------+ |
+ |Ubuntu | |
192.168.2.YYY +->Virtualbox <---Public IP ++
+-----------+
One Cable Modem with a Router (Dir-600) for local IPs, and an Access Point (DI-524) for public IPs.
On the local network i have a computer with Windows 7 and Virtualbox, In the virtualbox I have an Ubuntu 14.04 server. This server has internet conection on ETH0 with a bridged adapter, so it has a local IP like 192.168.2.XXX.
Also on the virtualbox i have set a wlan adapter with direct access to the virtual ubuntu server and connected to the DI-524 network with a public IP.
So, the ubuntu server has 2 interfaces:
ETH0 connected to local network with IP 192.168.2.XXX
WLAN1 connected to DI-524 with public IP.
What I want is:
Give WLAN1 the highest priority for internet access. And only if there is no WLAN connection, the virtual machine can access internet through ETH0.
I know it can be done changing metrics, but don't know how, i've tried many commands but nothing seems to work.
Can anybody help me?
Thanks in advance!
yes you can do that via ifmetric package install it on ubuntu then set number for example 10 to wlan0 and number 20 for eth0 it mean the highest priority number for wlan0 highest priority is 0 by default (priority denotes metric) check this topic enter link description here
but plz check your metric first via
route -n
then you can delete old metrics via something like this command
sudo route del -net default gw 192.168.2.XX netmask 0.0.0.0 dev wlan0 metric 0
As it says in the description I have installed cudaHashcat-1.33 on an AWS g2.2xlarge instance.
I've used the .run file to install the CUDA Toolkit and then performed this test: deviceQuery ; as explained here in the official documentation (http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#running-binaries).
Then I installed cudaHashcat-1.33, following these instructions.
sudo apt-get install p7zip-full
wget http://hashcat.net/files/cudaHashcat-1.33.7z
7za x cudaHashcat-1.33.7z
cd cudaHashcat-1.33
Then I tried to run this: cudaExample0.sh in ~/cudaHashcat-1.33/cudaExample0.sh and I end up getting this output:
cudaHashcat v1.33 starting...
Device #1: GRID K520, 4095MB, 797Mhz, 8MCU
Device #1: WARNING! Kernel exec timeout is not disabled, it might cause you errors of code 702
Hashes: 6494 hashes; 6494 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes
Applicable Optimizers:
* Zero-Byte
* Precompute-Init
* Precompute-Merkle-Demgard
* Meet-In-The-Middle
* Early-Skip
* Not-Salted
* Not-Iterated
* Single-Salt
* Scalar-Mode
* Raw-Hash
Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 80c
ERROR: cuModuleLoad() 209
A second example is this one, where I actually use the file I want to attack.
ubuntu#ip-172-31-58-154:~$ ~/maskprocessor/src/mp64.bin ?l?l?l?l?l?l?l?l | ~/cudaHashcat-1.33/cudaHashcat64.bin -m 2500 xxx.hccap
cudaHashcat v1.33 starting...
Device #1: GRID K520, 4095MB, 797Mhz, 8MCU
Device #1: WARNING! Kernel exec timeout is not disabled, it might cause you errors of code 702
Hashes: 1 hashes; 1 unique digests, 1 unique salts
Bitmaps: 8 bits, 256 entries, 0x000000ff mask, 1024 bytes
Rules: 1
Applicable Optimizers:
* Zero-Byte
* Single-Hash
* Single-Salt
Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 80c
ERROR: cuModuleLoad() 209
nvidia-smi
[root#ip-xxx-xxx-xxx-xxx cudaHashcat-1.33]$ nvidia-smi
Wed Mar 4 19:07:35 2015
+------------------------------------------------------+
| NVIDIA-SMI 340.32 Driver Version: 340.32 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GRID K520 On | 0000:00:03.0 Off | N/A |
| N/A 43C P8 17W / 125W | 10MiB / 4095MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Compute processes: GPU Memory |
| GPU PID Process name Usage |
|=============================================================================|
| No running compute processes found |
+-----------------------------------------------------------------------------+
If someone knows what is going on, I'd appreciate any help.
So after a lot of searching through forums I finally found an answer. #Robert Crovella, thanks for pointing out that the driver was the wrong one. So it turns out that finding the linux drivers for NVIDIA is not that easy, but I came across this page, which then lead me to the Linux Drivers of NVIDIA. Just download the driver required for your architecture (if you use wget click on 'Download' first, since there is an acceptance page). After that do 'chmod +x nvidia-driver.run' and then install it with 'sudo ./nvidia-driver.run'.
Hope that my experience helps someone else.
I have a 1 x USB to 8 x serial ports hub. I have connected 8 devices to the hub (ttyUSB0...7). I need a way to identify which device is at each ttyUSBx port.
I have tried the following command:
udevadm info -a -n /dev/ttyUSB1 | grep '{serial}' | head -n1
and looked at the log in:
/var/log/messages
as advised here:
http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
But what I get is the serial number and VendorID:ProductID of the USBtoSerial hub for all the ttyUSBx ports.
Any ideas?
Thanks in advance
Use as this>>
sudo lshw |grep serial
You can find all details about device by type only sudo lshw