List all wireless devices:
rfkill list
Disable WiFi controller:
rfkill block wifi
Disable Bluetooth:
rfkill block bluetooth
The co-processor (BGM111) SWDIO interface is exposed to the CM3L/CM3+L via a FTDI FT2232H-56Q JTAG USB controller. This means that the co-processor (BGM111) can be flashed from the CM3L/CM3+L via, for example, openOCD. A reference can be found here.
The balenaFin sports a very common I2C RTC module that is well known, supported, and documented within the Raspberry Pi ecosystem: the DS1307.
There are plenty of guides on how to interact with the chip, including the following:
echo 504 > /sys/class/gpio/export # (Red)
echo 505 > /sys/class/gpio/export # (Green)
echo 506 > /sys/class/gpio/export # (Blue)
echo "out" > /sys/class/gpio/gpio504/direction
echo "out" > /sys/class/gpio/gpio505/direction
echo "out" > /sys/class/gpio/gpio506/direction
Now that you have the 3 GPIO LED pins ready, you can define your target color by setting each LED to high or low. For example, to turn the RGB off:
echo 0 > /sys/class/gpio/gpio504/value
echo 0 > /sys/class/gpio/gpio505/value
echo 0 > /sys/class/gpio/gpio506/value
This device sports 9 status LEDs varying from power, eMMC, ethernet, WiFi, WAN, etc. There is a switch which allows users to toggle them all on and off via software.
exp_base=$(cat /sys/devices/platform/i2c*/i2c-*/*-0020/gpio/*/base)
led_gpio=$(expr $exp_base + 7)
echo ${led_gpio} > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio${led_gpio}/direction
echo 0 > /sys/class/gpio/gpio${led_gpio}/value # turn off
echo 1 > /sys/class/gpio/gpio${led_gpio}/value # turn on
We are working on identifying and documenting cards known to work out of the box on the board. If you plan on adding LTE capability to the device, we suggest the Quectel EC21-XX Mini PCIe: the card is known to work out of the box, hence only APN configuration is required. On balenaOS (2.0.0+) you do so by adding a NetworkManager profile in the boot partition under the "system-connections" folder. You can find more info about this on our docs at: https://balena.io/docs/deployment/network/2.0.0/#cellular-modem-setup.
Reset mPCIe radio cards
exp_base=$(cat /sys/devices/platform/i2c*/i2c-*/*-0020/gpio/*/base)
mpcie_perst_gpio=$(expr $exp_base + 5)
echo ${mpcie_perst_gpio} > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio${mpcie_perst_gpio}/direction
echo 1 > /sys/class/gpio/gpio${mpcie_perst_gpio}/value # mPCIe PERST on
echo 0 > /sys/class/gpio/gpio${mpcie_perst_gpio}/value # mPCIe PERST off
Disabling RF activity on mPCIe radio cards
exp_base=$(cat /sys/devices/platform/i2c*/i2c-*/*-0020/gpio/*/base)
radio_gpio=$(expr $exp_base + 4)
echo ${radio_gpio} > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio${radio_gpio}/direction
echo 1 > /sys/class/gpio/gpio${radio_gpio}/value # mPCIe W-DISABLE on
echo 0 > /sys/class/gpio/gpio${radio_gpio}/value # mPCIe W-DISABLE off
Disabling HDMI
exp_base=$(cat /sys/devices/platform/i2c*/i2c-*/*-0020/gpio/*/base)
hdmi_gpio=$(expr $exp_base + 3)
echo ${hdmi_gpio} > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio${hdmi_gpio}/direction
echo 1 > /sys/class/gpio/gpio${hdmi_gpio}/value # HDMI off
echo 0 > /sys/class/gpio/gpio${hdmi_gpio}/value # HDMI on
NOTE: A firmata-based firmware and client library is under development. This will allow users to easily interact with the co-processor from the CM3L/CM3+L without needing to write their own firmware.