Fixed bit rate using iwconfig with Tl-WN722N dongle - linux

As the title suggest, then I am trying to set a fixed bit rate on my dongle.
I am using a TP-Link wifi dongle model TL-WN722N. However, when I give the
command: iwconfig wlanX rate 2M fixed iget the following response:
Error for wireless request "Set Bit Rate" (8B20). But if i give it as sudo, then i dont get this error but running iwconfig reveals that it is not set.
My question is do any one have some experience in setting a fixed data rate on their wifi dongle ? ... if yes what kind of dongle are you using ... and also what command (if it is not iwconfig rate)
thx in advance

You should run this command with Sudo as you did.
The command will take, but the driver will not listen to this for the WN722N.
I am sure if you try this with your built in adapter or any other adapter if present; you will see that your command works.
I have personally tested this right now with the WN722N on Ubuntu v14 and I'm getting the same error.
Also, iw may give you more control for setting bitrate: http://linuxwireless.org/en/users/Documentation/iw/#Modifying_transmit_bitrates

Related

Keyboard problem on Lichee Pi Zero with kernel 5.2+

My question is about Lichee Pi Zero board (based on Allwinner/Sunxi V3s SoC).
Initially I used pre-built Linux image (kernel 4.10.02), it has no built-in Wi-Fi support (for Realtek 8327BS chip), so I downloaded the latest kernel version from here and built it with the default settings.
LCD is ok, Wi-fi looks good too (LED is blinkikng), but I cannot use keyboard anymore - there is no reaction from OS, when I connect something to USB (no message and no input from keyboard).
Hardware is OK and works good with the old Linux image.
I have also tried the latest kernel from kernel.org with the same bad result.
Please help to understand the reason. I suppose bad settings, but HID supoort is enabled.
Update 1.
I establish connection through UART. As I see, some USB features are detected during boot:
I'm able to load some drivers using insmod also:
Unfortunately, Linux still does not recognize any USB Device. I have connected mouse, keyboard, hub, mass storage and got no reaction from OS. It looks like devices do not get power (there is no light from mouse).
Update 2.
The best way I have found at the moment is to use buildroot-licheepi-zero.
It's very easy to use:
make licheepi_zero_defconfig
make menuconfig (optional)
make
After many-hour wainting I got the sdcard.img. It includes all neccessary files (zImage, RootFS, u-boot.bin, etc) and could be placed to SD with linux dd or etcher.
Linux boots successfully, but you can use terminal only through UART, as there is no LCD output.
You can put LCD itself to work:
make uboot-menuconfig
make
BUT there is still no user login prompt on the LCD after boot. So I need to log in and put command through UART.
Please share suggestion if any.
Update 3.
The change below enables login prompt on LCD (and disables it through UART):
make menuconfig
Now we are able to use Wi-Fi:
insmod /lib/modules/4.14.14-licheepi-zero/kernel/drivers/staging/rtl8723bs/r8723bs.ko
ifconfig wlan0 up
edit file /etc/wpa_supplicant.conf to add your Wi-Fi SSID and PSK
wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
udhcpc -i wlan0
Connection is established now, we can ping and so on.
There is still the question - how to enable full-functional terminal both on LCD and UART.
Many thanks!
With regards,
Maksim
The best solution is to use Buildroot.
Please check updates at topic start for details.

Bluetooth Issues Sending AVRCP Volume Changes Using D-Bus (qdbus) Send With org.bluez.MediaTransport1

I am working on emulating a Bluetooth headphone for automated testing using a raspberry pi as my headphone. Part of the challenge I was facing initially was to send AVRCP commands from the PI to the source device. I was delighted to find dbus and its capabilities in sending pause, play, next, and all the other commands. I wound up hitting a brick wall when it came to volume changes though. As it turns out the stock PulseAudio 9.0 binary doesn’t support absolute volume. After finding this patch - https://patchwork.freedesktop.org/patch/76558/ - I was able to set my volume on the source device (in my case an iPhone). After getting this fixed I went about trying to figure out how to send volume change commands from the PI to the source device. There is a property called Volume in org.bluez.MediaTransport1 that I can read but setting it has been a nightmare. I am always getting the following problems.
Command
qdbus --system org.bluez /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/fdX
org.freedesktop.DBus.Properties.Set org.bluez.MediaTransport1 Volume
127
Response
Error: org.freedesktop.DBus.Error.InvalidSignature Invalid signature
for ‘Volume’
I have tried scouring the internet to come up with various payloads and nothing has worked. I’ve hit a brick wall in finding the proper way to set the volume. Any help would be greatly appreciated.
Thanks!
Little late, but let it be just in case:
dbus-send --system --type=method_call --print-reply=literal --dest=org.bluez /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/fdX org.freedesktop.DBus.Properties.Set string:org.bluez.MediaTransport1 string:Volume variant:uint16:127

