10 episodes

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

Hacker Public Radio Hacker Public Radio

    • Technology

Hacker Public Radio is an podcast that releases shows every weekday Monday through Friday. Our shows are produced by the community (you) and can be on any topic that are of interest to hackers and hobbyists.

    HPR3015: ActivityPub Conference 2019 - The Semantic Social Network

    HPR3015: ActivityPub Conference 2019 - The Semantic Social Network

    The ActivityPub Conference of 2019 was held in Prague. This is about a talk using ActivityPub to create the Semantic Social Network. https://www.zwilnik.com/?page_id=1086
    Links:

    https://redaktor.me/apconf/
    https://archive.org/details/apconf-talks/Talk3_Pukkamustard_compressed.mov
    http://schema.org/
    https://schema.org/servesCuisine
    https://schema.org/areaServed
    https://5stardata.info/en/
    https://moz.com/blog/json-ld-for-beginners
    https://en.wikipedia.org/wiki/Fediverse
    https://www.zwilnik.com/?page_id=1086

    HPR3014: A Headless Raspberry Pi Streaming Radio

    HPR3014: A Headless Raspberry Pi Streaming Radio

    In this episode I talk about how I used a Raspberry Pi to create a streaming radio device to feed my pillow speaker. This is something I used to do with clock radios and later a satellite radio, but in an effort to decrease monthly subscription costs for services I did not use optimally, I discontinued my satellite radio subscription about a year ago. This new free solution is an excellent substitute for Satellite Radio so far, since I was mostly listening to this same channel on the Sat Radio but paying about $12 a month for the privilege. The device I’m using is a Raspberry Pi 2 Model B with Ubuntu Server. My barrier to this project in the past was not being able to find the URL for the stream I wanted but I discovered you can find it easily if you use Firefox with Video Download Helper to reveal the URL on a page with media playing (in this case it’s from TuneIn):

    http://XX.XXX.XXX.XXX/radio-stationmp3-48?session-id=af1b271fefba04b650f8e253c6b253bd&source=TuneIn


    Strip off everything after the 48 to get raw URL:

    http://XX.XXX.XXX.XXX/radio-stationmp3-48


    Command to play stream with mpg123 on the Pi. Using the -q option to suppress output:

    mpg123-pulse -q http://XX.XXX.XXX.XXX/radio-stationmp3-48 &


    Once I figure out the command that plays the stream I want, I save the command as an executable script in /home/$user/bin.

    Using the “Radio”

    To start playing a stream you first have to SSH into the RasPi. This is easy from a laptop using any terminal emulator. I use pubkey auth so I don’t have to type a password every time. On my phone I use ConnectBot. Once I’m into the Pi I run the radio commands from CLI like espn or kmfa or krvs. To stop playback I kill the process with pkill mpg. I have a 3.5mm audio splitter Plugged into the headphone jack of the USB audio interface. In one side of the splitter I’ve got an old pair of earbuds where one side didn’t work, with the working earbud under my pillow. That’s my pillow speaker. On the other side of the splitter I put the audio cable for an FM transmitter, so that I can use an FM radio to listen to the stream while I’m walking around the house.

    Click the image below to see pictures of the setup.



    Links


    Raspberry Pi 2 Model B
    Ubuntu Server
    Video Download Helper (Firefox extension)
    The USB Audio interface I use
    Panda Wireless USB WiFi adapter
    mpg123 command-line audio player
    ConnectBot
    C. Crane FM Transmitter

    HPR3013: Bash Tips - 21

    HPR3013: Bash Tips - 21

    The Environment (More collateral Bash tips)
    Overview
    You will probably have seen references to The Environment in various contexts relating to shells, shell scripts, scripts in other languages and compiled programs.
    In Unix and Unix-like operating systems an environment is maintained by the shell, and we will be looking at how Bash deals with this in this episode. When a script, program or subprocess is invoked it is given an array of strings called the environment. This is a list of name-value pairs, of the form name=value.
    Using the environment
    The environment is used to convey various pieces of information to the executing script or program. For example, two standard variables provided by the shell are 'HOME', which is set to the current user’s home directory and 'PWD, set to the current working directory. The shell user can set, change, remove and view environment variables for their own purposes as we will see in this episode. The Bash shell itself creates and in some cases manages environment variables.
    The environment contains global data which is passed down to subprocesses (child processes) by copying. However, it is not possible for a subprocess to pass information back to the superior (parent) process.
    Viewing the environment
    You can view the environment in a number of ways.

    From the command line the command printenv can do this (this is usually but not always a stand-alone command: it’s /usr/bin/printenv on my Debian system). We will look at this command later.
    The command env without any arguments does the same thing as printenv without arguments. This is actually a tool to run a program in a modified environment which we will look at later. The environment printing capability can be regarded as more of a bonus feature.
    Scripting languages like awk (as well as Python and Perl, to name just a few) can view and manipulate the environment.
    Compiled languages such as C can do this too of course.
    There are other commands that will show the environment, and we will look at some of these briefly.

    Changing variables in the environment
    The variables in the environment are not significantly different from the shell parameters we have seen throughout this Bash Tips series. The only difference is that they are marked for export to commands and sub-shells. You will often see variables (or parameters) in the environment referred to as environment variables. The Bash manual makes a distinction between ordinary parameters (variables) and environment variables, but many other sources are less precise about this in my experience.
    The standard variables in the environment have upper-case names (HOME, SHELL, PWD, etc), but there is no reason why a variable you create should not be in lower or mixed case. In fact, the Bash manual suggests that you should avoid using all upper-case names so as not to clash with Bash’s variables.
    Variables can be created and changed a number of ways.

    They can be set up at login time (globally or locally) through various standard configuration files. It is intended to look at this subject in an upcoming episode so we will leave discussing the subject until then.
    By preceding the command or script invocation with name=value expressions which will temporarily place these variables into the environment for the command
    Using the export

    HPR3012: Sample episode from Wikipediapodden

    HPR3012: Sample episode from Wikipediapodden

    Jan Ainali from the http://wikipediapodden.se/ podcast came over to the http://freeculturepodcasts.org/ booth at FOSDEM 2020.


    They do a Swedish Language Podcast about wikipedia et al, and of course we added them to the http://freeculturepodcasts.org/ site. While their main shows are in Swedish, they also have summaries that they do in English which can be found at http://wikipediapodden.se/tag/english/, (RSS Feed).

    HPR3011: Linux is HARD rant with Intel graphics

    HPR3011: Linux is HARD rant with Intel graphics

    Help me help you! I rant about linux and Video drivers etc …
    Get Video and CPU Info
    chrome://gpu
    # gives you info about video GPU in chrome!
    chrome://gpu
    phoronix-test-suite system-info
    # neat little project to dump out all kinds of info
    phoronix-test-suite system-info
    # get hard disk temperatures !

    hddtemp /dev/sdb
    /dev/sdb: WDC WD4003FZEX-00Z4SA0: 37°C
    hddtemp /dev/sdc
    /dev/sdc: WDC WD4003FZEX-00Z4SA0: 36°C
    vainfo - display information from VA API driver
    lspci specific device
    lspci -v -s 00:02.0
    00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop) (prog-if 00 [VGA controller])
    Subsystem: ASRock Incorporation Device 3e92
    Flags: bus master, fast devsel, latency 0, IRQ 126
    Memory at a0000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 90000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 4000 [size=64]
    [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
    Capabilities: [40] Vendor Specific Information: Len=0c <?>
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Capabilities: [d0] Power Management version 2
    Capabilities: [100] Process Address Space ID (PASID)
    Capabilities: [200] Address Translation Service (ATS)
    Capabilities: [300] Page Request Interface (PRI)
    Kernel driver in use: i915
    Kernel modules: i915
    lshw
    # lshw is a small tool to extract detailed information on the hardware configuration of the machine

    lshw -c video
    *-display
    description: VGA compatible controller
    product: UHD Graphics 630 (Desktop)
    vendor: Intel Corporation
    physical id: 2
    bus info: pci@0000:00:02.0
    version: 00
    width: 64 bits
    clock: 33MHz
    capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
    configuration: driver=i915 latency=0
    resources: irq:126 memory:a0000000-a0ffffff memory:90000000-9fffffff ioport:4000(size=64) memory:c0000-dffff
    glxinfo
    The glxinfo program shows information about the OpenGL and GLX implementations running on a given X display.
    glxinfo | egrep -i 'device|memory|OpenGL|direct'
    dmesg
    dmesg | grep -e IOMMU -e DMAR

    dmesg | grep -E 'drm|radeon' | grep -iE 'firmware|microcode'
    dmesg | grep -i -e i915 -e drm -e vga
    dmidecode - DMI table decoder
    dmidecode -t baseboard | grep -i 'Product'
    GPU usage
    apt-get install intel-gpu-tools | intel_gpu_top
    Google Dorks

    when googleing try -ubuntu -xubuntu
    when searching for start up stuff use ‘systemd’ in your query

    HPR3010: FOSDEM first impressions

    HPR3010: FOSDEM first impressions

    FOSDEM is the biggest Free and Open Source conference in the world and on its 20th anniversary I decided to attend for the first time. By a good turn of fate, and some well-judged pitching, Ken Fallon secured a stand for the Free Culture Podcasts project which is an umbrella group that covers HPR, many of the shows on The Other Side Network and many more excellent podcasts that are released under creative commons licenses.

    This audio is recorded in snippets in between manning the stand and gives some off-the-cuff observations from a FOSDEM noob. I was surprised to find that relatively few visitors to our stand had heard of HPR, which we quickly rectified of course, and I give a brief summary of the feedback we received. Also mentioned in this show, but not actually appearing, are my co-conspirators at FOSDEM, Ken, Beni, JWP as well as Dave Morriss who unfortunately wasn't able to join us in person but was very much there in spirit.

Top Podcasts In Technology

Listeners Also Subscribed To