WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [TUTORIAL] HP T510 Internet Radio  (Read 3725 times)

Offline evertvaningen

  • Jr. Member
  • **
  • Posts: 60
[TUTORIAL] HP T510 Internet Radio
« on: June 20, 2017, 07:36:34 AM »
HP T510 Internet Radio


System spec:
Installation: Tiny Core Plus
CPU: Via Eden 1GHz
SSD: 1GB IDE Flash Module
RAM: 2GB DDR3
Wifi: Broadcom BCM43228


I had a Thin client lying around and I wanted a Internet Radio in my kitchen. The radio hooked to the kitchen speakers has a bad antenna so I figured
to get a cheap USB powered FM-transmitter to let the Thin Client communicates with the old Radio.
This Thin Client has a 1GB IDE Flash Module... a storage capacity insufficient to install Windows so I thought A Great way to learn Tiny Core :P
I asked my questions on this form and the support was awesome...

Great thanks to Juanito, Misalf, gerald_clark, coreplayer2, curaga, patrikg and polikuo for helping me out.  ;) 8) :o



Things to do:
1.   Install Tiny Core Plus
2.   Install WiFi Driver
3.   Make WiFi connection
4.   Auto connect to Wifi on boot
5.   Get sound working
6.   Install a player and make it open a internet radio on boot.
7.   Make the power button press initialize Shutdown




1: Installing Tiny Core Linux Plus
Make a Bootable Tiny Core Linux Plus USB and boot from it.

Select:
Boot Core with X/GUI (TinyCore) + Installation extention.

1.   Click on the tc-install icon on the right in the appbar
2.   Click on the “Path to core.gz:” white bar
3.   Click on the “Show:” drop down menu and select All Files (*)
4.   Double click on mnt/
5.   Double click on sdb1/
6.   Double click on boot/
7.   Select core.gz
8.   Click on OK
9.   Mark Whole Disk
10.   “select disk for core” click on sda
11.   Click 4X on the right arrow
12.   Click on Proceed

When installation is complete, remove your Boot USB and Click on the most left icon in the appbar.
Click OK to Shutdown.



2: Installing WiFi driver:

*Internet needed
Click on “Apps” In the Appbar, in the top left corner click the Apps button.
Click on Cloud (remote)
Click on browse… search for nano (program to edit and save files)
Install nano.tcz

Search for wl and install the wl-modules-(current version)-tinycore.tcz extention.

Open terminal and type
Code: [Select]
nano /etc/sysconfig/tcedir/boot/extlinux/extlinux.confUse the arrow keys to go to the back of the longest line and add: blacklist=b43,ssb,bcma

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Backup your files
Code: [Select]
filetool.sh -b


3: Make Wifi connection:

Click on “Apps” In the taskbar, in the top left corner click the Apps button.
Click on Cloud (remote) (you need to be connected to Ethernet by cable to load the extension library)
Click on browse… search for wifi
Install wifi.tcz

Disconnect your Ethernet cable

Code: [Select]
filetool.sh –b
Code: [Select]
sudo exitcheck.sh reboot
Click on the WiFi icon.
Insert the number corresponding with your detected WiFi and enter password if needed.



4: Auto connect to Wifi

Edit the bootlocal file to attempt connection at boot time (optional)
   
Code: [Select]
nano /opt/bootlocal.sh/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

So it looks like:
#!/bin/sh
# put other system startup commands here
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Finally be sure to backup before poweroff or reboot.
Code: [Select]
filetool.sh -b
Code: [Select]
sudo exitcheck.sh reboot
When your system is booted again open a terminal and ping google.com:
Code: [Select]
ping -c2 google.com


5: Get Sound working

Install extensions
Install alsa.tcz
Install asla-config.tcz

Load alsa-config before asla
Code: [Select]
nano /etc/sysconfig/tcedir/onboot.lst and put asla-config.tcz just above alsa.tcz

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Auto unmute and set volume to 83 on boot
Code: [Select]
echo "amixer set "Master" 39 unmute" > ~/.X.d/alsaunmute
Make a backup
Code: [Select]
filetool.sh -b
Code: [Select]
sudo exitcheck.sh reboot
To test the audio
Code: [Select]
speaker-test -Ddefault:0 -c2 -t wav -l1


6: Install a player and make it open a internet radio on boot.

Install extensions
Install mplayer.tcz

Make file
Code: [Select]
Nano  ~/.X.d/Playradio
Containing:
{
while true; do ping -c1 91.221.151.155 && break || sleep 1; done
xterm -e mplayer "http://91.221.151.155:80/;?.mp3"
} &

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Quote
The http://91.221.151.155:80/;?.mp3 is the adres of the file with is streamed from the internet Radio Website



7: Make the power button press initialize Shutdown

Install extensions
Install acpid.tcz

Make needed directory
Code: [Select]
Sudo mkdir /usr/local/etc/acpi/actions/
You need to create two files
FILE 1
Code: [Select]
Sudo Nano /usr/local/etc/acpi/actions/powerbtn.sh
Containing:
#!/bin/sh
exitcheck.sh

Ctrl + O (Save) *press enter Ctrl + X (Exit)

FILE 2
Code: [Select]
Sudo Nano /usr/local/etc/acpi/events/power-button
Containing:
event=button/power
action=/usr/local/etc/acpi/actions/powerbtn.sh

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Make powerbtn.sh executable
Code: [Select]
sudo chmod +x /usr/local/etc/acpi/actions/powerbtn.sh
Save acpi settings
(add extension to backup directory or nothing from this step will be saved after reboot)
Code: [Select]
Sudo nano /opt/.filetool.lstAdd: usr/local/etc/

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Start acpid daemon on boot
Code: [Select]
Nano /opt/bootlocal.shAdd: /usr/local/etc/init.d/acpid start

Ctrl + O (Save) *press enter Ctrl + X (Exit)

Backup
Code: [Select]
filetool.sh -b

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 722
Re: [TUTORIAL] HP T510 Internet Radio
« Reply #1 on: June 20, 2017, 10:22:38 AM »
 :)

Thank you, it's the community that brings our own small/large Linux projects into success.



Offline kappclark

  • Newbie
  • *
  • Posts: 6
    • Clark-Hart Genealogy
Re: [TUTORIAL] HP T510 Internet Radio
« Reply #2 on: July 19, 2017, 11:31:36 AM »
Nice project !
*************
*    Bill Clark     *
* Windham, VT *
*************