concurrent AP-STA mode in Ubuntu 20.04 - wifi

I'm using a Jetson Xavier NX hardware with dual band network controller(Intel 8265). So as far as I know, concurrent AP-STA mode can be done.
I've seen some related tutorials(#1, #2) on concurrent AP-STA mode, but just adding interface seems not enough.
I tried step-by-step as below:
nmcli radio wifi off
sudo iw phy phy0 interface add wlan1 type managed
At this moment, I can see that both Wi-Fi wlan0 and wlan1 are Off from GUI. from nmcli device show, both devices wlan0 and wlan1 are in 20 state (unavailable).
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: AA:AA:AA:AA:AA:AA
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
GENERAL.DEVICE: wlan1
GENERAL.TYPE: wifi
GENERAL.HWADDR: AA:AA:AA:AA:AA:AA
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
When I turn the Wi-Fi radio on, wlan0 becomes 30 state (disconnected) and I can set wlan0 as AP or STA as I want. However, wlan1 remain 20 state and it shows no text at all on GUI as captured below.
GENERAL.DEVICE: wlan0
GENERAL.TYPE: wifi
GENERAL.HWADDR: AA:AA:AA:AA:AA:AA
GENERAL.MTU: 1500
GENERAL.STATE: 30 (disconnected)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
GENERAL.DEVICE: wlan1
GENERAL.TYPE: wifi
GENERAL.HWADDR: AA:AA:AA:AA:AA:AA
GENERAL.MTU: 1500
GENERAL.STATE: 20 (unavailable)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
Any way to solve the problem like changing the state of wlan1, or any other methods are appreciated.

Not a perfect solution, but found that the following order works
Setup and finish the connection for wlan0
Add wlan1 interface (in my case, sudo iw phy phy0 interface add wlan1 type managed)
Setup and finish the connection for wlan1
But there is still a (crucial) problem that after adding wlan1, nearly 10 seconds needed to recognize for wlan1 to connect to WiFi.

Related

RISCV Mem Virtualization: Sv57x4 58-bit VA is longer than 56-bit PA, how to form it?

I'm exploring RISCV Priveleged Spec and got confused with memory virtualization (especially hypervisor part and two-stage addr translation).
How can we form Sv57x4 Virtual Address (VA) for G-stage if basic Physical Address (PA) is shorter?
Sv57x4 VA is 58-bit (Figure 8.43)
Phys Addr is 56-bit
It wasn't problem for Sv39x4 and Sv48x4, but in this case we are facing literally physical width limit...

Property power-supply for an external pwm-backlight IC

I have this LCD panel:
LED panel's backlight is driven by the MIC2297 chip which takes two signals:
BRT - PWM signal for setting brightness of the LCD's background LEDs.
BL_EN that - gpio signal that enables or disables the LCD's background LEDs.
MIC2297 is powered from the +12V.
Now I connected this display to the Beaglebone Black's (BBB's) expansion connector and I am already running Linux on the BBB's microcontroller AM335x.
In order to enable the backlight I have to properly define it in the device tree i.e. .dts file. Currently I managed to set this up:
backlightt: backlight {
compatible = "pwm-backlight";
pwms = <&ehrpwm1 0 500000000>;
power-supply <>; // ???
enable-gpios = <&gpio2 3 0>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
};
What I don't understand is the property power-supply. How can I know which regulator to use? My devicce uses external 12V! This is really confusing! Why do we even have to specify the regulator?
I found solution...
PWM backlight requires a property "power-supply" that points to some regulator inside the AM335x. This regulator is used to set the output voltage of the PWM - so we don't need to put any kind of voltage regulator between an AM335x and the backlight IC (which might only support 1.5V PWM input on some mobile devices). This is actually really useful.

NodeMCU SPI bus doesn't respond to commands

