07.04.2020

Using a video capture usb stick with Linux / Ubuntu

Three weeks ago i ordered a video capture usb stick at banggood and today it arrived:




So will this device work with my ubuntu?

I inserted the stick on my laptop and dmesg showed:

[123483.143071] hid-generic 0003:534D:0021.0002: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4

That was all...
But there was a module missing:

modprobe uvcvideo
and after that:
[125822.751366] usb 1-1: new high-speed USB device number 19 using xhci_hcd
[125822.901442] usb 1-1: New USB device found, idVendor=534d, idProduct=0021
[125822.901449] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[125822.901454] usb 1-1: Product: AV TO USB2.0
[125822.901458] usb 1-1: Manufacturer: MACROSILICON
[125822.901478] usb 1-1: SerialNumber: 20150130
[125822.902702] uvcvideo: Found UVC 1.00 device AV TO USB2.0 (534d:0021)
[125822.902835] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[125822.904681] uvcvideo 1-1:1.0: Entity type for entity Processing 2 was not initialized!
[125822.904691] uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
[125822.911070] hid-generic 0003:534D:0021.0004: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4
Checking with
root@zerberus:~# ffmpeg -sources |grep video
Auto-detected sources for video4linux2,v4l2:
  /dev/video1 [AV TO USB2.0]
  /dev/video0 [HD WebCam: HD WebCam]
plus:
root@zerberus:~#  ffmpeg -list_formats all -i /dev/video1

[video4linux2,v4l2 @ 0x55b0d1ca38c0] Compressed:       mjpeg :          Motion-JPEG : 480x320 640x480 720x480
[video4linux2,v4l2 @ 0x55b0d1ca38c0] Raw       :     yuyv422 :           YUYV 4:2:2 : 480x320
/dev/video1: Immediate exit requested

Now i was able to open /dev/video1 with VLC:



The video came from a camera connected via TS832 --[5.8GHz]--> RC832...





04.04.2020

Smartphone: Installing lineageOS + Googles Play Store (and getting 9GB system space freed up)


After installing TWRP as bootloader i was wondering, how much effort is is to install an alternative to android on my old smartphone.

Heimdall & ADB were in place (see TWRP posting) - so let's start!

I downloaded the appropriate image from https://lineageos.org/ and i did the following on my smartphone:
Click on "Wipe"
 Click on "Format Data"
 Type "Yes"
 Wait
 Step two times back and click "advanced wipe"
Choose "Cache" and "System" and swipe to the left

Step back to home screen and choose "Advanced"
 Swipe to the left
and then type:

sudo ./adb sideload ~/Downloads/lineage-16.0-20200325-nightly-a3xelte-signed.zip 

[sudo] password for schroff: 

Total xfer: 1.02x                                                                                  
and then REBOOT...
(if you want a clean lineage OS)

If you want the google play store, then go to https://opengapps.org/


