It is the Arduino-Due. My native USB port is connected to a Ubuntu PC. At the Ubuntu side I checked that the USB is making a connection with the Arduino.
In the meanwhile, I disconnected the Arduino from the Ubuntu PC and hooked it up to a Windows PC. After removing the while(!SerialUSB), it works fine, when I echo a string from the Windows PC. So the while() in the setup was apparently not a good idea..
However, it still does not work when connected to the Ubuntu PC, although the dmesg | grep tty command clearly shows that a ttyACM0 comes up when connected. But echoing a string to rryACM0 is not received by the Arduino.
The lsusb command shows nevertheless that the Arduino is connected:
Bus 001 Device 003: ID 2341:003e Arduino SA Arduino Due