I was trying to connect peripherals over the SPI bus and it didn't work. So checked the outputs with the oscilloscope and discovered the chip doesn't respond to spi library commands.
The only thing I get is the noise on the TX and RX, other pins voltages do not change at all. I tested it on two NodeMCUs (unofficial LoLin and Amica) with both master and dev firmwares. Here are the commands for the spi:
spi.setup(1, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, 20, 8)
spi.send(1, 170, 170, 170, 170) -- 170 == 0b10101010
What could be the problem?
Edit
TX/RX noise turned out to be a UART signal from the serial communication with the computer.
SPI bus works. It's just too fast for my crappy oscilloscope.
Also I discovered that argument databits can be in range [1,32] , clock_div - [0,~1200].

How can I tell if my laptop can do 4k resolution? (Using Linux Mint)

I am thinking about getting a new monitor. Short of plugging one in and seeing what happens, how can I tell if my laptop can output 4k resolution?
Is there a command I can run that will tell me this?
I thought maybe I could xrandr, but I think that only tells me what each monitor is capable of (even if the controller is capable of more.)
I also thought maybe I could look up the device from the lspci and find it on google, but I couldn't find much.
My lspci -v says:
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 500d
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at f3000000 (64-bit, non-prefetchable) [size=4M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 6000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
Update: Mr. Llama's suggestion about xrandr made me think that this output could be useful to someone who knows more than I do. Here's my xrandr:
Screen 0: minimum 8 x 8, current 5206 x 1080, maximum 16384 x 16384
eDP-1-0 connected 1366x768+0+0 309mm x 173mm
1366x768 60.1*+
... other resolution options removed for brevity ...
320x240 60.1
HDMI-1-0 connected 1920x1080+3286+0 160mm x 90mm
1920x1080 60.0*+ 50.0 59.9
... other resolution options removed for brevity ...
640x480 60.0 59.9
DisplayPort-1-1 connected 1920x1080+1366+0 509mm x 286mm
1920x1080 60.0*+
... other resolution options removed for brevity ...
720x400 70.1
VGA-1-0 disconnected
HDMI-1-1 disconnected
DisplayPort-1-0 disconnected
Looks like the xrandr command might be of use to you. It lists the available and current monitor resolution.
See this SuperUser question for more information.

Set mmc2 on beaglebone black

I am working with a Beaglebone Black and I would like to use the mmc2 slot.
according to AM335xx TRM, a beaglebone black should have 3 mmc available:
mmc0 (sd card);
mmc1 (2G flash),
mmc2.
I am trying to enable mmc2 by device tree (and I am quite sure to have the right pin settings) but, by doing
dmesg
I obtain:
/ocp/mmc#47810000: can't find DMA channel
omap_hsmmc mmc.11: unable to obtain RX DMA engine channel 65
By putting the oscilloscope probe on the header (e.g. the mmc2 clk signal), I do not see any transition.
I already removed R 160 to have mmc2 cmd accessible but I do not see any transition also there.
I tried both to enable it by
echo > /sys/devices/..../slots
and by
capemgr.enable_partno
with no success:
I can see it in
/sys/devices/..../slots
(with the L meaning loaded)..but no way to see any signal on the header.
I already googled it but answers are not clear at all.
Any ideas?
My
uname -a
is:
Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux
Thanks for your help.
You need to configure the mmc2 DMA events to some DMA channel since these events are not direct mapped.
I was not able to do this successfully using device tree overlays. So I made a change in the
am335-x-bone-common.dtsi directly (not sure this is the best way though):
&edma {
ti,edma-xbar-event-map = <32 12>, /* gpevt2 -> 12 */
<30 20>, /* xdma_event_intr2 -> 20 */
+ <1 32>,
+ <2 33>;
};
In the example above the event 1 (SDTXEVT2) was mapped to channel 32 and event 2 (SDRXEVT2) to channel 33.
In case you want to pick another open DMA channel check tables 11-23. Direct Mapped and Table 11-24. Crossbar Mapped from the technical reference manual Rev J.
In your device tree overlay file add these channels in the mmc3 node:
dmas = <&edma 32
&edma 33>;
dma-names = "tx", "rx";

Resources