Raspberry btmon --server parameter

I am looking for a solution to monitor BLE devices near my raspberry with their RSSI value. So far I am done with monitoring, all devices and the current rssi value is displayed on screen, but I would like to
store the values in a database or
send them to RabbitMQ (either solution is fine).
I am using btmon for monitoring which has a switch "-s" or "--server". Unfortunately I did not find any useful documentation on it (might be my fault). I thought this might start monitoring in a way that I can query it from another application. Any clue?
The other solution could be node.js/noble, but noble installation always fails.
Well, btmon could not be my solution as device discovery needs to be triggered with hcitool lescan which does not have a recurrence parameter (only hcitool scan has). The solution finally was node.js/noble. The installation failed, because I tried to do it with the latest version of noble.js. Going back to 10.x solved the problem.

Cannot program Atmega1284p with arduino on linux, works on mac

This issue is driving me nuts. I am working on a project with some other guys who built the electronics. We have custom boards with an atmega 1284p. For USB cummunication with the 1284p we use a FTDI FT230X USB Bridge. This doesn't have DTR; RTS is used to reset the board using a capacitor (pretty much like with off the shelf arduinos).
The arduino bootloader is used, and we use mighty-1284p to upload. The board selected is "Original Mighty 1284p 8MHz". After installing the right FTDI drivers from http://www.ftdichip.com/Drivers/VCP.htm I can upload to the board from a mac. Linux has these drivers built into the kernel. However, I cannot upload to the board. AVR gives the following error:
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: Send: 0 [30] [20]
dmesg gives the following:
...
[ 51.299964] usbcore: registered new interface driver ftdi_sio
[ 51.300088] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
...
and lspci:
...
Bus 001 Device 006: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
...
The settings for the mac and linux machine are identical. On both I use arduino 1.0.5. Both do see the correct serial port.
I've seen many posts in this forum with similar problems, but have yet to find one with a solution that works for me. Holding reset, or clicking it just before uploading does not work. As suggested in some forums I have tried with removing brltty to no avail. I have tried uploading with the Arduino IDE, Eclipse with AVR plugin and AVR via command-line. None will work. I've tried it on different machines as well with different versions of ubuntu, and uploading works in none of them. Adding -c arduino to avrdude command doesn't do the trick either. Any ideas on how to fix this?
My user is part of the dialout group, and I can upload to other arduino boards (like duemilanove) without problems.
This question was originally asked here: http://forum.arduino.cc/index.php?topic=244363
You mentioned Ubuntu; are you doing this as a normal user?
If so, you may need to add your account to the correct group, the serial port device belongs to.
You can do that like this:
sudo usermod -a -G dialout yourself
then (easiest) logout and log back in again.
However, it is possible that it is called something other than dialout in the latest Ubuntu, I haven't checked. I can confirm it is still dialout here on Debian Wheezy.
(this is a little odd, though, if it works; usually you get a permission error instead...)
I know this is quite an old question, but in addition to the dialout group problem I've had issues with ModemManager interrogating anything that looks like a serial port (and screwing up programmers in particular because they're not expecting those bytes). I don't know if that's what's happening in your case but it's worth a shot for others who end up here.
I just removed it entirely (which is a large hammer, probably temporarily disabling it is best...):
sudo apt-get remove modemmanager
If you want to try disabling it, maybe:
sudo systemctl stop ModemManager.service

Wifi won't stay up on BeagleBone