Download the appropriate package (i chose "pico" - https://github.com/opengapps/opengapps/wiki/Package-Comparison)

Then repeat the steps on TWRP (smartphone) for sideloading and type

sudo ./adb sideload ~/Downloads/open_gapps-arm-9.0-pico-20200403.zip

Total xfer: 1.43x                      



And after that the smartphone starts up with lineage OS and play store (To avoid problems: do not connect to mobile networks neither wifi within the startup wizard - this can result in a black screen and the wizard will never end).
The best thing: with Samsungs stock Android about 13GB was blocked by the system. Now only 4GB from 16GB are used. So i got additional 9GB free space. Really cool!

03.04.2020

Using a custom bootloader for my smartphone: TWRP on Samsung Galaxy A3

I read about /e/ some days ago and i decided to install this on my old smartphone (a samsung A3).

So first: What is /e/?
https://doc.e.foundation/
So i started at

https://doc.e.foundation/devices/a3xeltexx/install
where i learned, that i have to install a custom bootloader on my smartphone. This is very good explained at /e/:

(You will find there the description how to install "heimdall" and "adb")

schroff@zerberus:~/bin$ sudo ./heimdall flash --verbose --RECOVERY ~/Downloads/twrp-3.3.0-0-a3xelte.img --no-reboot
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "SAMSUNG"
           Product: "Gadget Serial"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
WARNING: Empty bulk transfer after receiving packet failed. Continuing anyway...
PIT file download successful.

Uploading RECOVERY
0%ERROR: Failed to unpack received packet.

ERROR: Failed to receive file part response!
3%
7%
10%
14%
17%
21%
25%
28%
32%
35%
39%
42%
46%
50%
53%
57%
60%
64%
68%
71%
75%
78%
82%
85%
89%
93%
96%
100%
RECOVERY upload successful

Ending session...
Releasing device interface...
and then:
For more information take a look at https://twrp.me/

18.03.2020

Ubuntu: Disable screenlock after resuming from hibernation

There are many tutorials out there, how to disable the screen locking.

The problem with these solutions is, that still after resuming from hibernation / standby the screenlock is triggered.

To disable this behaviour you can check this:
schroff@zerberus:~/$ gsettings get org.gnome.desktop.screensaver ubuntu-lock-on-suspend
true
and then do:

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
If you want to do it via gui you have to install dconf-editor
apt install dconf-editor
Here you have to change the second last line "ubuntu-lock-on-suspend".

15.03.2020

Streaming a live-stream... [ffmpeg + vlc for m3u8]

After writing about how to stream a file to some smartphones or tablets, now the commands for streaming a live-stream to other devices.

And like before: VLC is needed.


But in addition to vlc you have to use ffmpeg:
A complete, cross-platform solution to record, convert and stream audio and video.

First thing you need is the url of the live-stream you want to re-stream. In my case is took the "Zweites Deutsches Fernsehen" (secondary channel of germany) and their url is
https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8
(In most of the tv channels it is something like "master.m3u8")
m3u is the acronym for MP3 URL and m3u8 uses UTF-8.

So the command for streaming is:
ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - | vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep
 which consists of

ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - 
which is piped into
 vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep
(this is the command i build up in the last posting.)

Have fun!

Streaming a video file with vlc to other devices (like smartphones, etc.)

If you want to look a video on a tablet or smartphone (or laptop) and the file is on a server in your network, you can do this very easily with vlc.
One big advantage: The video can be consumed by many devices - so the movie can be watched on e.g. 3 tablets...

What do you have to do?
Install vlc on your computer (i used a ubuntu laptop) and start vlc.
Next step is to open the menu: media -> stream... (or press Strg-S):

Then select the video on your disc with "+Add":
 After that click on "Stream" and this window will open:
 Click "Next" and then choose "HTTP" and press "Add"
 On the next window you have to enter the port and URL, where the devices have to connect to (in my example, the ip of my laptop was 192.168.178.39 - so the URL is 192.168.178.39:8080/test)
 Then you should select this setting and click on the wrench (="settings"):
 Here you have to select "Keep original audio track", otherwise audio will not work:

Last window before the streaming starts:
Copy the string to your clipboard
:sout=#transcode{vcodec=h264,scale=Auto,scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/test} :no-sout-all :sout-keep
 After that install vlc on your device, start it and enter the URL:
 Press "Verstanden und weiter" ;-)
 and here we go:

If you want to skip the wizard, just open vlc with the string from your clipboard
(you have to escape the curled brackets!):

vlc test.mp4 :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep

14.03.2020

Squid: How to setup a proxy...


If you are limited on bandwidth and you want to setup several machines, using a caching proxy will speed up your installation process significantly.



What is a caching proxy:
https://en.wikipedia.org/wiki/Proxy_server#Improving_performance

But proxies have some issues, that you should be aware of:
https://en.wikipedia.org/wiki/Proxy_server#Content-control_software

If you are sure, to use a proxy, just enter these commands:

root@zerberus:~# apt install squid
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libdbi-perl libecap3 squid-common squid-langpack
Suggested packages:
  libmldbm-perl libnet-daemon-perl libsql-statement-perl squidclient squid-cgi
  squid-purge resolvconf smbclient winbindd
