More on Pi based net/internet radio music player

First off many thanks to those who replied.

I dunno if ARM code is more compact than *86 but I ended up with a Pi Zero running Raspian lite, and, after all needed was installed, an SD memory footprint of 22Mbyte in /boot and 1.4Gbyte in /.

So the while thing COULD have run off a 2GB card instead of the 16GB I bought, with the wrong OS pre-installed (Noobs instead of Raspian. Sigh.)

Bootstrapping Raspian lite on the Pi Zero/W onto a fixed IP address in the wireless turned out after much trepidation to be a snap. I burned the SD card and then edited wpa_supplicant.conf in the /boot directory as detailed here:

formatting link

'touched' a file called '/boot/ssh'..

Then edited the /etc/dhcpcd.conf file on the SD card and added..

interface wlan0 static ip_address=192.168.0.200 static routers=192.168.0.254 static domain_name_servers=192.168.0.100

And booted the thing. which took longer than I expected, but eventually I could ssh straight in.

The C code that worked on my *86 Linux Mint desktop didn?t QUITE compile cleanly. Some header files extra were needed. But otherwise no extra libraries or code were needed.

In order to get the sound going - I had a HiFibery DAC + Zero, I needed to edit /boot/config.txt. Despite its name this card does NOT work with the hifiberry dac plus driver but only the standard one.

here are the changes # Enable audio (loads snd_bcm2835) #dtparam=audio=on

dtoverlay=pi3-disable-bt dtoverlay=hifiberry-dac

In addition I created the file

pcm.!default { type hw card 0 } ctl.!default { type hw card 0 }

Sound was now operational but there was no volume contrul via 'amixer', so on a hunch I installed pulseaudio.

That got the volume control working.

installing sox and mpg123 got flac and mp3 support going.

And my compiled backend worked on those now fine.

To get the web server going with PHP was an installation of apache2 phip and IIRC mod_php for apache.

That didn't quite work so I needed to get short tags enabled...it's been switched off somewhere by default.

That brought the web control panel up.

I installed NFS client and server for two way file access. Others might use samba. Or you could use a fat USB drive to hold your music ..

So how much CPU and RAM does it use?

Right now, running, mpg123 and pulseaudio between them are taking 16% of CPU

as far as RAM goes

free -m total used free shared buff/cache available Mem: 433 45 32 11 355 327 Swap: 99 0 99

So ~78MBytes to run the server and audio backend.

'top' reveals

Reply to
The Natural Philosopher
Loading thread data ...

On Fri, 1 Feb 2019 12:27:41 +0000, The Natural Philosopher declaimed the following:

So far as I know, NOOBS is an OS selector/installer... The default OS (ie; the one that is compressed on the NOOBS image, and not one that it goes online to download) IS Raspbian... Though likely most of the full install, not the Lite.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

It's turned off or there's something broken in your network setup.... I'm pinging 192.168.0.200 now and there's no response.

Reply to
mm0fmf

I would be shocked if you did get a response from 192.168.0.200.

192.168.0.0-192.168.255.255 is reserved by RFC 1918 for private networks and is supposed to be filtered on the open Internet. As are 10.0.0.0-10.255.255.255 and 172.16.0.0-172.31.255.255.

(Presuming that you are not connected to The Natural Philosopher's network.)

--
Grant. . . . 
unix || die
Reply to
Grant Taylor

Very funny :-)

--
Outside of a dog, a book is a man's best friend. Inside of a dog it's  
too dark to read. 

Groucho Marx
Reply to
The Natural Philosopher

I assumed he was in fact joking.

Don't tell me he was, in fact, serious...

--
Outside of a dog, a book is a man's best friend. Inside of a dog it's  
too dark to read. 

Groucho Marx
Reply to
The Natural Philosopher

whoosh!

Reply to
mm0fmf

My pleasure.

Reply to
mm0fmf

Try 127.0.0.1, you should be able to ping it there.

Reply to
Theo

Hopefully.

I've been on too many support forums / newsgroups / mailing lists / discussions in the last year where people were serious.

So I've taken to not assuming that people are joking.

--
Grant. . . . 
unix || die
Reply to
Grant Taylor

Dang! How did you know that?

Reply to
mm0fmf

Depends which sort of ARM code you are talking about.