I'm running Ubuntu 11.10 on a BeagleBone with an Edimax EW-7711UAn wifi adapter plugged into the USB port. I've configured /etc/network/interfaces and the wifi works, BUT:
The wlan0 interface doesn't always come up when booting the device. It comes up successfully about one in three attempts.
The interface sometimes goes down again, especially when not used for a while.
The /etc/network/interfaces file includes:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid "Bodoni"
wpa-psk "<mypassword>"
In order to try to address point 1), I put the following in /etc/rc.local:
nohup sh -c "ifdown wlan0 && ifup wlan0"
But it hasn't seemed to help much. I'm guessing that the second problem might be connected with power management, so I might try turning that off in /etc/rc.local.
But does anyone have any thoughts on how I might get the wifi to come up reliably on boot? I'm running the BeagleBone headless with no Ethernet (it's on a robot) so it's important I get this fixed!
FYI, I'm using the default drivers - lsmod gives:
Module Size Used by
aes_generic 27837 2
arc4 1111 2
rt2800usb 12386 0
rt2800lib 45146 1 rt2800usb
crc_ccitt 1457 1 rt2800lib
rt2x00usb 10595 1 rt2800usb
rt2x00lib 39077 3 rt2800usb,rt2800lib,rt2x00usb
mac80211 228509 3 rt2800lib,rt2x00usb,rt2x00lib
cfg80211 167722 2 rt2x00lib,mac80211
rfkill 16703 1 cfg80211
binfmt_misc 6224 1
spidev 4620 0
I'm hoping not to have to compile a new driver because I haven't had much success with that!
I've had a similar problem with my BeagleBones using another wifi adapter using the rt2800usb driver. Specifically I am using a DLINK DWA-125 (HW Rev A2) which is based on the rt3070 chip.
Same exact symptoms that you are reporting if I plug the DWA-125 directly into the USB port on the BeagleBone.
BUT if I plug the adapter into a USB extension cable and then plug the extension cable into the BeagleBone USB port, everything works fine. I have done 100s of hours of Cloud9 development using this setup and no problems with Wifi whatsoever.
I am running the Angstrom distro - and I find the same issue on all three of last BB releases (4/22. 5/? and 6/18).
Length of USB extension cable doesn't seem to matter (at least between 1ft and 12ft - haven't tried anything below 1ft.)
I have 6 BeagleBones (4 ver A5 and 2 ver A6) - behavior is the same on all of these Beaglebones.
Also have 4 DWA-125 Rev A2 USB adapters - behavior is the same on all of these.
I have not experimented with other USB Wifi Adapters using the same or other chips/drivers. And I haven't spent the time to track down the root cause of this behavior - I have code to write!
But, give it a try in case your experience matches mine - its a quick and easy 'fix'.
---- Addendum:
I just tried an experiment with the Belkin N150 Micro USB Wifi Adapter - based on the rtl8192cu chip and the standard drivers that come with the 6/18 BeagleBone Angstrom distribution.
Got very similar behavior: The Wifi doesn't work at all when plugged directly into the USB port. But when plugged in via a 1ft USB extension cable, everything works fine.
I had the same problem. The best explanation i've found so far is this one from Adafruit
The main idea is that the Wifi dongle is destructed by the HDMI adapter, that is situated just under the USB slot. You have two workarounds in this case:
Put the Wifi-dongle as far as possible from the USB-slot by means of a cable
Disable the HDMI interface if you don't really need it!
Only the second option helped me.
Here are the steps:
> mkdir /mnt/boot
> mount /dev/mmcblk0p1 /mnt/boot
> nano /mnt/boot/uEnv.txt
Remove the # in front of the cape_disable command
##Disable HDMI
cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
I hope it will help you guys!
I've fixed the problem by removing the USB ESD spike protection IC (U10, TPD4S012). It should be wired between the USB connector and the CPU but it was placed after the USB connector on my board (rev. A4). I don't know if this is fixed on later revisions.
Update: this won't help much in some cases. Check this thread.
I had a similar problem for most of a year until I googled long enough to find
wicd
After setting things up with wicd my 5 beaglebones have been rock solid on my home network on wifi dongles from the back bedroom to the garage. /etc/network/interfaces is not the way to go. I must have tried hundreds of configurations and some seemed to last for a day or two. I do remember the doc gave a good default for interfaces, very barebones. And wicd runs your supplicant if ever needed.
It took me ages to get reliable WiFi on the BeagleBone. In the end, the answer was to use an Atheros dongle, since I had poor luck with RealTek and RALink chipsets. The NetGear WNA1100 works very reliably for me, in both Angstrom and Ubuntu. See my post here.

Resources