Skip to main content

Posts

Linux Network Manager Manual Commands

I have a love/hate relationship with the Linux NetworkManager daemon.  It usually works and keeps your laptop PC network connections going smoothly when you move around, but it gets in the way when one does network tests and system integration using a laptop PC. Each time you plug a cable in, or turn an embedded system off/on, NetworkManager restarts the connection and you can then lose your static IP address setting, which gets tiring really quickly in a lab setup. Usually, I completely disable NetworkManager and assign a static IP address to my machine on a laboratory bench with a script in /usr/local/bin called static : #! /bin/bash echo Configure network for PDLU access # Disable the Network Manager systemctl disable NetworkManager.service systemctl stop NetworkManager.service # Set static IP address ifconfig em1 192.168.111.1 netmask 255.255.255.0 up # Set multi casting route route add -net 224.0.0.0 netmask 240.0.0.0 dev em1 # Open up the firewall iptables -F # Show ...

Free and Open Systems - Free and Open Minds

The power of marketing, advertising and glossy brochures subtly warp people's minds to wherever advertising Dollars go.  This affects Free and Open embedded operating system software as well.   Users visit a software company web site that showcases a new software feature and they don't realize that the " new feature" is 30 years old and exists in numerous other systems also .  Some people do not understand that there is a large corpus of almost identical operating systems known as UNIX-like or POSIX compatible operating systems and that they can use any one of them and port their software between them, without shedding too many tears. Embedded OS selection criteria should therefore not concentrate on perceived feature differences, but rather on availability:  Copyrights, Patents, Licensing and Export Permits . This is especially important in small countries which are subject to the political whims of the big five, who can make you wait indefini...

Electronic Signatures - Snake Oil

Electronic signatures are commonly used in the more advanced enterprises to sign documents - PDF files mostly.  Unfortunately, the implementation is broken and it doesn't work.  The broken implementation reduces it to snake oil. A typical IT system is set up and managed by one or two overworked computer geeks who clicked through a setup wizard to configure a key server on the company LAN.  The public and private keys are distributed on the company workstations and laptop PCs by Active Directory and GPG and once it looks like it is working and some users can sign a document, the whole universe shakes, angels and birds sing, flowers fall down from heaven and all is well... or is it? I wanted to be able to sign documents on my engineering laptop PC which runs Linux, not just my office PC, which runs Windows (and which usually has some problem or another).  So I asked IT for a copy of my Private key.  After a few months, they emailed me my Public key.  ...

Grajcar Slovak Folk Band Does Metallica

Well, evidently good artists can play anything on any instrument.  Here is the Slovak folk dancing band Grajcar, playing Metallica on three violins, a double base, clarinet and cymbal. I recorded a minute or so of Nothing Else Matters , at Sheik Maktoum's Majles at the Emirates Golf Club in Dubai, during a Czech and Slovak party. (The horrid video quality is due to Google, not me!). Here is more of them in what looks like Bratislava: https://www.youtube.com/watch?v=126IpgNmA48 

Rover2: Serial Motor Controller

My new rover is supposed to be simpler than the first one and something that irked me with the first design was the motor controllers.  They worked, but they are ridiculously complicated.  So I bought a Sparkfun Monster Moto Controller and hooked it up - much simpler. The only hassles with it is that if you would plug another board on top of it, then it could short to the tops of the capacitors and the VIN connector could short to the Arduino ICS pins underneath it.  I stuck a rectangle of clear plastic cut from some screws packaging between the boards and snipped the ICS pins off - done. Serial Control Controlling a DC motor is straight forward, using two pins to switch the H bridge direction (INA1, INB1) and one for speed PWM (PWM1).  There is also a current sense input (CS1) that you can set to turn the motors off if they get stuck and the current increases too much.  You'll have to set the sense level with trial and terror. Here is an example for a...

DSP on an Embedded Processor

Doing digital signal processing on a teeny weeny Arduino processor requires some trade-offs, since it is slow and doesn't have much memory.  However, bear in mind that today's embedded processors are faster than yesteryear's DSPs, so all you need to do, is use yesteryear's methods! What it mostly amounts to, is careful use of integers and shifts, instead of floating point numbers and multiplies.  If you can, limit multiplies, divides and buffer sizes to powers of 2.  That affords enormous speed optimizations. Circular Buffers For example, let's filter input from an 8 or 10 bit A/D on a little 16 bit embedded processor.  This usually requires a low pass filter.  A simple low pass filter is a moving average and to do that, you need to keep a buffer of old data values. If you are smart, then you will set up a circular buffer with 10 values, but if you are smarter, then you will use a buffer with 8 or 16 values instead - why? If the buffer size ...

Pleasant Random Jingle Generator

Beeping Computer Way back during the time of the dinosaurs, circa 1975, when one turned on a desktop computer, it would go Beep!   That fell out of favour once Microsoft figured out how to make a computer take 3 minutes to boot up, before finally being able to emit a simple beep.   However, it is still common practice to test a new little embedded controller by flashing a LED. Music vs Noise Now for those tinkerers who are a little more adventurous: How about pleasant sounding random noise?  There are two things that help to make noise sound acceptable: Use a tonal scale that everyone is used to. Avoid obvious dissonance. Scales We could use a Pythagorian scale with 7 notes per octave and perfect harmony, but then it will sound weird - like a Scottish bag-pipe and I don't have enough Scottish genes in my ears to prevent them from bleeding. The equal tempered (logarithmic) scale of Johan Bach ( Das Wohltemperirte Clavier, 1722) ), with concert pitch (19...