Understanding the Linux equation

  • admin
  • 1/100 Students
  • -
  • 2 Lessons /0 Quizes

To get started with the VOXL AI solution means getting linux installed first. For the average computer user this is going to be a shock.
The purpose of this introduction is to determine which Linux (distro) to use and how to get it setup to communicate with the VOXL and the flight controller.

Getting started with the VOXL CAM

This is the flight computer and imaging system for the LiL Rooster build

Getting started means installing a linux OS on a computer and get it up and running
add any extra programs you might think are needed but this will come as the process continues

 QuickStart referes you to the Flightcore and VOXL Pages

 identifing the compoments and the programs are covered during the sessions

 First the Flightcore is the flight computer and it's also referred to as APQ8096 in the software builds. The components included that enable stable flight will be covered later in the Flight core section

 VOXL is a companion computer than enables the smallest autonomous drones with VIO and collision prevention

 The current drone build, using our 3d printed quad frame uses the VOXL CAM

This is a circuit board that combines the flight core and the VOXL into one board, then builds an enclousure that incorperates multiple additional sensors that enable the GPS denied flight ability More on VOXL later in the VOXL section

Computer: Linux based setup a capable computer that works

Host Computer Setup
Install the Android Debug Bridge (ADB):

me@mylaptop:~$ sudo apt install android-tools-adb android-tools-fastboot
ModalAI Top Tip: to run ADB without root on the host PC, create a file called /etc/udev/rules.d/51-android.rules containing this udev rule on the host computer:

me@mylaptop:~$ sudo su
root@mylaptop:/home/me# echo ‘SUBSYSTEM==”usb”, ATTRS{idVendor}==”05c6″, ATTRS{idProduct}==”901d”, MODE=”0660″, GROUP=”plugdev”, SYMLINK+=”voxl%n”‘ > /etc/udev/rules.d/51-android.rules
root@mylaptop:/home/me# echo ‘SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, ATTRS{idProduct}==”d00d”, MODE=”0660″, GROUP=”plugdev”, SYMLINK+=”voxl-fastboot%n”‘ >> /etc/udev/rules.d/51-android.rules
root@mylaptop:/home/me# udevadm control –reload-rules && udevadm trigger
Common ADB Commands
Listed here for convenience are some common ADB commands.

Check for Devices
From the host, you can check for connected devices using adb devices

me@mylaptop:~$ adb devices
List of devices attached
73a05d48 device
Access the Shell
You can gain access to VOXL’s shell from the host computer using adb shell

me@mylaptop:~$ adb shell
This will start an sh shell. Generally you want to use a bash shell instead, so we recommend starting bash right away. Running adb shell followed by starting ‘bash’ will look like this:

me@mylaptop:~$ adb shell
/ # bash
yocto:/#
You should see the ‘yocto’ prompt after starting bash. To confirm, you can also look at the SHELL variable:

yocto:/# echo $SHELL
/bin/bash
Exit out of adb shell
Just use the exit command to exit. If you started a bash shell inside the sh shell as described above, you will need to run exit twice to exit out of each. The process to start a shell, start bash, and exit again looks like this:

me@mylaptop:~$ adb shell
/ # bash
yocto:/# echo “I am inside VOXL!”
I am inside VOXL!
yocto:/# exit
exit
/ # exit
me@mylaptop:~$
Run Something Once with adb shell
If you don’t want to start an interactive shell, but just want to run one command on VOXL, you can pass the command directly to adb shell.

me@mylaptop:~$ adb shell echo “I am inside VOXL”
I am inside VOXL
me@mylaptop:~$
Wait for Device
A useful command for creating scripts for host-to-target communications is this one that sits and waits until a device is connected:

me@mylaptop:~$ adb wait-for-device
Copying Files
You can copy files to/from VOXL (similar to scp) using the adb push and adb pull commands.

For example, to copy /temp/test.dat to the VOXL at /:

me@mylaptop:~$ adb push /tmp/test.dat /
/tmp/test.dat: 1 file pushed.
To copy it back from the VOXL at /test.dat to /temp

me@mylaptop:~$ adb pull /test.dat /tmp
/test.dat: 1 file pulled
Reboot VOXL
You can reboot VOXL with a single adb command adb reboot. This is often followed by adb wait-for-device which returns when VOXL has finished rebooting.

