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 4 years ago.
Improve this question
I am trying to force the Wi-Fi adapter to use a specific channel while connecting to the access point which supports both 2.4 GHz and 5 GHz (WPA authentication).
I am using the following configuration:
OS: Raspbian
Model: Raspberry Pi 2 Model B
Wi-Fi Adapter: Edimax EW-7811UTC
Driver: 8812au
I also tried with a different Wi-Fi adapter: Asus USB-N53 using driver rt2800.
Tried with iwconfig which is giving SET failed on device wlan0 ; Operation not supported.
Also tried wpa_supplicant.
What extra arguments need to be given to the wpa_cli or wpa_supplicant utility so that the Wi-Fi adapter will connect only to the specific band?
look for your interface
sudo iwconfig
look at your channels
sudo iwlist {interface} channel
turn off wifi
sudo iwconfig {interface} power off
set your desired channel
sudo iwconfig {interface} channel {channel, ex. "23"}
set your desired frequency
sudo iwconfig {interface} freq {frequency, ex. "5.00G"}
turn on wifi
sudo iwconfig {interface} power on
You can't do that. The channel is selected automatically in the 2.4 or 5GHz band because the channel depends on your router: The router selects a channel and your client simply uses it. There is no way for the client to tell the router "please switch to band 13".
The 2.4 and 5GHz bands are usually selected by the network name; your router should offer two WLAN names.
Related
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 wanted to use my android phone as a display for my Raspberry Pi 4B, so I searched the internet, found an instruction and copied the code into my Pi, I was connected to (via SSH). This is the code I put into /etc/network/interfaces:
iface usb0 inet static
address 192.168.42.42
netmask 255.255.255.0
network 192.168.42.0
broadcast 192.168.42.255
This sets the IP to a static one (192.168.42.42).
I rebooted and tried to SSH with IP 192.168.42.42, because I thought, this was the new IP for the Raspberry Pi.
Long story short, it doesn't work. I also tried some other IP's, I cant find the IP in NUTTY or with nmap.
How can I connect to my PI now? (I don't have a monitor or a crossover LAN cable)
I'm using an older MacBook Pro with Linux Mint 19
Where I got the code from: https://joshuawoehlke.com/android-raspberry-pi-display-over-usb/
You could take the SD card out of the Pi and put it in your Mac/Linux machine and correct/remove the /etc/network/interfaces file from the SD card.
Or, you could go to the SD card's /boot partition and touch ssh in that directory so that sshd starts and also create in that same directory a wpa_supplicant file to match a temporary WiFi hotspot you create on your phone or Mac. Then you can ssh into it over WiFi and whatever you want.
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 have Ubuntu 16.04 and already installed BlueZ 5.37, PulseAudio 10.0, and ofono 1.20 (clone from github).
And I need to use phone like modem for transmitting my phone calls to computer. I paired my telephone with PC, made device trust and connect (all actions are successfully). I think problem with ofono, because I can play music (which use the A2DP) but if i want use hends free or headset profile - I have no sound on PC.
In pacmd (PulseAudio console tool) list-cards I see my bluetooth device, but Headset Audio Gateway HFP/HSP is not avalible. Also I tested it on different devices and computers.
Thank you in advice.
I've solved in this way:
Install ofono
In /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it to load-module module-bluetooth-discover headset=ofono.
If the user pulse is not a member of group bluetooth, then add it: sudo useradd -g bluetooth pulse
VERY IMPORTANT: add this to /etc/dbus-1/system.d/ofono.conf before </busconfig>:
<policy user="pulse">
<allow send_destination="org.ofono"/>
</policy>
See: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/
The good news: Now in pavucontrol I can see that the profile changes automatically from A2DP to HSP / HFP if I make a phone call, and then it magically returns to A2DP!
The bad news: it works only one time per booting (and checking if ofonod is running), then I have to reboot my Debian system.
My Solution:
I just found my solution in Fedora 26, using Plantronics Legend and Pluggable Bluetooth USB, after a lot of searching.
I am going back through my history, and updating threads with my solution where I can. This worked for me, direct from Plugable (which is the USB module I am using).
See this post: plugable-usb-bluetooth-adapter-solving-hfphsp-profile-issues-on-linux
Command Summary per Above Link:
wget https://s3.amazonaws.com/plugable/bin/fw-0a5c_21e8.hcd
sudo mkdir /lib/firmware/brcm
sudo mv fw-0a5c_21e8.hcd /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd
sudo cp /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e8.hcd
Then reboot.
HSP/HFP Profile not available for Bluetooth headset in Fedora 20, was available in Fedora 19 change the device and test it again
SOLVING HFP/HSP AND A2DP PROFILE ISSUES ON 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 1 year ago.
Improve this question
I want to use any mobile phone to connect to a IoT device via Bluetooth Classic with the serial port protocol (SPP). The IoT device has no screen and no keyboard, and it's supposed to accept connections automatically as long as the connecting phone knows a secret PIN (ie, I don't want to be forced to ssh into the IoT device to set up pairing every time a new mobile phone tries to connect).
These are the commands that I've run so far on the IoT device:
# Make the device discoverable:
hciconfig hci0 piscan
# Register SPP:
sdptool add --channel=22 SP
# Start rfcomm:
rfcomm -r watch /dev/rfcomm0 22
Unfortunately, I couldn't find any way to set up a PIN, and pairing fails when I try to connect with a mobile phone. In addition, the device is only discoverable for a short interval.
How do I configure the IoT device's Bluetooth stack (running a recent Bluez) to auto pair with any phone that knows a given PIN, and how do I make the discovery period eternal?
If anyone happens upon this question, to use (much of) the BlueZ "BT Management Sockets" C API directly from bash, try:
btmgmt --help
btmgmt add-device, btmgmt find, btmgmt discov, etc.
You can run an application which implements BlueZ DBus API. I recommands BlueZ >= 5.42.
Use the agent interface and implements your own PIN code.
After registring your agent, bluez will automaticaly call and use you own agent when a pairing is asked.
Moreover, you can set the DiscoverableTimeout to 0 through DBus with org.bluez.Adapter1 interface.
"A value of zero
means that the timeout is disabled and it will stay in
discoverable/limited mode forever."
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt (dbus adapter object doc)
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/agent-api.txt (dbus agent object doc)
https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/5.44/test/simple-agent (sample)
http://www.bluez.org/bluez-5-api-introduction-and-porting-guide/ (read at the bottom)
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 am at the stage of learning Linux.
I have just installed Fedora20, but I cannot connect to internet with
my Wireless USB adapter....
Can anyone help me to use internet in Linux fedora 20?
This question is probably going to get migrated to somewhere like Super User, but just to give you a starting point, does the Wireless adapter register as an interface? Run ifconfig -a on the terminal and look out for a wlan0.
Then run ifconfig wlan0 up, and you can then do iw dev wlan0 scan to list access points that the card can see. You can then do some Googling about connecting a wireless card using wpa-supplicant.
If you can't see a wlan0 interface in ifconfig it could be that you don't have the drivers for your Wifi card. You'll need to Google which drivers are required and you might be able to get a kernel module or driver binary from somewhere on the internet.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a debian/ubuntu boards that I connect them via an ad-hoc network with the following settings
board:~# cat /etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 10.0.0.2
netmask 255.255.255.0
wpa-driver nl80211
wpa-conf /etc/wpa_supplicant.conf
board:~# cat /etc/wpa_supplicant.conf
# IBSS/ad-hoc network with WPA-None/TKIP.
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
network={
ssid="adhoc_test"
mode=1
frequency=2412
proto=WPA
key_mgmt=WPA-NONE
pairwise=NONE
group=TKIP
psk="abcdefgh"
bssid=F8:D1:11:52:0C:4E
}
These configurations creates an ad-hoc wlan, however, the nodes often gets different cell ID so that they cannot communicate with each other. To prevent it I added bssid=F8:D1:11:52:0C:4E line, however, no node get this predefined cell ID when they get the cell ID.
My question is that how can I prevent nodes to get different cell IDs? why bssid line does not work in the ad-hoc mode?
P.S. I tried these settings on ubuntu and debian dist. that have 3.2 and 3.4 kernels. wpa_supplicant versions that I used were 0.7, 1.0, and 2.0 all did not work. For the chipset, I am using Atheros AR9271 chipset for the wifi module.
Use ap_scan=2 and remove the bssid= line from the configuration.
the problem was that previous versions of wpa_supplicant does not support the bssid, installing wpa_Supplicant 2.0 solved the problem!
I answered same question at https://superuser.com/questions/552935/while-using-ad-hoc-networking-how-to-i-force-nodes-to-use-the-same-cell-ids-bs/569860#569860
Simple version: after ad-hoc configuration:
sudo iwconfig ath0 ap 11:22:33:44:55:66