Making my RPI serial console work, or: fixing a hardware problem in software
Some time ago I get a Raspberry Pi, but never really got it working:
I don't have a HDMI display, and wanted to use the serial console.
Unfortunately the "official" RPI-serial-to-USB cable had an annoying
effect for me: while I saw output just fine, I wasn't able to type
anything! Funny enough, this was not only in NetBSD but also Debian.
Which took the blame from NetBSD :)
Picture 1 shows the cabling.
So the blame was on the RPI-USB-to-serial cable, and I looked into making
my own. I have a standard USB-to-serial adapter, but that one cannot
be connected pin-by-pin to the RPI, as they use different voltage
levels. While the "standard" serial UART protocol (RS-323) encodes 0s and 1s as
5V and -5V, the RPI uses TTL voltage between 0 and 3.3V - a simple 1:1
connection sounds like a bad idea. Converters like the MAX3232 are
available: it connects the TX and RX lines and adjusts the voltage
levels. To operate, power and ground are provided by the RPI. After
frobbing this together (see picture 2)
I found out that - surprise - the problem was not in the cable either,
as my home-made cable also did not work for input, only for output.
After some detour (frobbing the image-build process to make me an
image that not only has working DHCP and SSH, but that actually let's
me log in), I got the crucial hint what was going on:
Having lines for sending and receiving data is nice, but what if one
end's receiver is full and wants to signal that? This is called "flow
control", and apparently with no lines for that, hardware
flow control is not an option. In theory there is a software
solution (sending XON/XOFF bytes), which requires equal settings on
both sides. Apparently the RPI doesn't do that either, and with the
default settings on my NetBSD host to wait for an XON before sending
data, things didn't match up - no XON from the RPI, no data going to
it. Plain and simple - if you know what's going on.
The fix was easy, and thanks go to
Domelevo Entfellner for the hint: disable flow control in my
terminal program (kermit). So with a simple "set flow none", things
work like a charm now. Voila, another hardware problem fixed in
How to look at serial interface parameters from NetBSD? Use the
command. Here's the default output for my USB-to-serial interface
attached to ttyU0:
# stty -f /dev/ttyU0
ispeed 0 baud; ospeed 9600 baud;
lflags: echoe echoke echoctl
oflags: onocr onlret
cflags: cs8 -parenb
The difference is obvious when running the same command while kermit
runs with proper settings in a different window:
# stty -f /dev/ttyU0
speed 115200 baud;
lflags: -icanon -isig -iexten -echo echoe echoke echoctl
iflags: -icrnl -ixon -ixany ignbrk ignpar
oflags: -opost onocr onlret
cflags: cs8 -parenb clocal
Not only is the speed different, but most important "-ixon" tells the
interface to not wait for an XON on input (iflags) before transmitting
For reference sake, here is my .kermitrc that I use:
# cat .kermrc
# Raspberry PI
set carrier-watch off
set line /dev/ttyU0
set flow none # disable hardware flow control
set speed 115200
#set speed 9600
Picture 1: The standard RPI-USB-to-serial cable (click to enlarge)
Picture 2: My own USB-to-serial adapter using a MAX3232 chip (click to enlarge)
[Tags: hardware, hubertf, max3232, raspberrypi, rs323, serial, stty, tty, ucom, usb]
NetBSD on NVIDIA Jetson TK1 (Tegra K1)
I'm losing count of all those spiffy ARM systems that NetBSD
runs on, but here's a fancy one to take note.
Quoting shamelessly from
Jared McNeill's email,
``Jetson TK1 is a Tegra K1 (quad core Cortex-A15) development board from NVIDIA. Possibly the fastest ARM board that NetBSD supports now.
Still working on HDMI, and need to track down an issue that prevents eMMC from working (but the SD card slot works fine). The board is also capable of USB3 but for now we have routed the USB ports to the USB2 controller.''
Besides being a nice ARM platform, it should not go unnoticed
that besides the quad-core ARM Cortex-A15 CPU, the system also
has a NVIDIA Kepler GPU with a whopping 192 CUDA cores.
Any takers to get those going with NetBSD?
More information is available on
the NVIDIA Jetson TK1 page
NVIDIA's embedded computing developers' site .
Also, check out the
information on how to buy a Jetson TK1 DevKit.
Now who's first to
upload their dmesg? :-)
[Tags: jetson, nvidia, tegra, tk1]
BSD dmesg collection service
I'm always into serious dmesg pr0n,
and apparently there's a hub collecting those
that I've missed so far, ran by the fine folks from NYCBUG:
By default it lists the latest submissions of a number of
BSD variants, but it's also possible to just get
everyone's favourite easily.
To submit a dmesg of NetBSD running on your favourite
hardware (or software / virtualization, of course),
a webpage to add your own dmesg.
statistics are available.
Check it out!
New binary releases for NetBSD on Raspberry Pi, including 7.0 RC1
NetBSD runs on many machnes, and the Raspberry Pi is one of them.
Getting the stock distribution is not that easy, and to help
in getting things going, Jun Ebihara is providing
ready-made images for quite some time.
There are images available that are
based on the latest development snapshot,
NetBSD-curent, and with the NetBSD 7.0 release
around the corner, there is also
an image based on NetBSD 7.0 Release Candidat 1.
the NetBSD wiki
for many more details,
and if you use your RPI for any cool hacks, be sure
[Tags: arm, pkgsrc, raspberrypi, Releases]
Announcing first Release Candidate for NetBSD 7.0 (7.0_RC1)
The NetBSD-7 release branch is in preparation for quite some
time now, and now
the first release candidate of NetBSD 7.0 is available.
Release engineer Soren Jabson writes:
``Many changes have been made since 6.0. Here are a few highlights:
Binaries of NetBSD 7.0_RC1 are available for download at:
- Greatly improved support for modern Intel and Radeon graphics hardware
through a port of the Linux DRM/KMS code. Most X.Org components have
been updated as well.
- ARM multiprocessor support
- Support for new ARM boards, some of which are listed below:
- Raspberry Pi 2
- BeagleBone Black
- Banana Pi
- Cubieboard 2
- Merii Hummingbird
- Marvell ARMADA XP
- GlobalScale MiraBox
- Sharp Netwalker PC-Z1
- GPT support in sysinst
- Lua kernel scripting
- Multiprocessor USB stack
- Many improvements to NPF, the NetBSD packet filter
- GCC 4.8.4 (and optionally, LLVM/Clang 3.6.1)
Those who prefer to build from source can either use the netbsd-7-0-RC1
tag or follow the netbsd-7 branch.
Please help us out by testing 7.0_RC1. We love any and all feedback.
Report problems through the usual channels (submit a PR or write to the
appropriate list). More general feedback is welcome at
releng@NetBSD.org. Your input will help us put the finishing touches on
what promises to be a great release! ''
Dell Networking OS 9 powered by NetBSD
I've stumbled across this somewhere on Facebook in the
japanese version, but this information is
available in english as well
from the Dell website:
``Designed to deliver high performance in the largest and most demanding IT environments in the world, Dell Networking OS 9 has been tested and hardened to meet stringent requirements for reliability, scalability and serviceability. OS 9 supports the full portfolio of Dell Networking data center switch products and enables you to build cost-effective, end-to-end networks while reducing operational complexity.
OS 9 leverages a distributed multiprocessor architecture that ensures reliability and delivers scalable protocols in each Dell Networking product line. Dell Networking E-Series and Z-Series route processor modules (RPMs) are designed with separate control-plane CPUs for Layer 2, Layer 3 and management functions, with distributed processing on line-card CPUs. Dell Networking C-Series RPMs and S-Series switches and routers use one control-plane CPU, with distributed processing on C-Series line cards and S-Series stack members.
The NetBSD kernel provides a stable operating system and performs efficient resource management via the HAL architecture, allowing it to deliver superior levels of concurrency, memory allocation and process scheduling. All other applications run as independent and modular processes in their own protected memory space.''
I guess this came in to dell via
Force 10 Networks,
which has a
track record of using NetBSD.
[Tags: dell, force10, Products]
Google Summer of Code 2015 and NetBSD
Google's "Summer of Code" is a chance for students to get paid
to work on Open Source software, with the associated
Open Source projects as mentoring organization. Now,
the 2015 mentoring organizations have been announced,
and I am in a sad position to tell that NetBSD is not among the
choosen mentoring organizations this year, again. :-(
Yet, fear not! While NetBSD itself is not in the game,
there are plenty of Open Source projects that are close,
in the game and that offer projects related to them and
Here's the start of a list:
Feel free to drop me a note if you
know about more.
As always, interested students are welcome to contact
these projects early to get in touch and talk about their
Good luck! :)
NetBSD on IBM's SoftLayer and Microsoft's Azure and more
Xen is a common and popular virtualization platform today.
NetBSD was ported to it prety early.
Due to that, NetBSD cam be ran on any "cloud"
infrastructure that uses Xen, with
Amazon's EC2 cloud
probably the most prominent and largest one.
As the whole "cloud" and "platform as a service" (PaaS)
is lifting off, other virtualization platforms get popular,
which need attention from NetBSD.
The first one to note is
which uses its own virtualization technique that
supports many operating systems but strange enough not NetBSD.
To still get things going,
Emile "iMil" Heitor
has investigated the situation, and wrote
install NetBSD (or any PV-capable system) on IBM's SoftLayer.
Another major platform to look for is Microsoft's Azure.
It uses Microsoft's ohn Hyper-V technique,
which there is no NetBSD support yet!
a project description
"NetBSD/azure -- Bringing NetBSD to Microsoft Azure"
got some pretty useful links
this week - any takers?
As starting point, there's code for
Running FreeBSD in Azure.
Last but not least, the last big
virtualization platfor amiss is KVM, which is used
e.g. in Google's cloud platform.
While there are some mentions that
NetBSD runs as guest operating system,
I am not sure what the latest state is.
Anyone in for a comparison? :)
[Tags: amazon, azure, ec2, google, ibm, microsoft, paas, softlayer, xen]
NetBSD running on OpenRISK 1000 CPUs
that he has updated the NetBSD toolchain and build system to
build the userland for the OpenRISK 1000 CPU,
and will work on the kernel next.
``OpenRISC is the original flagship project of the OpenCores community. This project aims to develop a series of general purpose open source RISC CPU architectures. The first (and currently only) architectural description is for the OpenRISC 1000, describing a family of 32 and 64-bit processors with optional floating point and vector processing support.''
To start playing, use Qemu v1.2 or have a look at
Who's the first to give me an URL of the emulator running NetBSD
in my webbrowser? :)
[Tags: cpu, openrisk, or1k, Platforms]
BSDsec - Deadsimple BSD Security Advisories and Announcements
there is now a new website that aims at providing a central point
of information for BSD related security information.
It covers general and security related announcements from
From DiscoverBSD: ``I take SA and A, and publish them on BSDSec.net website. Aim for website is to be very simple, intuitive and mobile-whatever frendly. Tags are available for better search (in case you want only FreeBSD). I also publish on Twitter. Discussion is available via Reddit.
All process is done by my application, so I do not need to do anything.
How it works?
App is open-source, built with Ruby on Rails. I will write details in my next post, as well with how-to on contributing and so. I have few ideas and anyone is welcome to join me and make this app better! ''
Check out BSDSec!
Grab the RSS-feed,
or go back to my regular NetBSD page
Disclaimer: All opinion expressed here is purely my own.
No responsibility is taken for anything.