Posts

Ubuntu UFW app profile for Steam Link Game Streaming

I've recently tried Steam Link to stream game to my Android device but quickly found out it was blocked due to UFW firewall. I've found this GitHub issue and UFW settings: https://github.com/ValveSoftware/steam-for-linux/issues/4803#issue-200408537 To make it convenient, I've created an app profile file to be placed in /etc/ufw/application.d/ folder so that we can easily added or removed from ufw. Here's the steps: 1. Create a text file /etc/ufw/application/steam_link with the following content: [SteamLink] title=Steam Link description=Steam Link Game Streaming ports=27037/tcp|27031/udp|27036 2. After the file is saved, it should now appear in the list with "ufw app list" command. For example: $ sudo ufw app list Available applications:   CUPS   OpenSSH   Postfix   Postfix SMTPS   Postfix Submission   SteamLink 3. To allow the new steam link application rule, I use the following to command to only allow it on my local LAN: $ sudo ufw allow...

Fake screw! Fake terminal block! And modifying multi-color LED ceiling lamp's default behavior

Image
I've recently bought some LED ceiling lamps that supports multiple color temperature (daylight,warm white and "natural" white) by toggling the power switch as below. However, I prefer the default color to be warm white instead of daylight as it will be installed in a bedroom and less blue light might help with my occasional insomnia. So I decided to try to modify since it should not be too hard since they LEDs and a constant current LED driver like below. First I tried to open up the LED driver and have a look at the circuit inside. But when I tried to turn my screw driver on the 2 screws on the orange colored part, it didn't turn at all. Upon closer inspection, it seems that those are fake plastic molded screw! After a while, I figured out that the entire orange colored terminal block was also fake! 😆 It is just piece of plastic held together those snap-on plastic parts. Hahaha.. I guess this is not too surprising since it comes from the count...

Raspberry PI's hardware random number generator for /dev/random

I've stumble upon that Raspberry PI has a built in hardware random number generator. http://scruss.com/blog/2013/06/07/well-that-was-unexpected-the-raspberry-pis-hardware-random-number-generator/ The BCM2835 datasheet also does not provide any info about the RNG. I also found out that the kernel module is also loaded: pi@raspberrypi ~ $ lsmod | grep bcm snd_bcm2835            22317  0  snd_pcm                92397  1 snd_bcm2835 snd                    66972  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device bcm2835_rng             2215  0  bcm2835_gpiomem         3703  0 However, it is currently not fed to /dev/random Also, occasionally, I realize there is a long pause when trying to log in to SSH when the random entropy pool runs out because I'm using it mos...

Simple PIC16F72-based digital clock with DS32KHZ TCXO

Image
Just to keep this blog updated, I've made a digital clock with a DS32KHZ TCXO to provide accurate time keeping. Details are at github: https://github.com/sonofusion82/ds32khz_clock

Fixing USB audio controller (CM108) for headphones

Image
Cheap USB audio controller Recently, I bought a cheap USB audio controller because my motherboard's built-in microphone input was dead. However, there were some problems with the stereo output. It seems to work well when it was connected to a pair of powered speakers, but there was only noise when connected directly to my earphones. When I measured the output voltage, it shows a 2 - 4 V bias voltage which is unusual because it should not have any bias voltages and normally 0 V when no audio. When plugged into my Linux machine, lsusb shows the following: $ lsusb | grep -i audio Bus 005 Device 003: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller So, with a little googling for CM108, I found that the datasheet at  http://www.halicky.sk/om3cph/sb/CM108_DataSheet_v1.6.pdf and also Kevin Custer's site about modifying it http://www.repeater-builder.com/projects/fob/startech-fob.html When I opened up the device and compare it with Kevin Custer's photos,...

Missing xterm on Linux Mint when installing Juniper Network Connect

I was trying to connect to company SSL VPN that uses Juniper Network Connect on Linux Mint 17 64-bit. However, the network connect dialog keeps shutting down after launch for  a few seconds. I've followed their support documentation at http://kb.juniper.net/InfoCenter/index?page=content&id=KB25230 but it was still not working. After a bit digging around, I found the log fail at ~/.juniper_networks/network_connect/installnc.log shows missing xterm. After installing xterm with sudo apt-get install xterm, I can finally connect successfully to the VPN.

Changing nice level for transmission-daemon

Raspberry Pi has rather limited CPU power, so I wanted to reduce the priority of the transmission-daemon. To do that I found that we can modify /etc/init.d/transmission-daemon script to add the --nicelevel option as below: start_daemon () {     if [ $ENABLE_DAEMON != 1 ]; then         log_progress_msg "(disabled)"                 log_end_msg 255 || true     else             start-stop-daemon --start \         --nicelevel 5 \         --chuid $USER \                 $START_STOP_OPTIONS \         --exec $DAEMON -- $OPTIONS || log_end_msg $?                 log_end_msg 0     fi } Reference:  http://man.he.net/man8/start-stop-daemon