me@mylaptop:~$ adb reboot
Next Step: Flash system image

BS instruction: says to download the latest image and gives a link to https://developer.modalai.com/asset There it’s a list of stuff, says voxl1 and voxl2 and then down the list is dockwer images. So where or what are the images to download,
do i go into the vixl1 directory and download frtom there or do i go into the doker images folder. What is Docker?

trying to flash new firmware to voxl

first install adb toolkit
git clone https://github.com/ASHWIN990/ADB-Toolkit.git

cd ADB-Toolkit

sudo chmod +x install.sh

sudo ./install.sh -i “or” sudo bash install.sh -i
System installed took a cuple minutes but said install complete,
USAGE = ‘sudo ./ADB-Toolkit.sh’ or you can do ‘sudo adb-tookit’ from anywhere in shell

Fastboot? t’s actually a protocol that we interact with using another file, Fastboot.exe. Unlike with ADB commands though, we’re only able to execute Fastboot commands successfully when the smartphone or tablet is in Fastboot Mode.

Fastboot Mode is one of the many special “boot modes” for Android. It’s used to give us an even higher level of access to the filesystem than we are allowed to have once the Android OS is fully booted.
sudo apt-get install android-tools-fastboot android-tools-adb
system responded with already installed

Ready set wait!! This is step #3 Update File system image
this is there command me@mylaptop:~/modalai-M-m-b$ sudo ./install.sh
This did not work, we went to the directory where the extracted files were using file manager and in the drop down was the option to open in terminal. open install.sh and it will run

exit

get back to voxl so we con do the reconfigure
me@mylaptop:~$ adb shell
bash
you should be in Voxl
voxl-configure-mpa –factory-reset
should say finished

Next WIFI
these steps were completed and both modes were verified
Configure Station Mode
To configure the VOXL into Station Mode, run the following command:

me@mylaptop:~$ adb shell voxl-wifi station
A reboot of VOXL is required to finish the setup:

me@mylaptop:~$ adb reboot && adb wait-for-device
Configure SoftAP Mode
To configure the VOXL into Access Point Mode with your desired SSID, use the voxl-wifi utility and reboot for the changes to take effect.

me@mylaptop:~$ adb shell voxl-wifi softap
me@mylaptop:~$ adb reboot && adb wait-for-device
The password to connect to the VOXL’s hotspot is 1234567890 and VOXL will assign itself the IP 192.168.8.1. Your device will be assigned an IP with DHCP in the 192.168.8.X subnet, usually 192.168.8.60, but not always.

Check VOXL’s IP Address
VOXL will connect to the network when it powers up. If you need to locate its IP address, you can connct via ADB and run the following command:

me@mylaptop:~$ adb shell ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:81 errors:0 dropped:0 overruns:0 frame:0
TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6140 (5.9 KiB) TX bytes:6140 (5.9 KiB)

wlan0 Link encap:Ethernet HWaddr 48:5F:99:9D:40:9D
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
inet6 addr: fe80::4a5f:99ff:fe9d:409d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:218 errors:0 dropped:0 overruns:0 frame:0
TX packets:141 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3000
RX bytes:23365 (22.8 KiB) TX bytes:13134 (12.8 KiB)
Here you can see the localhost interface at 127.0.0.1 just as you have on your Linux host computer. The wlan0 interface is for the onboard WiFi.

Note: It’s not currently possible to assign a static IP, only DHCP is supported. If you need a static IP on your own wifi network it’s best to configure that in your router’s software.

Check WiFi Mode
Print the current mode (softap or station)

me@mylaptop:~$ voxl-wifi getmode
station
Configure hostname for Soft AP Mode (Optional)
It may be desired to have a dedicated hostname for your target instead of using an IP. This thread describes how to enable.

Free
Enroll
You cannot enroll on this course because you are not logged in.

Additional Details

  • 4 Weeks
  • 50 points
  • August 3, 2022 8:25 pm
Course Curriculum

Linux Basics

2 Lessons / 0 Quizes
Adding a new Lesson Preview 10 points 45m
Setting up a Quiz 10 points 30m
0.0
Average Rating
0%
0%
0%
0%
0%
Minimum 4 characters