Video Streaming for ARM

UV4L was originally conceived as a modular collection of Video4Linux2-compliant, cross-platform, user space drivers for real or virtual video input and output devices (with absolutely no external difference from kernel drivers), and other pluggable back-ends or front-ends.

It has evolved over the years and now includes a full-featured Streaming Server component with a customisable web UI providing a set of standard, modern and unique solutions for encrypted live bidirectional data, audio and video streaming, mirroring or conferencing over the web and for the IoT . Since recent releases UV4L has also been providing a RESTful API for the developers who want to implement their custom applications.

HDMI Capturing

The Video4Linux2 uv4l-raspicam driver for Raspberry Pi  has been extended to support the TC358743 HDMI to MIPI converter chip. This chipset is often found in the B101 capture boards made by Auvidea.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Video broadcast via Wifi

This projects uses a interesting DIY approach to broadcast video via wifi. Video transmitter and receiver are never directly associated. The receiver is put into monitor mode. This results in a transmission that behaves more like a analog solution. With a weaker signal there is not an immediate disruption of the transmission but a degradation because of packet loss.

 

Wifibroadcast – Analog-like transmission of live video data

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

HowTo Enable the RaspiCam in Octoprint

First, if you haven’t already, activate the camera in raspi-config. Login via SSH type “sudo raspi-config” select “Interfacing Options” and enable the camera.

Configuring the camera

Now edit “sudo nano /boot/octopi.txt” uncomment the camera=”auto” line and change it to camera=”raspi”. Uncomment camera_raspi_options=”-fps 10″. These settings configure the camera to provide and image in the format 640×480@10fps. If you would like to change that check the available options at: https://github.com/foosel/OctoPrint/wiki/MJPG-Streamer-configuration

Enabling the camera in the octoprint browser interface

In the browser click on the little wrench in the top bar to open the settings dialog. Select “Webcam & Timelapse”. Set the “Stream URL” parameter to “http://octopi.local:8080/?action=stream”. Obviously change the hostname if you have configured it to something different.

Finally restart octoprint for the changes to take effect.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Reverse Port Forwarding

On the remote computer

Create a ssh connection to the home computer and start a local ssh server listening on port 2210 on it.

 ssh -R 2210:localhost:22 homeuser@[home-ip]

add –C to activate compression

add -f -N to put the process into the background

On the home computer

Connect to the local ssh server created by the remote connection.

ssh -p 2210 remoteuser@localhost
Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

Disable Bluetooth on the Raspberry Pi Zero W

The onboard Bluetooth device of the Raspberry Pi Zero W and the Pi 3 can be disabled by adding dtoverlay=pi3-disable-bt to the config.txt file. Wifi is disabled with dtoverlay=pi3-disable-wifi.

The config.txt file is read by the GPU before the ARM CPU and Linux are initialised. It must be located on the first (boot) partition of your SD card alongside bootcode.bin and start.elf. This file is normally accessible as /boot/config.txt from Linux, and must be edited as root. From Windows or OS X it is visible as a file in the only accessible part of the card. If you need to apply some of the config settings below, but you don’t have a config.txt on your boot partition yet, simply create it as a new text file.

Any changes will only take effect after you have rebooted your Raspberry.

More boot config options for the Raspberry devices are documented here: https://www.raspberrypi.org/documentation/configuration/config-txt/

Gearbest promotion

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone

HowTo build the Marlin 3D Printer Firmware on the Raspberry Pi

If you are already running the excellent octoprint as a printserver on a Raspberry Pi it is very convenient to also build Marlin on it. The new Raspberry Pi Zero W with onboard wifi is at only 10$ just perfect for both tasks. If you want to use the camera streaming of octoprint I would recommend a Pi3 though.

I made a script that sets up the necessary build environment and provides commands for building and uploading. It uses the official Arduino toolchain. Everything is standalone, nothing is installed outside the marlintool directory.

It works on the Raspberry Pi and Linux in general but not on OSX. The script auto detects the build platform architecture. At the moment Linux 32 Bit, 64 Bit and ARM are supported.

Several parameters at the beginning of the script allow to adapt it further to your needs. Recently Anet A6/A8 support has been merged back into the main Marlin branch. I would highly recommend to switch to the official Marlin branch from now on. You can find example configurations for Anet printers in the Marlin sources at: https://github.com/MarlinFirmware/Marlin/tree/1.1.x/Marlin/example_configurations/Anet. Just replace the “Configuration.h” and “Configuration_adv.h” in the marlin directory with the files your find there for a good starting point of your configuration.

If you do not need additional hardware/board definitions because you use the ones that come with the toolchain set the parameter “hardwareDefinitionRepo” to an empty string. This prevents the script from fetching the board definition that is needed for the A8 from github.

If you are running octopi on you Raspberry you need to disconnect it from your printer before uploading otherwise the serial port is blocked.

Code

here on github: https://github.com/mmone/marlintool

or download directly as a zip: https://github.com/mmone/marlintool/archive/master.zip

Commandline parameters

-s  — setup

Download and configure the toolchain and the necessary libraries for building Marlin. Also fetches the Anet board hardware definition from github if specified.

-m  — marlin

Download Marlin sources.

-f –fetch

Update an existing Marlin clone.

-v  — verify

Build without uploading.

-u  — upload

Build and upload Marlin. If you are running octopi on you Raspberry you need to disconnect it before uploading otherwise the serial port is blocked.

-b  –backupConfig  [name]

Backup the Marlin configuration to the named backup.

-r  –restoreConfig [name]

Restore the given configuration into the Marlin directory.

-c  — clean

Cleanup everything. Remove Marlin sources and Arduino toolchain.

-p  — port [port]

Set the serialport for uploading the firmware. Overrides the default set in the script.

-h  — help

Show help.

Tweet about this on TwitterShare on Google+Share on FacebookPin on PinterestShare on RedditShare on LinkedInShare on StumbleUponEmail this to someone