Can not configure 5GHz WiFi band for Beaglebone AI - linux

I am trying to configure 5GHz WiFi band for my new Beaglebone AI.
What I am doing is
cp /tmp/hostapd-bbai.conf to /etc/hostapd.conf
opening /etc/default/bb-wl18xx and changing USE_GENERATED_HOSTAPD to 'no'
USE_GENERATED_HOSTAPD=no
in order to use /etc/hostapd.conf file instead of generated conf file from /tmp
this method works perfect for 'b' and 'g' but I can not configure to 'a' in order to use 5GHz band
Can anyone help me regarding this?
this is my hostapd.conf
interface=SoftAp0
ssid=BeagleBone-59A4
hw_mode=a
channel=1
wmm_enabled=1
country_code=IN
ieee80211d=1
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=BeagleBone
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
logger_syslog=-1
logger_syslog_level=2

New Beagle Bone AI WIFI stack is more powerful and its auto handle.
if still you facing issue regarding any other interfaces then please follow below link :
https://github.com/MalavPatel3501/BeagleBone-AI--mpBBAI-IO-Python-Library
In this project you got .dts file and all pin muxing steps. Moreover i puts some example code in this project.

Related

Configure Yocto image on CM4 to work with Official Raspberry Pi Display

I've got a Raspberry Pi CM4 (with eMMC) running an image built using Yocto. The CM4 is running on the official CMIO board.
I want to use the official Raspberry Pi 7" Display on this, using the DSI interface, but I have trouble getting it working. The display does not turn on at all. I need help configuring my image, or my yocto build correctly to allow me to use this display.
What worked:
It works as expected on a Raspberry Pi 4 Mode B. I can flash my Yocto-based image to an SD card and the device boots as expected with the display working
It works on the CM4 using the official Raspberry Pi OS image, but only after I do one of the following:
a. Add the dt-blob.bin file as described in the Compute Model Documentation
b. I add the following line to the config.txt file in the boot folder: dtoverlay=vc4-fkms-v3d
Issue:
When I flash my Yocto-based image to the Raspberry Pi, the screen does not work. The device boots up, and I can get an output through HDMI, but not through the DSI interface.
What I have tried
I've downloaded the dt-blob.bin file to both the /uboot/ and /boot/ folders on my device and rebooted, but it had no effect
I added the vc4-kms-dsi-7inch dtbo to the /uboot/overlays folder and added dtoverlay=vc4-fkms-v3dto config.txt in /uboot/ and it still didn't have any effect.
It feels like this is a device-tree related issue. And I imagine there is some difference in pin usage between the Raspberry Pi 4B and the CM4, which makes my image not work on the CM4.
One thing I did note, the image I'm using has dtoverlay=vc4-fkms-v3d in config.txt while the official image has dtoverlay=vc4-kms-v3d. I don't know if that makes a difference, but changing it on my image to fkms and rebooting didn't have any effect.
This is an extract from the local.conf file for my yocto build:
MACHINE ?= "raspberrypi4"
ENABLE_DWC2_HOST = "1"
RPI_USE_U_BOOT = "1"
MENDER_BOOT_PART_SIZE_MB = "40"
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"
MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = [censored]
This build uses the meta-raspberrypi and meta-rpi64 layers.
Any help to understand the problem and get this display working would be appreciated.
Thanks!
I managed to solve this issue in the end.
The local.conf file had another conflicting MACHINE ?= "raspberrypi3-cm" command.
I removed this and created the image again.
Then, while still connected to the PC as a storage device, I added the dt-blob.bin file to the /boot/ drive.
I then booted up the CM4, and the display worked.
Next step would be to figure out how to implement that device tree overlay into the yocto build, but that's out of the scope of this question.

Unable to validate syslinux.cfg syntax

