Scan fails in AP mode (wpa_supplicant) [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm using wpa_supplicant to create an ACCESS POINT:
wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant_ap.conf
The problem is that when the device is configured in Access point, i'm not allowed to scan networks:
iw dev
wlan0 scan command failed: Invalid argument (-22)
or in wpa_cli:
> scan
OK
<3>CTRL-EVENT-SCAN-FAILED ret=-22
In dmesg:
[85769.193376] CFG80211-ERROR) __wl_cfg80211_scan : Invalid Scan Command at SoftAP mode
[85769.200133] CFG80211-ERROR) wl_cfg80211_scan : scan error (-22)
and seems that inside wl_cfg80211.c:
if (dhd->op_mode & DHD_FLAG_HOSTAP_MODE) {
WL_ERR(("Invalid Scan Command at SoftAP mode\n"));
return -EINVAL;
}
So the problem is that if the wifi is in HOSTAP, the scan is not allowed.
Any solution?

Does ap-force no longer work?
iw dev wlan0 scan ap-force

Been a while since I did just this sort of thing and ran into this same problem. I seem to recall though that it was one or the other (the hardware I was using could scan or be in AP mode but not both at the same time). I.e. switch out of AP mode to do your scan. Go back to AP mode when you're not doing the scan. Seems like that's what your wl_cfg80211.c device driver software says too. Apologies if my memory of this has failed me.

Related

Why wouldn't lspci show extended config space? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I use in different Linux distribution running on Windows 10-hosted VirtualBox the following command:
lspci -xxxx
It prints dump of config spaces up to 64 bytes
When I try
sudo lspci -xxxx
It prints dump of config spaces up to 256 bytes
Can I get whole PCIe 4096 config space using lspci?
#prl made a good point to check if there is PCI Express capability (capability id 10h).
Turned out that most of devices seen under VirtualBox have all zeros in PCI capabilities space (0x40 thru 0xFF), they also have zero capabilities pointer. Even a device which has some capabilities does not have PCI Express capability.
I think it is VirtualBox emulation limitation.

Detect RAID Hardware or Software on Debian [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Are there any way to detect if my server (on debian 6) is using RAID by Hardware or Software?. I have used some command but my server do not recognize them.
/proc/mdstat
omreport storage vdisk
cat /proc/mdstat
The commands upside is the only one that I have tried.
For hardware, try
lspci -vv | grep -i raid.
For software, try the mdadm utility. It is used to manage MD devices (or Linux Software RAID). In particular, try its query command. The mdadm manpage says
This will find out if a given device is a RAID array, or is part of one, and will provide brief information about the device.
You can get a list of devices in /dev with ls -a /dev and then use
mdadm --query /dev/DEVICENAME
Sources:
hardware: https://unix.stackexchange.com/questions/139271/how-to-get-details-of-raid-devices-both-soft-and-hard
software: https://linux.die.net/man/8/mdadm

WindRiver - eth0: error fetching interface information: Device not found [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
In the "ifconfig" I don't see eth0 appears.
When I tried to type:
dmesg | grep eth0
I got the following message
eth0: PHY ID 200xx5c99 at 1 IRQ ) (stmmac-1:01) active
And when I typed:
cat /etc/udev/ruled.d/70-persistentnet.rules
I got the following message
# PCI device 0x8086:0x0937 (stmmaceth)
SUBSYSTEM=="net" , ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:97:55:ff:b8", ATTR{dev_id}=="0x0",ATTR{type}=="1",KERNEL=="eth*",NAME="eth0"
I dont get any idea why eth0 does not appear,please let me know if you may have any idea.
The typical reason why ifconfig does not show an interface is because this interface is not in the "UP" state, and the typical (again) reason for this is that the interface does not have an IP address.
For ifconfig to "display all interfaces which are currently available, even if down" (quoting the man page), use ifconfig -a.

Pipe One Serial Port to Another in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am looking for a means to pipe one serial ports data (regardless of data type) to another serial port. In my case I am trying to take in data from one serial port and output it through a radio connected to another serial port in real time.
I already know what ports I am using and have looked up a program called socat, which should be able to handle it but there are no examples of how to do this and I have not been able to figure out how to do it.
Has anybody been able to use socat or a bash scipt/some other method to accomplish this in Linux??
I am running Ubuntu 14.04.
Assuming the serial port you are reading from is /dev/ttyS0, and the other you are writing to (where the radio is connected) is /dev/ttyS1 you shall simply do:
cat /dev/ttyS0 > /dev/ttyS1
or
dd if=/dev/ttyS0 of=/dev/ttyS1 bs=1
Of course before you should set all the serial ports' parameters using stty command.

/dev/ttyACM busy for the first 15 seconds after plugging [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have two USB devices which appear as /dev/ttyACMn (a barcode reader and a motor controller). For each of them, when I try to open them in the first 15 seconds after plugging in, I get a "device or resource busy" error. After more than 15 seconds, they open fine. Do you have any idea what's causing it?
I tried using lsof to check if a process is using the device, but it finds no such process (it finds my process after I manage to connect to the device).
I'm currently using Ubuntu 14.04, kernel 3.13.0 64-bit, but I have seen this behavior in earlier Ubuntu versions too.
Thank you very much,
Noam
I think the problem is ModemManager. It scans serial interfaces on startup to see, if they belong to a modem.

Resources