[....]

Unpacking squid (3.5.27-1ubuntu1.5) ...
Setting up libecap3:amd64 (1.0.1-3.2) ...
Setting up squid-langpack (20170901-1) ...
Setting up squid-common (3.5.27-1ubuntu1.5) ...
Setting up libdbi-perl (1.640-1) ...
Setting up squid (3.5.27-1ubuntu1.5) ...
[....]
To check the default configuration you can use this command:
(to suppress the documentation and comments)

root@zerberus:/etc/squid# cat squid.conf |grep -v \# |grep -v -e "^$"

acl SSL_ports port 443
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all
http_port 3128
coredump_dir /var/spool/squid
refresh_pattern ^ftp:        1440    20%    10080
refresh_pattern ^gopher:    1440    0%    1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .        0    20%    4320

After the installation the squid process should be visible and listening to its default port 3128. Check this with
netstat -lntup
and you will find the following lines in the output:

tcp6       0      0 :::3128                 :::*                    LISTEN      25638/(squid-1)     
udp        0      0 0.0.0.0:45167           0.0.0.0:*                           25638/(squid-1)     
udp6       0      0 :::45347                :::*                                25638/(squid-1)     

To use this proxy just enter the proxy settings inside your system settings:


After that all of your connections are made over your proxy. You can check this via the file /var/log/squid/access.log and /var/log/squid/cache.log.

21.02.2020

Review: Blockchain for dummies

The book "blockchain for dummies" provided by IBM contains 6 chapters on 41 pages. (Download from IBM)

The chapters 1 & 2 describe the basic of blockchain technology.
From my point of view, this part is a bit too shallow, because there is no single formular inside this book ;-)
But there are some nice illustrations given:

and the differences between a public blockchain and corporate blockchains are good explained including their  consequences.

Chapter 3 is about where companies can use blockchains. This chapter i did not understand. It is all about frictions which companies have to overcome. But these frictions are not special to blockchain (like "innovation restrictions").

In chapter 4 some examples are shown. These examples are very universal examples, which are too abstract in my eyes.

Chapter 5 contains information about a project of the Linux Foundation: Hyperledger.
This is very nice opening for https://www.hyperledger.org/.

Chapter 6 comes up with ten steps to your first blockchain application.
Skippable.

My conclusion: a very nice book and really ok for free. But I wouldn't spend any money on it...

31.01.2020

Oracle BPEL: What's up with it?

Nearly 20 years ago there was a new standard for modelling business processes: BPEL (https://en.wikipedia.org/wiki/Business_Process_Execution_Language)
Oracle bought Collaxa and released the Oracle BPEL Process Manager.
In 2009 i wrote some posts over tutorials, which where from collaxa and which were very useful for starting with Oracle BPEL product:
http://dietrichschroff.blogspot.com/search?q=lost+collaxa

And what is left today?

The product is still listed on Oracle homepage:

And there is a section with some "news":


But the version number 10.1.3.4 is not really somehing new and if you open the white paper you will see:

I think a whitepaper from 2014 is not really something new. 

If you take a look on the BPEL specification at oasis (http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html), you can see, that there was no update to the BPEL standard for more than 10 years. 

It is very sad, that this concept of modelling processes in a graphical way was unsuccessful...

25.01.2020

Oracle VM Server: OVMAPI_2005E and OVMEVT_003503D_000

In my OVM environment i was trying to delete a server from a pool and this did not work. The error i got signalled was:
OVMAPI_2005E "[ServerDbImpl] xx:yy:zz:... (oraclevm)" contains a component "xx:yy:zz:..." in error. Error event: server.cluster.failure., Summary: Server Cluster Failure, Description: Failed to leave cluster OVMEVT_003503D_000 Server reboot is required..
I rebootet the server: still the same error.
I rebootet the ovm manager: still the same error.

Then i realized, that there was a red cross at my server:

The solution was: Select events from the drop down for this server:

There i had to "Acknowledge" the events and after that i was able to remove the server without any further error...