I am trying to boot an appliance to a USB drive and the provided configuration file for the syslinux.cfg file seems to have some error in it. Is there any way to validate a syslinux.cfg file and its syntax or anyone smart on here that might be able to check why this seems to not work? After booting, we received the following error:
SYSLINUX 4.04 EDD 2011-04-18 Copyright (C) 1994-2011 H. Peter Anvin et al
Unknown keyword in configuration file: 1
No DEFAULT or UI configuration directive found!
boot:
This is the configuration we have inside the syslinux.cfg file. I've tried multiple formatting options of my USB drive, including FAT32 and FAT16. I've tried renaming folders as prescribed by other articles (although I don't think there is a file referencing issue, because, because otherwise how would it know that there is an unknown keyword in the configuration file?).
SERIAL 1 38400 CONSOLE 1 default vmlinuz0 initrd=initrd0.img root=live:CDLABEL=LIVE rootfstype=vfat ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 serial text console=ttyS1,38400n8
We are following instructions from a vendor on how to boot to a USB to recover this appliance, but I don't get the strong feeling that they understand what's going on, so I thought I'd see if anyone could weigh in on why it cannot find a DEFAULT or UI configuration directive, despite the "default vmlinuz0" line being right there.

device tree, change fixed link ethernet phy speed runtime

I'm working with a custom IMX8 board with a phy that is not supported by the Linux kernel (it's a clause 45 automotive oabr transceiver).
The phy is actually working, and its mdio bus and digital IO's are controlled with an userspace application.
To acheive this i had to bind it in the device tree with the fixed-link property as below.
...
port#0 {
reg = <0x00>;
label = "oabr";
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
pause;
asym-pause;
};
};
...
Now... the question is, i would like to change the speed of the phy from 1000 to 100, i'm able to do it if configure the phy AND change the device tree, but this implies a reboot of the device to load a new dts file.
Is there a way to get it working runtime?
Thanks a lot,
Marco
In order to add or load a device tree blob in runtime, the only way is to use Linux overlay.
But the problem is that NXP does not support it in its linux-imx kernel , you can see their post about it here.
If you don't make the change permanently to your main device tree file used for the image, I can advise you of doing this:
Create another dts (Ex: new-phy.dts) that includes the main dts and add your override node there
Add the new dtb name to your ${MACHINE}.conf KERNEL_DEVICETREE variable:
KERNEL_DEVICETREE += "freescale/new-phy.dtb"
Now you need to choose it once you boot from u-boot CLI, like:
u-boot> setenv fdt_file new-phy.dtb
u-boot> saveenv
u-boot> boot
Or, you can set it in your u-boot/configs/${MACHINE}_defconfig:
CONFIG_DEFAULT_FDT_FILE="new-phy.dtb"
Otherwise, you can try to add the overlay support for the kernel you are using.
Toradex has SOMs and EVKs based on IMX8M and they are working with overlays, you can take a look here and try to understand what they did to support it.

Will --vout=dummy option work with --video-filter=scene?

I am trying to create snapshots from a video stream using the "scene" video filter. I'm on Windows for now, but this will run on Linux I don't want the video output window to display. I can get the scenes to generate if I don't use the --vout=dummy option. When I include that option, it does not generate the scenes.
This example on the Wiki indicates that it's possible. What am I doing wrong?
Here is the line of code from the LibVLCSharp code:
LibVLC libVLC = new LibVLC("--no-audio", "--no-spu", "--vout=dummy", "--video-filter=scene", "--scene-format=jpeg", "--scene-prefix=snap", "--scene-path=C:\\temp\\", "--scene-ratio=100", $"--rtsp-user={rtspUser}", $"--rtsp-pwd={rtspPassword}");
For VLC 3, you will need to disable hardware acceleration which seems incompatible with the dummy vout.
In my tests, it was needed to do that on the media rather than globally:
media.AddOption(":avcodec-hw=none");
I still have mainy "Too high level or recursion" errors, and for that, I guess you'd better open an issue on videolan's trac.

reading the running config file from a network device

Is there any way to read the running configuration file from a network device (cisco ios/ juniper junos) in a properly formatted type say for eg as an XML file?
Basically I need to get all the attributes and its values in a config file. I am using "expect" to read the config file. I would have to write a parser to get the attributes from the config file.
I was wondering if there would be already an implementation of this which I can re-use?
Is there any SDK that can be used to parse the config file, or even better , directly interact with the device and get the data in a standard format?
Kindly guide.
Thanks
Sunil
For Juniper in configuration mode:
show | display xml
For Cisco IOS I've never made this, but you can try to use ODMSpec:
http://www.cisco.com/en/US/docs/ios-xml/ios/xmlpi/command/xmlpi-cr-book.pdf
http://www.cisco.com/en/US/docs/net_mgmt/enhanced_device_interface/2.2/developer/guide/progodm.html
I'm not sure, that it works with running-config.
In ios devices, it is
show run | format
This would give the result in an xml format

Resources