Dec 1, 2019

Linux ser2net: no connection to /dev/ttyUSB0

If you are running some java application on a Linux box (especially ARM architecture) and this application accesses the serial interface (/dev/ttyUSB0, /dev/ttyUSB1 or just /dev/ttyX), then a easy way to do this, is running ser2net.

For all who are not familiar with the serial port:
https://en.wikipedia.org/wiki/Serial_port



But there is one tricky thing, you have to consider when using ser2net:

Inside ser2net.conf you will find some lines like this here:
15000:raw:0:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT 
This means: on port tcp 15000 you can access the serial port /dev/ttyUSB0 (if you have a USB to serial adapter in place).

If this does not work, check the ports with
root@ubuntu:/home/ubuntu/dfld# netstat -lntup |grep ser2net
tcp6       0      0 :::15000                :::*                    LISTEN      1361/ser2net        
As you can see, it only listens on TCP6. So you have to reconfigure this to

127.0.0.1,15000:raw:0:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT
If you only want to access this on localhost (which is very nice security enhancement ;-) ).
And after a restart of ser2net everything works like expected:

root@ubuntu:/home/ubuntu/dfld# netstat -lntup |grep ser2net

tcp        0      0 127.0.0.1:15000         0.0.0.0:*               LISTEN      

Nov 23, 2019

How to run a java software which needs RXTX on a raspberry pi

In my last posting i wrote about migrating my aircraft noise measurement station to alpine linux. There i had some problems with getting the RXTX library for Java running on a linux, which uses musl and not GNU libc6.

Why does my java application require RXTX? As stated on the RXTX page:
RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK).
Now i wanted to move to a raspberry pi. But this runs on ARM and the RXTX is only provided for x86/x64 systems.

But there is another way: ser2net


With this proxy /dev/ttyUSB0 can be mapped to a tcp port and java can access this without using RXTX.

Nov 17, 2019

Alpine Linux, Oracle Java JDK and musl?! - why it does not work...

Sometime ago i did some work with Alpine Linux (s. here) and i was impressed how tiny this Linux distro was and how fast it was running.


So i decided after nearly 6 years of running an aircraft noise measuring station (for dfld.de) with Ubuntu to change to Alpine Linux.

This station runs a software on Java and needs RXTX, because the microphone is connected via USB and is read over /dev/ttyUSB0.

What is the problem with this setup?
  • RXTX needs a Java which is running on glibc
  • Alpine Linux does not run on glibc
If you are not aware of this problem, you get some errors like
./javaash: java: command not found
and this happens even if you are in the right directory and java got the execute bit configured.

Alpine Linux changed to musl:
There are some other libc implementations (take a look here).
The homepage is https://www.musl-libc.org/:

 And a comparison to other libc can be found at http://www.etalabs.net/compare_libcs.html:

There are some workarounds to get applications build with glibc running on Alpine Linux, but i did not get to run my aircraft noise measuring station - i switched to Debian - because i needed a 32bit Linux for my very old UMPC...


Nov 10, 2019

Oracle Cloud: Feature Set

For all readers, who want to get a short overview to the services which can be configured inside Oracle Cloud, here a walkthrough the menus.
The Main menu shows the following items:
  • Core infrastructure
    • Compute
    • Block Storage
    • Object Storage
    • File Storage
    • Networking 
  • Database
    • Bare Metal, VM, and Exadata
    • Autonomous Data Warehouse
    • Autonomous Transaction Processing
    • Data Sale
    • Exadata Cloud Connector
  • Solution and Patterns
    • Analytics
    • Resource Manager
    • Email Delivery
    • Application Integration
    • Monitoring
    • Developer Services Marketplace
  • Governance and Administration
    • Account Management
    • Identity
Inside the Compute item the following services can be found:
  • Compute
    • Instances
    • Dedicated Virtual Hosts
    • Instance Configurations
    • Cluster Networks
    • Autoscaling Configurations
    • Custom Images
    • Boot Volumes
    • Boot Volume Backups
  • Block Storage
    • Block Volumes
    • Block Volume Backups
    • Volumes Groups
    • Volume Group Backups
  • Object Storage
    • Object Storage
    • Data Transfer
  • File Storage
    • File Systems
    • Mount Targets
  • Networking
    • Virtual Cloud Networks
    • Dynamic Routing Gateways
    • Customer-Premises Equipments
    • IPSec Connections
    • Load Balancers
    • FastConnect
    • Public IPs
    • DNS Zone Management
    • Traffic Management Steering Policies

  • Administration
    • Tenancy Details
    • Announcements


The menu Database has no subitems.

For most of these services you can find documentation here:
https://docs.cloud.oracle.com/iaas/Content/home.htm