aarch32 ARM mode is less dense than x86 as it is fixed width 32 bit instructions, where as x86 is variable width. Thumb mode is fixed 16 bit, so more dense for non trivial code. Thumb2 which is actually what most compilers emit is 16/32 mixed, and more comparable to x86, although the x86 being a mem/mem rather than a load/store architecture generally results in better code density, at the expense of performance.

aarch64 tends to be more dense than aarch32 ARM mode due in some part to the larger register bank, but mainly due to some of the many new instructions. Its also more dense than AMD64.

---druck

Reply to
druck

Looking down the process list it is also instrucytove to see how fewe priocesses weer actally ruinng,. A Lot of power and RAM goes running a desktop methinks

--
Of what good are dead warriors? ? Warriors are those who desire battle  
more than peace. Those who seek battle despite peace. Those who thump  
their spears on the ground and talk of honor. Those who leap high the  
battle dance and dream of glory ? The good of dead warriors, Mother, is  
that they are dead. 
Sheri S Tepper: The Awakeners.
Reply to
The Natural Philosopher

Yep.

Just compare what we were able to do with mainframes, minis and 8-bit microcomputers back in the day when interactive devices were 24x80 textmode terminals or teletypes:

- my university's scientific computer, an Elliott 503, had 8Kwords of 39 bit memory (call it 48KB equivalent because each word held two instructions). It used paper tape for input and a lineprinter for output and everything we ran on it was written in Algol 60.

- after university, the computer bureau where I worked had four teletype terminals plus an RJE device (remote cardreader and printer)and ran additional background jobs under a multiuser, multitasking OS on a 32 Kword (96KB equivalent) 1902S with 2 60MB disks, 6 tape drives plus card and paper tape readers and a fast (1250 lpm) printer.

- my 6809 FLEX box was a perfectly adequate development system with 48K RAM and a pair of 1.2MB floppies. I wrote code in assembler, PL/9 and C on that and so did everybody else with similar kit.

- Back in the MS-DOS days Bill Gates was on record as saying that nobody could ever need more than 640 KB of RAM (the limit for an IBM PC-AT).

RAM only mushroomed with the appearance of multicolour graphical desktops and the idea that all apps MUST have a graphical UI or users' brains would explode.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

As did I.

Indeed.

Reply to
Rob Morley

I nearly posted that, but resisted the temptation.

Reply to
Rob Morley

Mine (hand wired on a double extended Eurocard) had 56 kiB, but 8 kiB of that was OS and scratch space; yours may have been the same.

(I still have the system. I can't bear to throw it away.)

Some of us wrote our code in TSC Extended BASIC :-)

Dave

Reply to
David Higton

On Sun, 3 Feb 2019 12:41:09 +0000 (UTC), Martin Gregorie declaimed the following:

Xerox Sigma-6... Relatively fat machine for the mid-70s (four-bank/four-port, interleaved) 512kB (though I could swear ours was somehow doubled to 1Mb*). On a good day we'd often have between 40 and 60 terminals active, along with the batch queue (we actually had a Honeywell Level-6 being used as a terminal server, replacing racks of Gandalf equipment

formatting link
)

Pretty sure we had 6 100MB drives, and it was a big thing when we obtained a 300MB drive to be used for swap space.

The chip could access 1MB, but probably used some of that for memory mapped I/O (rather than using the separate I/O port/control that Intel chips supported).

  • The memory cabinets were "refrigerator" sized, originally holding magnetic core memory... However, by the late 70s, the core had been replaced with 18x18" circuit cards with RAM chips, making for a very empty looking cabinet.

The multi-port interleave allowed the CPU and three I/O Processors to chase each other through memory -- while the CPU accesses, say, word 4, the IOPs can each access words 2, 3, and 5 (again as an example) -- without having to put wait states for any other. Closest I've seen to that is the Amiga -- with the first 512kB being "chip" memory (dual ported, accessed by CPU and by special chips; extended memory was only CPU accessed)

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Perhaps you can give a reference for whatever leads you to believe that to be a true statement because it was never said by W. Gates III?

Reply to
mm0fmf

Not a lot in my recollection. At university, 40+ users on a 1MW Prime

750 seemed to stop the bugger in its tracks. The PDP-10s we had were no better and more heavily loaded.
Reply to
mm0fmf

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.