YouTube Vanced: Reproduce Videos de YouTube como un Profesional

YouTube Vanced es una versión modificada de YouTube para Android. Bloquea los anuncios y también te permite configurar tu resolución de reproducción por defecto y las funciones de reproducción automática y repetición automática. Visita https://vanced.app/. Merece la pena, especialmente si te gusta reproducir videos de YouTube con Google Assistant.

No podemos instalar YouTube Vanced usando TWRP o Magisk. Además, YouTube debe instalarse como una aplicación del sistema, es decir, no desde la Play Store. Contacté con el desarrollador de Youtube Vanced y me habló de una forma mucho más fácil de hacer esto. De ahí este tutorial. No dejes que la duración de este tutorial te eche para atrás. Todo es bastante fácil.

Cosas que necesitarás

  • Una instalación limpia de Android para ODROID-C2. Yo use una para realizar este tutorial: viewtopic.php?f=137&t=19203#p266354
  • OpenGAPPS ARM 6.0 STOCK. No es PICO ni NANO, no lo descomprimas: https://opengapps.org/
  • Un gapps-config.txt que ha sido reducido https://tinyurl.com/y2vrnb8v. Lee las notas al pie
  • Un administrador de archivos con acceso root. Suelo usar MiXplorer v6.39.2, lo he utilizado a largo de todo este tutorial https://tinyurl.com/jmggvey.
  • Versión de YouTube Vanced Root armeabi-v7a. No necesita el instalador. https://vanced.app/APKs?type=ROOT
  • Opcional pero MUY recomendado: un módulo eMMC para tu sistema operativo y no una tarjeta microSD.

Proceso

Son muchos los pasos que hay que realizar. No obstante, son rápidos, fáciles y a prueba de errores. Como ya has trabado con un ODROID, cuentas con las habilidades necesarias para todo esto.

Paso 1: Instala Android en tu tarjeta eMMC o microSD. Puede funcionar en una instalación existente. Simplemente desinstala todas y cada una de las aplicaciones de Google que haya instalado a través de Play Store, especialmente YouTube, y la aplicación de búsqueda de Google. Logre actualizar una instalación de PICO a NANO para el Google Assistant, pero como mi instalación base elimina las cosas que pico/nano tiene por defecto, puede o no funcionar. Pruébalo bajo tu propio riesgo

Paso 2: Descarga OpenGAPPS ARM 6.0 STOCK. No lo descomprimas. https://opengapps.org/. No ARM64 o x86/x86_64. No lo instales todavía, simplemente pasa al siguiente paso por ahora.

Paso 3: Descárgate gapps-config.txt. https://tinyurl.com/y2vrnb8v. Este gapps-config.txt ha sido reducido para que encaje. Debes tener YouTube instalado como una aplicación del sistema.

Paso 4: Descargate MiXplorer: https://tinyurl.com/yxh6rr3l.

Paso 5: Elige Versión root de YouTube Vanced armeabi-v7a. White/Dark o White Black. Si aún no lo tienes https://vanced.app/APKs?type=ROOT. Cambia el nombre del archivo descargado por Youtube.apk y haz una copia de éste, llamado Youtube2.zip. Extrae la versión ZIP.

Youtube_version_ (armeabi-v7a) (nodpi) (vTheme-v2.0.9) -vanced.apk a Youtube.apk

Paso 6: Copia open_gapps-arm-6.0-stock - **********. Zip, gapps-config.txt, MiXplorer APK y Youtube.apk y /lib/ del youtube2.zip extraído en una memoria USB o tarjeta microSD por separado si está utilizando una eMMC.

Paso 7: Copia el zip de open_gapps, gapps-config.txt y MiXplorer apk, pero no YouTube.apk o la carpeta /lib/, a tu carpeta de descargas interna. open_gapps-arm-6.0-stock - ***********. zip y gapps-config.txt deben estar en la misma carpeta.

Paso 8: Retira la unidad de memoria USB/tarjeta MicroSD, o lo que sea que utilizaste para transferir los archivos.

¡Asegúrate de que tu unidad de memoria USB/tarjeta MicroSD esté retirada!

Paso 9: Instala open_gapps: abre la Utilidad ODROID, haz clic en el pequeño ícono en la esquina superior derecha, haz clic en Package Install from Storage, navega a la carpeta Download y selecciona open_gapps-arm-6.0-stock-numbers.zip. Te preguntará si deseas continuar. Luego selecciona Proceed. Deja que haga su trabajo. Simplemente instalará lo que necesitas desde gapps-config.txt.

Después de instalar open_gapps, probablemente se bloqueará al intentar iniciar sesión, verás que YouTube ahora está instalado en tu ODROID en el cajón de aplicaciones. Además de Google (la aplicación de Google, esto es bueno, significa que Google Assistant funcionará correctamente).

Paso 10: abre Google Play Store. Después de iniciar sesión, haz clic en las 3 barras de la esquina superior izquierda, desplázate hacia abajo hasta Settings y haz clic en Auto-Update apps. A continuación, selecciona "Do not auto-update apps". Simplemente busca las actualizaciones cada cierto tiempo de forma manual y no actualices YouTube.

Paso 11: Dirígete a tu carpeta downloads e instala MiXplorer usando su APK.

Paso 12: Entra en Settings -> Apps -> desplázate hacia abajo hasta YouTube y haz clic en Force Stop. Luego haz clic en Disable.

Paso 13: Comprueba que la aplicación de youtube haya desaparecido del cajón de aplicaciones.

Paso 14: Abre MiXplorer, haz clic en las 3 líneas de la esquina superior izquierda y haga clic en Root. Supersu te preguntará si desea permitir el acceso Root. Proporciónale acceso para siempre, sigue adelante y concédele acceso.

Paso 15: Dirígete a /System/app/Youtube/ y deberías ver un único Youtube.apk dentro. Presiona/mantén el dedo/ratón sobre el archivo hasta que esté seleccionado, luego presiona la Papelera/Cubo de basura en la parte superior derecha para eliminarlo. Sí, elimina el Youtube.apk

Paso 16: Vuelve a colocar la unidad de disco USB/mSD, dentro de MiXplorer, haz clic en las 3 líneas, selecciona tu dispositivo, ábrelo, dirígete a la carpeta de YouTube. Mantén presionado Youtube.apk, toca la carpeta lib para que ambos estén resaltados. Luego, pincha en el icono que se parece a 2 páginas al lado del contenedor de basura en la parte superior derecha para copiar los archivos.

Paso 17: Vuelve a /System/app/Youtube / y haz clic en el primer icono en la esquina superior derecha, el Portapapeles, y haga clic en Copy. Y se copiará el Youtube.apk y la carpeta lib en /system/app/Youtube/. Debería verse como /system/app/Youtube/Youtube.apk /System/app/Youtube/lib/armeabi-v7a/ . Un montón de archivos .so.

Paso 18: Una vez que hayan terminado de copiar, mantén el puntero en Youtube.apk, haz clic en el quinto ícono de la esquina superior derecha, el círculo con una (i) y haz clic donde aparecen los permisos. Top 3, primero, medio, ninguno inferior. Después guarda.

Paso 19: reinicia tu ODROID-C2.

Paso 20: ve a la configuración de Android -> Apps -> Youtube y habilítalo. Dirígete al cajón de su aplicación y debería ver Youtube Vanced, con un ícono nuevo.

Bloquea las notificaciones de Google Play Store en la configuración de Sonido y notificaciones para bloquear las notificaciones sobre la actualización de YouTube. ¡A Disfrutar! Dirígete a la parte de configuración de YouTube en la aplicación y baja hasta la configuración de Vanced. Desde aquí puedes modificar tus cosas, como la resolución, los anuncios y las reproducciones automáticas.

Preguntas y respuestas

¿Por qué necesitamos hacerlo de esta manera? Necesitamos YouTube instalado como una aplicación del sistema para reemplazarlo correctamente con YouTube Vanced. Sin embargo, como no tenemos un menú de recuperación, no podemos usar TWRP. De esta forma sigue siendo bastante fácil.

¿Por qué no solo usar la versión no root? La versión no root se trata como una aplicación independiente. Ni siquiera se llama YouTube Vanced. Por lo tanto, no funciona con Google Assistant.

Gapps config

Gapps-config.txt es un archivo personalizado. El gapps de serie no encajaría, así que tuve que elegir. Instalarlo todo con gapps se instala como una aplicación del sistema. Si necesita instalar otras cosas, por ejemplo, la aplicación Google Dialer normalmente en PICO, puede volver a colocarla. https://tinyurl.com/of6q2eq. Sin embargo, si obtienes un error de falta de espacio al intentar instalar opengapps, es posible que tengas que eliminar otra cosa, como Gmail. Luego instálalo por separado, después. Simplemente no elimines "Search" la aplicación de Google que aparece en nano. o YouTube. Si mantienes la aplicación Google y la tiene instalada como una aplicación del sistema, puedes usar el Google Assistant con Activate en Voice Match. Debido a esto, nunca te recomiendo que instales los gapps de PICO. Debes instalar nano, pero use gapps config para incluir solo las cosas de Pico y Search, desde la sección Nano.

Usar Google Assistant con YouTube Vanced es muy bueno. " Ok Google, Play Disturbed The sound of silence, on youtube". Sin anuncios

¿Puede hacer esto en una instalación anterior en lugar de una nueva instalación, tal vez una instalación que tenga Pico o Nano gapps? Tal vez, sólo tal vez. Desinstale YouTube, si lo instalaste a través de Play Store, y luego descarga gapps stock y gapps-config.

No tuve ningún problema para actualizar de pico a stock durante las pruebas. Sin embargo, si te dice que no tienes suficiente espacio. Eliminar Gmail de la configuración gapps e intenta de nuevo.

Referencia

https://forum.odroid.com/viewtopic.php?f=137&t=36356

Lakka: Desarrollando la Mejor Consola de Juegos ODROID-XU4/XU4Q

Introducción y Objetivos del Tutorial

Hola y bienvenidos a nuestro tutorial sobre cómo montar una consola de juegos ODROID-XU4 Lakka. Este artículo te mostrará en detalle cómo fabricar desde cero una potente consola de videojuegos retro basada en Lakka. Necesitarás algunos componentes. Detallare los que yo he usado y pondré un enlace al lado de cada uno de ellos. Son componentes reales que he utilizado en el pasado y creo que son bastante fiables. Las tarjetas SD fallan y, a veces, sin previo aviso, aunque por lo general no he tenido problemas con los elementos usados

Este tutorial cubre la configuración y el montaje de la consola de juegos desde el punto de vista del hardware y del software. Ahora, a diferencia de la Monku Retro 1, 2, no añadiremos ningún botón de hardware especial. El ODROID-XU4 viene con un botón de reinicio integrado, así que esto ya lo tenemos. En cuanto al botón de control personalizado, no he logrado encontrar una buena ubicación para la actual carcasa. Sin embargo, este dispositivo es mucho más potente que el C1+ o incluso el C2 y también es bastante más fiable, así que de momento no agregaremos ninguno al dispositivo. También no detendremos en la configuración del software, incluida la instalación y configuración de Lakka, retroarch y algunos emuladores. La mayor parte de los pasos de configuración del software se tratarán en la segunda parte de este tutorial. Echemos un vistazo a algunas de las características del dispositivo con el que vamos a trabajar. ¡Fíjate la cantidad de emuladores que soporta!

Características de XU4

  • ¡Calidad ODROID!
  • Botón de reinicio de hardware
  • Soporte para Atari 2600, Atari 5200, Atari 7800, Atari Jaguar, Atari Lynx, ColecoVision, Commodore64, MSX-1, MSX-2, NES, GameBoy, GameBoy Color, Virtual Boy, SNES, N64, GameBoy Advance, WonderSwan Pocket/Color , NEO GEO Pocket/Color, Sega SG-1000, Sega Mark 3, Sega Master System, Sega Genesis, Sega GameGear, Sega Dreamcast, NEC Turbo Graphics 16, NEC Super Graphics, PSP y emuladores PS1 configurados y listos para usar.
  • Lakka y Retroarch con XBM.

Echa un vistazo a las especificaciones de rendimiento de este dispositivo en comparación con otros dispositivos comunes.

Fgure 1 - ODROID performance comparison
Figura 1 - Comparativa del rendimiento de ODROID

Herramientas necesarias

  • Un reducido juego de destornilladores con pequeños destornilladores Phillips.
  • Una superficie de trabajo limpia, libre de energía estática.
  • Monitor o TV con soporte HDMI para probar el dispositivo.
  • Teclado USB

Componentes necesarios

  • Un ODROID-XU4/ODROID-XU4Q: 49.00$ (normalmente a la venta por 59$)
  • Una Carcasa: 5.40$
  • Dos Tarjeta Micro SD de 64GB: 16.99$
  • Un Cable HDMI: 1.00$
  • Una Fuente de alimentación 5V/4A: 5.50$
  • Un mando GameSir conectado por cable: 17.0$

Hardware

Lo primero es lo primero, revisamos las herramientas y los componentes, las colocamos en su sitio y nos preparemos para el montaje. Nosotros disponemos de un juego de destornilladores electrónicos. Si has montado un ODROID-GO, te puede servir el mismo juego de destornilladores. Ten en cuenta que tenemos nuestro dispositivo, un ODROID-XU4 que se muestra a continuación, este tutorial se puede aplicar tanto a la versión ODROID-XU4 como a la versión ODROID-XU4Q de este dispositivo. Este dispositivo puede ejecutar casi todos los emuladores que se te ocurran y lo hace de maravilla. Tenemos nuestra placa, carcasa, tarjetas SD y herramientas listas para ponernos manos a la obra.

Figure 2 - Parts needed for the build
Figura 2 - Componentes necesarios para el montaje

Despeja tu espacio de trabajo y coge la carcasa, sácala de su bolsa de plástico si fuera necesario, colócala en el centro de tu espacio de trabajo. La carcasa tiene dos clips principales, por lo general, es más fácil trabajar con ellos que con los de la carcasa del C1+/C2. El primer clip está en el lado izquierdo de la parte inferior de la carcasa, cerca de la parte superior. El segundo clip está en la parte superior del pieza inferior de la carcasa, cerca de la derecha. Puedes ver pequeños rectángulos cerca de estas áreas en la siguiente imagen.

Figure 3 - ODROID-C2 case side and top view
Figura 3 - Vista lateral y superior de la carcasa del ODROID-C2

Para retirar el primer clip, desplaza ligeramente la carcasa tal y como se muestra a continuación. Empuja ligeramente la parte inferior hacia la izquierda mientras empujas la parte superior hacia la derecha.

Figure 4 - Case clip close up
Figura 4 – Primer plano del clip de la carcasa

Una vez que se desprenda, gira la carcasa para que el otro clip se situé en la posición que se muestra a continuación. Aplica un poco de fuerza hasta que el clip se suelte. Debería soltarse fácilmente una vez que apliques la fuerza correcta sobre él. Usaremos la misma técnica para el segundo clip.

Figure 5 - Case close up of clips along the side
Figura 5 – Primer plano de los clips en el lateral de la carcasa

Una vez que separe la carcasa, encontrarás una sorpresa dentro. Una bolsita con pequeños tornillos. Si dispones de un ODROID-GO y tienes varios tornillos que te sobran, te recomiendo usarlos en lugar de los tornillos proporcionados. Ahora esto podría haber cambiado, pero en su momento los tornillos que incluía la carcasa eran algo más pequeños que los tornillos del ODROID-GO, descubrí que se trabaja mejor con los tornillos incluidos en el kit ODROID-GO. Vamos a presentar las herramientas y los componentes que necesitamos para ensamblar la carcasa con la placa XU4 que debemos montar en su interior. No tienes que preocuparte por el acceso a la tarjeta SD, si has trabajado con la carcasa del C1+ o C2, se accede con la misma facilidad a la tarjeta.

Figure 6 - tools and part for case assembly
Figura 6: Herramientas y componentes para el ensamblaje de la carcasa

Abre con cuidado la bolsa antiestática en la que viene el XU4. Asegúrate de no tener una carga estática descargándose so re algo grande y metálico. Teniendo en cuenta el diseño de la carcasa y de la placa, apoya la placa sobre la bolsa antiestática. Vamos a situar la placa sobre la mitad inferior de la carcasa y colocar y apretar los 2 tornillos internos. La carcasa XU4 es similar a la carcasa del C1+/C2 en el hecho de que hay dos tornillos internos y 2 tornillos externos. Consejo: Asegúrate de apretar los tornillos, aunque no demasiado, es suficiente con que queden ajustados.

Figure 7 - ODROID-XU4 resting in the bottom of the case
Figura 7 - ODROID-XU4 descansando sobre la parte interior de la carcasa

Darle la vuelta a la carcasa, coloca y aprieta los dos tornillos externos. Si colocas la parte posterior de la carcasa mirando hacia ti, observarás un pequeño interruptor blanco. Mueve el interruptor para que esté más cerca del borde de la carcasa con la finalidad de usar la tarjeta SD, mueve el interruptor hacia el otro lado, más cerca del centro de la carcasa, para usar el moódulo eMMC. ¡Listo! Ya has terminado con el hardware. A continuación, vamos a trabajar con la tarjeta SD y la imagen del sistema operativo.

Figure 8 - Screw together the case
Figura 8 - Atornillando la carcasa

El Software

Para el siguiente paso, vamos a buscar una imagen específica del sistema operativo Lakka. Navega con tu navegador hasta lakka.tv. Este es el lugar para localizar versiones de Lakka configuradas para diferentes sistemas integrados. Haga clic en el botón Get Lakka en la página de inicio. Serás redireccionado a una página de descargo de responsabilidad, simplemente te indica que el software está en desarrollo, nada más que eso. Haz clic en el botón Get Lakka y luego sobre la imagen de Linux en las opciones de sistema operativo de la siguiente página.

Serás redireccionado a una pantalla que tiene una lista de imágenes de Lakka preparadas específicamente para diferentes sistemas integrados. Localiza la sección ODROID que se muestra a continuación.

Figure 9 - ODROID selection on Lakka download website)
Figura 9: Seleccionado ODROID en el sitio web de descarga de Lakka

Haz clic en la entrada ODROID XU3/4 y luego haz clic en el botón Download Lakka que se muestra en la página siguiente. El archivo de imagen ocupa unos 300 MB, de modo que la descarga tardará un poco, pero no demasiado. Mientras tanto, prepara tus tarjetas SD y pruébalas en tu lector de tarjetas SD o adaptador USB de tarjeta SD. Una vez que la imagen se haya descargado, te mostraré cómo grabar la imagen en tu tarjeta SD. El nombre de archivo en el momento de escribir de escribir este tutorial para la imagen de la tarjeta SD es Lakka-OdroidXU3.arm-2.2.2.img. No te preocupes si indica XU3 y no XU4, la imagen funcionará igualmente en tu dispositivo.

A continuación, preparémonos para escribir la imagen en una tarjeta SD. Etcher es una herramienta para grabar con facilidad la tarjeta SD en macOS, Windows y Linux. Selecciona la imagen sin comprimir del sistema operativo que acabamos de descargar. Inserta tu tarjeta micro SD en tu Mac, ya sea utilizando un convertidor de algún tipo, el mencionado anteriormente, o una unidad de tarjeta SD nativa. Asegúrate de seleccionar la unidad de destino adecuada. No querrás sobrescribir datos importantes, así que verifica bien la unidad de destino. Una vez que estés seguro de haberlo configurado todo correctamente, graba la imagen del sistema operativo en la tarjeta SD, esto solo tomará unos minutos. La tarjeta SD se desmontará y estará lista para extraerse al final del proceso.

Figure 10 - Screenshot of etcher setup to flash an SD card
Figura 10: Captura de pantalla de la configuración de etcher para grabar una tarjeta SD

Preparémonos para configurar Lakka, conseguir nuestras ROM y poner a punto el mando. Antes de hacerlo, tenemos que configurar algunas cosas, podemos controlar el dispositivo de forma remota. Me gusta usar SSH para conectarme a mis dispositivos Lakka, así que ese es el método que usare. Ten en cuenta que el inicio de sesión por defecto para Lakka es el siguiente.

Usuario: root Contraseña: root

No me voy a detener en el tema de la seguridad en Lakka, ten en cuenta que no lo vamos a configurar necesariamente teniendo en cuenta la seguridad. Es bueno desactivar SSH una vez que hayas terminado de configurar las cosas y cargadas las ROM. Necesitas conecdtar SSH navegando a Settings -> Services y activar SSH. En primer lugar, veamos en qué dirección IP se está ejecutando el dispositivo XU4 Lakka. Yo utilizo una conexión por cable en lugar de un dispositivo WiFi USB por simplicidad. En el menú principal hay una entrada llamada "Information" que se muestra a continuación.

Figure 11 - Lakka Information entry
Figura 11 - Entrada de información de Lakka

Selecciona la entrada "Network Information" y podrá ver la dirección IP actual del dispositivo si la conexión de red está activa.

Figure 12 - Lakka network information
Figura 12 - Información de la red de Lakka

Puedes conectarte al dispositivo XU4 Lakka a través de SSH en macOS y Linux, incluso desde otro dispositivo ODROID que ejecute Ubuntu. Tendrás que sustituir la dirección IP de tu dispositivo XU4 Lakka por la que se muestra en las siguientes capturas de pantalla.

En Windows tendrás que instalar Putty, un cliente SSH gratuito. Puede encontrar putty en esta URL, https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. Selecciona la versión que necesitas para tu sistema, 32 bits o 64 bits, e instálala.

Figure 13 - SSH command from macOS or Linux
Figura 13: Comando SSH desde macOS o Linux

Figure 14 - Putty on Windows
Figura 14 – Putty en Windows

Con esto finalizamos esta primera parte del tutorial. Estate al tanto a la segunda parte para ver los pasos sobre cómo configurar retroarch, copiar tus ROM y configurar un mando.

Este artículo fue cogido de middlemind.com, para obtener más información, visita el sitio web original o Lakka en los siguientes enlaces:

http://middlemind.com/tutorials/odroid_go/ra_lakka_cfg.html

www.lakka.tv

Networking At Ludicrous Speed: Blasting Through The 10000Mbps Network Speed Limit With The ODROID-H2

I remember being an early adopter of 1 GbE networking in the 90s and many of my friends were wondering: who needs 1 GbE anyway? Twenty years later, I am an early adopter (but really not the first) of faster than 10 GbE at home and I hope that this article will convince you to become one too.

As of today economical solutions for deploying a 10 GbE network at home or in a small office are still uncommon and costly. The 10 GbE consumer market is unjustifiably overpriced (10 GbE has been in use in data centers and large organizations for around 15 years. All the issues and glitches have been tamed for quite some time. 10 GbE is NOT a new thing in the enterprise world, it’s more like “so passé”. This will not prevent consumer market companies to present it as the new best thing you must have). RJ-45 based 10 GbE NICs can cost more than $400. Only cards based on the Tehuti or Aquantia chipsets provide sub-$100 solutions. On the switch side, 10 GbE switches cost $300-500 for a limited (let’s say 4 or 5) number of ports (If you need at least 8 ports, the prices climb quickly; see, for instance, https://www.newegg.com/p/N82E16833156580 or https://www.newegg.com/p/N82E16833122848). If you need 18 ports or more, a 10 GbE switch will burn around $1,500 of your hard won money. Microtik, a Latvian company, sells 10 GbE switches at more affordable prices (sub-$200), but they use SFP+ not RJ45. You also need to update your cabling, CAT-5e won’t carry 10 GbE, preferably you want to invest into CAT-6a. The main PC motherboards OEMs or NAS vendors are just finally proposing boards and appliances with 10 GbE NICs onboard.

Clearly the 10 GbE RJ-45 market is still nascent and prices still need to go down for it to become a mass market, as 1 GbE is today. I was tired of waiting for affordable 10 GbE solutions so I started to look for alternatives or second-hand hardware on eBay.

Although at first glance you may think it sounds a little preposterous if not ridiculous to think you can communicate at 10,000+ Mbps with a small single board computer (SBC), it is exactly what this article is going to show. It will also explain how you can do it yourself. So no I didn’t blow up a few MOSFETs in the upper layers of the gray matter that serve as my brain.

Intel was the initiator and king of the 1 GbE networking revolution back in the 90s. Most cards of the period were bearing the Intel chipsets. Not so with 10 GbE or higher. During the last 20 years successful start-ups like Mellanox, QLogic, and others targeted the data center market by offering 20 Gb/s, 40 Gb/s, 100 Gb/s, 200 Gb/s solutions (1 GbE means one gigabit over Ethernet per second. 1 Gb/s means one gigabit over a network the latter being Ethernet or something else). It does not stop at 200 Gb/s. If one doubles or triples the cabling then speeds of 400 Gb/s or 600 Gb/s can “easily” be achieved. As of this writing there is an AI company whose training and inference appliances have enough onboard RDMA-based NICs providing a whopping 2.4 Tb/s bandwidth. See interesting news report at https://www.servethehome.com/favored-at-facebook-habana-labs-eyes-ai-training-and-inferencing/. Nvidia has since then acquired Mellanox. Intel acquired QLogic. While acquisitions and consolidation have maintained a quick pace in the last 10 years, Mellanox was and is definitely the 800-pound gorilla of the fast interconnect industry.

Mellanox came up with an alternative to Ethernet: InfiniBand (aka IB) and RDMA. The latter means Remote Direct Memory Access. I will not spend time detailing the advantages of InfiniBand, just google it for more information. RDMA deserves some explanation. When you communicate over Ethernet using the IP (Internet Protocol) stack (i.e. TCP/IP) a lot of things happen on the local and destination computers. The data to be sent gets copied several times through the IP stack buffers on your local computer, then the packets transit as frames over the network, these packets are then reassembled on the destination computer where again the data gets copied multiple times through the IP stack buffers to finally end up in the destination application. Note that all these manipulations and data copying are performed by the CPU on each computer. That’s a lot of CPU cycles!

RDMA works in a drastically different manner: the “client” computer runs the application that initiates a request with the “server” computer that runs the target/destination application. The data to be sent is already present in the client application memory space so RDMA copies it directly over the network (InfiniBand) to the server application memory space. Done! No CPU involved, the communication is entirely handled by the InfiniBand NIC. Obviously, I’m somewhat simplifying but this the essence of RDMA in a few sentences, so you can imagine how performing RDMA let’s say over a 40 Gb/s network can be compared to IP over a 1 GbE Ethernet network.

Mellanox made a lot of $$$ and a name for itself by selling InfiniBand/RDMA hardware in huge numbers. Data centers and large organizations loved it. So much that they asked Mellanox if it could implement IP on top of it so that IP-based applications could run over InfiniBand/RDMA without code change. Mellanox obliged and came up with IP over IB (Internet Protocol over InfiniBand aka ipoib). Under competitors pressure and feature requests Mellanox then came up with RoCE (RDMA over Converged Ethernet). That’s basically the reverse: running RDMA over existing good quality Ethernet cables (saving data centers and large organizations a re-cabling of their facilities.)

After 20 years of activity and multiple upgrades and re-provisioning of InfiniBand hardware in data centers and large organizations it is not surprising to find a huge stash of used IB hardware on eBay at incredible prices. You can get 40 Gb/s NICs at prices starting as low as $20. You can also get 18-port 40 Gb/s unmanaged switches costing as low at $100~$125.

So why paying several hundred dollars for 10 GbE brand new hardware when you can get 40 Gb/s hardware for an order of magnitude less! You start thinking “But I know nothing about InfiniBand and RDMA”. Don’t worry, neither I did less than one year ago 🙂 You just have to be an avid reader of technology documentation.

Tips about eBay

  • Check out the vendor before clicking on the Buy button.
  • Good used enterprise computer hardware vendors include several pictures of the product, especially the one with the product label.
  • If unsure contact the vendor for more details. The good ones do answer.
  • Do not buy on impulse, do your home work and make a list of what you exactly want to buy.
  • If you do not find a good deal, try again day after day for several weeks, good deals are constantly coming and going.
  • One you received the items, test them right away. If you are sure they do not work contact the vendor, the good ones will accept returns or replacements.

Concise Minimal InfiniBand Vocabulary

VPI Virtual Protocol Interconnect
VPI Card A Mellanox network card that can be configured as InfiniBand card or as Ethernet. With dual cards, one port can be InfiniBand and the other port Ethernet.
EN Card A Mellanox network card that is exclusively Ethernet.
RDMA Remote Direct Memory Access
IPoIB Internet Protocol over InfiniBand. Allows you to run IP-based applications on top of RDMA.
RoCE RDMA over Converged Ethernet. If you are wondering what the “Converged” means just know it is just a marketing buzzword. From a technological viewpoint there is no converged Ethernet. There is just Ethernet. The converged qualifier was invented to sell the fact that most network protocols were now converging to run on top of Ethernet. It was part of the marketing war that occurred between Mellanox and Chelsio (iWarp) during which the latter was trying to disparage InfiniBand. Anyway, it’s like saying that celebrities are converged people.
SFP Small Form-factor Pluggable. A small transceiver that plugs into the SFP port of a network switch and connects to Fibre Channel and Gigabit Ethernet (GbE) optical fiber cables at the other end. There are multiple types. Usually 1 Gbe.
SFP+ Enhanced small form-factor pluggable. Usually 10 Gbe or 10 Gb/s.
QSFP, QSFP+ Quad Small Form-factor Pluggable (QSFP). 4-lane cable, up to 40 Gb/s.
QSFP14 Cables up to 56 Gb/s
QSFP28 Cables up to 100 Gb/s
DAC Direct Attached Cable (almost a synonym of passive copper cable)
AOC Active Optical Cable

Network Bandwidth

Name Line Encoding Speed for 4 x lane cables
SDR Single Data Rate 8b10b 10 Gb/s
DDR Double Data Rate 8b10b 20 Gb/s
QDR Quad Data Rate 8b10b 40 Gb/s
FDR10 Fourteen Data Rate 8b10b 56 Gb/s
FDR Fourteen Data Rate 64b66b 56 Gb/s
EDR Enhanced Data Rate 64b66b 100 Gb/s
HDR High Data Rate 64b66b 200 Gb/s

All these speeds are available today. The vast majority of InfiniBand (or Ethernet SFP) cables are 4-lane cables. However there are 8-lane and 12-lane cables. With these cables the maximum theoretical speed is doubled or tripled.

So when you look at IB products on eBay, you will mostly see QDR or FDR cards, switches and cables for reasonable prices. The used EDR hardware is more expensive. Be careful with FDR and FDR10, many vendors do not distinguish although there is a real difference between the two.

This leads me to the “Line Encoding” column included in the table above. Transmitting bits over a line consists in the case of let’s say a copper wire in squared signals of high and low voltage using a frequency based on the clock. If we want to send 1,000 bits equal to 1 as is the electrical would become a very long signal of high voltage. This bring multiple issues: first such a long signal will not work well, second the transceivers will have great pain to maintain the synchronization of their clocks: the square signal becomes basically MIA. So for physical reasons you want to limit the number of consecutive bits of the same value to, for example, 3. To do so the transceivers scramble the data. The transmitter scrambles the data and add a few bits that will allow the receiver to descramble them. I’m simplified here but that’s basically the story.

The 8b10b line encoding means each time you send 8 bits, the very low level of the NIC will scramble them and add 2 bits to allow the receiver to descramble them. This has an obvious effect on the bandwidth purely dedicated to your data aka the payload. If you feel a sudden angry pressure to start a “Save the Bandwidth!” online movement, don’t do it. Line encoding is pervasive and you have been using it since you were born. Examples: PCI Express 3, SATA 3, DisplayPort 2.0 use 128b/130-132b, USB 3.1 Gen 1 uses 8b/10b while USB 3.1 Gen 2 128b/132b.

The difference between FDR10 and FDR is now easily explained. FDR10 provides 56 x 8 / 10 = 44.8 Gb/s max bandwidth. FDR provides 56 x 64 / 66 = 54.3 Gb/s. So before buying an FDR card, switch or cable refer to the model number and its documentation to be sure. Mellanox has switches that bear the same model number where only the sub-number tells you if it is FDR10 or FDR. In doubt, ask the vendor to confirm what the model is.

For QDR, the max bandwidth is 40 x 8 / 10 = 32 Gb/s.

After this introduction, let’s now see how you can do 10,000+ Mbps with the ODROID-H2.

ODROID-H2

The ODROID-H2 is an SBC from Hard Kernel, a Korean based manufacturer of small boards. You probably have heard of Raspberry Pi the first series of products who popularized the usage of SBCs. Many agree that Hard Kernel is the number two of the SBC market. Hard Kernel makes more powerful SBCs than Raspberry, makes sure that the Linux and Android solutions are of good quality and supports the hardware well, sells plenty of accessories allowing you to extend the applicability of their boards, publishes a magazine, maintains a wiki and has a very active forum community with dedicated members who are glad to answer questions and provide help.

If you combine all of that think of Hard Kernel like the Ikea of the SBC world.

For a detailed reference about the H2, see:

PCIe with H2

The Mellanox NICs are PCIe cards. The H2 has no PCIe slot. So what are we going to do? The H2 board has on the back an NVMe slot PCIe 2 with 4 lanes (PCIe 2 x4). You can use an NVMe PCIe x4 SSD for very fast disk I/O… or you can use an NVMe to PCIe x4 adapter to get the PCIe slot we need. A good adapter is the ADT Link model or a similar alternative, as shown in Figures 1 and 2.

Figure 1 - R42SF available at ADT http://www.adt.link/product/R42-Shop.html
Figure 2 - R42SR available at AliExpress https://www.aliexpress.com/item/32833359557.html

In both cases, you can customize the adapter: its length, the orientation of the PCIe slot (forward, top, bottom). Choose the option the most convenient to your project. On one end you have an M.2 M key connector, on the other end an open ended PCIe x4 slot.

Figure 3 - The adapter installed on the ODROID-H2

Software Packages

Let’s now install the minimal set of packages we need for going through this article.

# Linux utilities

~$ sudo apt install vim htop iperf3 net-tools parted inxi smartmontools ssh

# InfiniBand packages

~$ sudo apt install rdma-core opensm ibutils ibverbs-utils infiniband-diags perftest mstflint

Linux Utilities Packages Description

vim Vim is an almost compatible version of the UNIX editor Vi. Many new features have been added: multi level undo, syntax highlighting, command line history, on-line help, filename completion, block operations, folding, Unicode support, etc.

Note: many of you use nano anyway.

htop htop is an ncurse-based process viewer similar to top, but it allows one to scroll the list vertically and horizontally to see all processes and their full command lines.
iperf3 iperf3 is a tool for performing network throughput measurements. It can test either TCP or UDP throughput. This is a new implementation that shares no code with the original iperf from NLANR/DAST and also is not backwards compatible. This package contains the command line utility.
net-tools This package includes the important tools for controlling the network subsystem of the Linux kernel. This includes arp, ifconfig, netstat, rarp, nameif and route. Additionally, this package contains utilities relating to particular network hardware types (plipconfig, slattach, mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr). In the upstream package 'hostname' and friends are included. Those are not installed by this package, since there is a special "hostname*.deb".
parted GNU Parted is a program that allows you to create, destroy, resize, move, and copy disk partitions. This is useful for creating space for new operating systems, reorganizing disk usage, and copying data to new hard disks. Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS, and PC98 partitioning formats, as well as a "loop" (raw disk) type which allows use on RAID/LVM. It can detect and remove ASFS/AFFS/APFS, Btrfs, ext2/3/4, FAT16/32, HFS, JFS, linux-swap, UFS, XFS, and ZFS file systems. Parted also has the ability to create and modify file systems of some of these types, but using it to perform file system operations is now deprecated.

Note: parted is the replacement for fdisk when you have to create partitions larger than 2TB. Once you get used to parted, you use it no matter the size of the partitions you want to create and stop using fdisk.

inxi inxi is a system information script that can display various things about your hardware and software to users in an IRC chatroom or support forum. It runs with the /exec command in most IRC clients.
smartmontools The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI hard disks. It is derived from the smartsuite package, and includes support for ATA/ATAPI-5 disks. It should run on any modern Linux system.
ssh This metapackage is a convenient way to install both the OpenSSH Client and the OpenSSH Server.

ssh (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It provides secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. It can be used to provide applications with a secure communication channel.

OpenSSH Client This package provides the ssh, scp and sftp clients, the ssh-agent and ssh-add programs to make public key authentication more convenient, and the ssh-keygen, ssh-keyscan, ssh-copy-id and ssh-argv0 utilities.

OpenSSH Server This package provides the sshd server.

InfiniBand Packages Description

rdma-core RDMA core userspace infrastructure and documentation

This package provides the basic boot time support for systems that use the Linux kernel's remote direct memory access (RDMA) sub-system which includes InfiniBand, iWARP, and RDMA over Converged Ethernet (RoCE).

Several kernel RDMA support daemons are included: - The rdma-ndd daemon which watches for RDMA device changes and/or hostname changes and updates the Node Description of the RDMA devices based on those changes. - The iWARP Port Mapper Daemon (iwpmd) which provides a kernel support service in userspace for iWARP drivers to claim TCP ports through the standard socket interface.

opensm InfiniBand subnet manager

OpenSM provides an implementation of an InfiniBand Subnet Manager (SM) and Administrator (SA). One Subnet Manager is required to run on each InfiniBand subnet in order to initialize the InfiniBand hardware.

ibutils InfiniBand network utilities

This package contains a set of utilities useful for diagnosing and testing InfiniBand based networks.

ibverbs-utils Examples for the libibverbs library

libibverbs is a library that allows userspace processes to use RDMA "verbs" as described in the InfiniBand Architecture Specification and the RDMA Protocol Verbs Specification. iWARP ethernet NICs support RDMA over hardware-offloaded TCP/IP, while InfiniBand is a high-throughput, low-latency networking technology. InfiniBand host channel adapters (HCAs) and iWARP NICs commonly support direct hardware access from userspace (kernel bypass), and libibverbs supports this when available.

This package contains useful libibverbs1 example programs such as ibv_devinfo, which displays information about InfiniBand devices.

infiniband-diags InfiniBand diagnostic programs

InfiniBand is a switched fabric communications link used in high-performance computing and enterprise data centers. Its features include high throughput, low latency, quality of service and failover, and it is designed to be scalable.

This package provides diagnostic programs and scripts needed to diagnose an InfiniBand subnet.

perftest InfiniBand verbs performance tests

This is a collection of tests written using InfiniBand verbs intended for use as a performance micro-benchmark. The tests can measure the latency and bandwidth of InfiniBand fabrics.

mstflint Mellanox firmware burning application and diagnostics tools

This package contains a burning tool and diagnostic tools for Mellanox manufactured host channel adapters (HCA) and network interface cards (NIC).

This burning tool should be used only with Mellanox manufactured HCA/NIC cards. Using it with cards manufactured by other vendors may be harmful to the cards (due to different configurations). Using the diagnostic tools is normally safe for all HCAs/NICs.

Mellanox InfiniBand Network Cards

At this point we assume the ADT link is securely connected to the board, the card inserted in the PCIe slot, the H2 has a working Ubuntu 18.04 OS. Let’s start the H2 and open a terminal.

Identifying the Mellanox card on the PCIe bus

Let’s look for the card using the lspci utility command. Type:

~$ lspci | grep Mellanox

should return something similar to this:

01:00.0 InfiniBand: Mellanox Technologies MT25408A0-FCC-QI ConnectX, Dual Port 40Gb/s InfiniBand / 10GigE Adapter IC with PCIe 2.0 x8 5.0GT/s In... (rev b0)

To get the Link capabilities and status, type:

~$ sudo lspci -vv -s 01:00.0 | grep Width

This should return two lines similar to these:

LnkCap: Port #8, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited
LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-

LnkCap means link capabilities. See above (Speed 5GT/s, Width x8 and Speed 5GT/s, Width x4. This card is capable to handle 5 GT/s (GigaTransfers per second - see https://en.wikipedia.org/wiki/Transfer_(computing) and https://paolozaino.wordpress.com/2013/05/21/converting-gts-to-gbps/) over 8 PCIe lanes. LnkSta means link status. The card will handle 5GT/s but only 4 PCIe lanes are available.

Due to this reduction in available PCIe lanes, we will lose more bandwidth.

What to do if the card does not show up?

1. Did you type lspci | grep Mellanox or lspci | grep mellanox? The “M” should be capitalized.

2. If the card is really not showing up

  • reboot the H2,
  • press the Delete key several times at boot time (when the Hard Kernel logo appears) so that you enter the BIOS,
  • inside the BIOS, go to Chipset and then PCI Express Configuration
  • inside PCI Express Configuration disable PCI Express Clock Gating:

Figure 4 - Go to Chipset and then PCI Express Configuration
Figure 5 - Inside PCI Express Configuration disable PCI Express Clock Gating

Save the BIOS changes, wait for the H2 to reboot and try again.

From this point, we assume the card correctly shows up in lspci, inxi and any other Linux tools showing the hardware present on the board. To display more information about the Mellanox card, let’s use the mstflint command:

~$ sudo mstflint -d 01:00.0 query

This should return something similar to this:

Image type:            FS2
FW Version:            2.9.1000
Device ID:             26428
Description:           Node             Port1            Port2            Sys image
GUIDs:                 0002c9030010ea44 0002c9030010ea45 0002c9030010ea46 0002c9030010ea47 
MACs:                                       0002c910ea44     0002c910ea45
VSD:                   
PSID:                  MT_0FC0110009

The three fields that interests us at this point are FW Version, Device ID and PSID.

FW Version: it is the firmware version currently running on the card. For this particular card, 2.9.1000 is the current (and final) firmware. No update necessary.

PSID (Parameter-Set Identification): it is a 16-ascii character string embedded in the firmware image which provides a unique identification of the device. An intrinsically identical model (in terms of hardware) will have different PSID depending on who is distributing the product and under which brand.

Device ID: not sure, never got the gist of that one. Looks like a device ID that can be shared by several model revisions.

Which cards work on the ODROID-H2?

Here are 3 examples I validated:

Mellanox Series ConnectX-2 VPI up max 20Gb/s
Label on the card
lspci | grep Mellanox InfiniBand: Mellanox Technologies MT25408A0-FCC-GI ConnectX, Dual Port 20Gb/s InfiniBand / 10GigE Adapter IC with PCIe 2.0 x8 5.0GT/s In... (rev b0)
sudo lspci -vv -s 01:00.0 | grep Width LnkCap: Port #8, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
sudo mstflint -d 01:00.0 query Image type: FS2 FW Version: 2.9.1000 Device ID: 26418 Description: Node Port1 Port2 Sys image GUIDs: 0002c903005a0aa0 5849560e65cf0d01 5849560e65cf0d02 0002c903005a0aa3 MACs: 0002c95a0aa0 0002c95a0aa1 VSD: PSID: MT_0F90120008
Sudo iblinkinfo 3 7[ ] ==( 4X 5.0 Gbps Active/ LinkUp)==> 1 1[ ] "h2a mlx4_0" ( )
Mellanox Series ConnectX-2 VPI up max 40Gb/s
Label on the card
lspci | grep Mellanox InfiniBand: Mellanox Technologies MT25408A0-FCC-QI ConnectX, Dual Port 40Gb/s InfiniBand / 10GigE Adapter IC with PCIe 2.0 x8 5.0GT/s In... (rev b0)
sudo lspci -vv -s 01:00.0 | grep Width LnkCap: Port #8, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgm
sudo mstflint -d 01:00.0 query Image type: FS2 FW Version: 2.9.1000 Device ID: 26428 Description: Node Port1 Port2 Sys image GUIDs: 0002c9030010ea44 0002c9030010ea45 0002c9030010ea46 0002c9030010ea47 MACs: 0002c910ea44 0002c910ea45 VSD: PSID: MT_0FC0110009
Sudo iblinkinfo 3 7[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 1 1[ ] "h2a mlx4_0" ( )

You find the product brief of the ConnectX-2 VPI cards at https://www.mellanox.com/related-docs/prod_adapter_cards/ConnectX-2_VPI_Card.pdf. The cards listed at the bottom of this PDF should work fine on the ODROID-H2:

MHRH19B-XTR Single 4X QSFP 20GbE/s InfiniBand 6.7W
MHQH19B-XTR Single 4X QSFP 40GbE/s InfiniBand 7.0W
MHRH29B-XTR Dual 4X QSFP 20GbE/s InfiniBand 8.1W (both ports)
MHQH29C-XTR Dual 4X QSFP 40GbE/s InfiniBand 8.8W (both ports)
MHZH29B-XTR 4X QSFP 40GbE/s InfiniBand, SFP+ 10 GbE 8.0W (both ports)

You find these cards on eBay at https://www.ebay.com/sch/i.html?_from=R40&_nkw=Mhqh29c&_sacat=0&_sop=15, expect $20~$25 for the cheapest offers. Change the search keyword to look for another card model to find alternates. Note that some of these cards top at 20 Gb/s while the others top at 40 Gb/s. Given the almost no difference in pricing, go with the 40 Gb/s ones. You find the latest firmware of these cards at https://www.mellanox.com/page/firmware_table_ConnectX2IB.

Use the card label, the lspci description and the mstflint DeviceID and PSID to select the right firmware to download and then install. The ConnectX2 cards are no longer officially supported by Mellanox. The latest firmware is 2.9.1000 (from 2011). If you card is already running this firmware, you have nothing to do.

Mellanox Series ConnectX IB max 40Gb/s
Label on the card
lspci | grep Mellanox InfiniBand: Mellanox Technologies MT25408A0-FCC-QI ConnectX, Dual Port 40Gb/s InfiniBand / 10GigE Adapter IC with PCIe 2.0 x8 5.0GT/s In... (rev a0)
sudo lspci -vv -s 01:00.0 | grep Width LnkCap: Port #8, Speed 5GT/s, Width x8, ASPM L0s, Exit Latency L0s unlimited, L1 unlimited LnkSta: Speed 5GT/s, Width x4, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt
sudo mstflint -d 01:00.0 query FATAL - Can't find device id. -E- Cannot open Device: 01:00.0. File exists. MFE_UNSUPPORTED_DEVICE
Sudo iblinkinfo 3 7[ ] ==( 4X 10.0 Gbps Active/ LinkUp)==> 6 1[ ] "h2a mlx4_0" ( )

You find the product brief of the ConnectX-IB at https://www.mellanox.com/pdf/products/silicon/ConnectX_IB_Silicon.pdf. The cards listed at the bottom of this PDF should work fine on the ODROID-H2.

MT25408A0-FCC-SI Dual 4X (10Gb/s) PCIe 2.0 2.5GT/s 8.1W
MT25408A0-FCC-DI Dual 4X (10, 20Gb/s) PCIe 2.0 2.5GT/s 8.6W
MT25408A0-FCC-GI Dual 4X (10, 20Gb/s) PCIe 2.0 5.0GT/s 9.1W
MT25408A0-FCC-QI Dual 4X (10, 20, 40Gb/s) PCIe 2.0 5.0GT/s 9.7W

These ConnectX-IB cards are now kind of difficult to find on eBay. They are very old and often appears in the seller description under a totally different name. These cards are pre-ConnectX-2 era. You better go with a ConnectX-2. But if you have one (I have a MT25408A0-FCC-QI) it will work. Note that only the QI goes up to 40 Gb/s anyway. You find the latest firmware of these cards at https://www.mellanox.com/page/firmware_table_ConnectXIB. IMHO, the ConnectX-2 VPI 40 Gb/s is your best bet for usage on the ODROID-H2. Do you need to update the firmware right away? No. If it works, get the time to get acquainted with the thing before updating its firmware.

If the card is actually a Mellanox one, not a distributor, mstflint can grab the appropriate most recent firmware upgrade online and do the upgrade for you. You don’t have to play archaeologist in the archives pages of the Mellanox web site. If the card is from a distributor and not a Mellanox one, you will have to.

What to do when mstflint does not recognize the card?

The version of mstflint that comes from the APT repositories is 4.11.0 which is a relatively recent one. The recent versions no longer support the “old” ConnectX IB or ConnectX-2. In the examples above, it did not recognize the MT25408A0-FCC-QI. Because mstflint is the tool you use to update the firmware of the cards, that is a problem.

In addition, you may end up buying a non-Mellanox “flavor” of a card. IBM, Sun, Oracle, HP, Dell, EMC (non-exhaustive list) all distributed Mellanox cards under their brand because at the time it was the only show in town for 10, 20 or 40 Gb/s. In these cases, the PSID on the card will not be a Mellanox one. Mellanox did it this way so that customers of these major brands would download the new firmware and get their support from the distributors and not Mellanox. You will find tons of IBM, Oracle, HP cards on eBay. But while the brand and the PSID of the cards are not Mellanox it is bona fide regular Mellanox technology on these cards.

Because the “modern” versions of mstflint do not allow you to overwrite the PSID of a card, you have to go back in time and find a version of MST that do. But not too old, otherwise it would not recognize more modern cards. One of the “optimal” versions of MST in this matter is version 4.0.0. It’s a modern enough and it still include the old flint tool which has no qualms in overriding the PSID of a card. Hence you can update the firmware.

To download this version, go to: https://www.mellanox.com/page/management_tools and scroll to the bottom of the page (after obviously reading what the page is saying). You see:

Figure 10 - The bottom of the Mellanox web page

Click on Archive Versions and select the appropriate values in the columns on the right, as shown in Figure 11.

Figure 11 - Archive Versions
Here is an example of updating a card to the new firmware

# Become root
~$ sudo su -
# Start the firmware manager
~$ mft start
# Query the card to find out the current firmware
~$ flint -d 02:00.0 query
# If not the latest firmware, update it with the one you downloaded
# Note the use of –allow_psid_change to deal with non-Mellanox versions of the card:
~$ flint -d 02:00.0 -i fw-25408-2_9_1000-MHQH29-XSC_A1-A5.bin --allow_psid_change burn

Warning

If you use the --allow_psid_change option, the flint tool will gladly attempt to burn whatever firmware bin file you passed as parameter with zero checking. Using a wrong firmware bin file will obviously and simply brick the card. So check, check and check again you know what you are doing. Otherwise you’ll win a free visit to eBay to buy another card. Was I anxious the first time I burnt the firmware with that option? Yep.

My ODROID-H2 is going to talk to modern PCs. Should I use a ConnectX-2 on my PCs?

The answer is a very direct and simple: no. ConnectX-2 card are no longer supported by Mellanox, they are PCIe 2 (which is great for embedded boards like the ODROID-H2). Chance is that your “modern” PCs are probably providing PCIe 3 or even PCIe 4 with the Ryzen 3000 series and chipset X570. For your PCs, use ConnectX-3 Mellanox cards. You can find the product brief of these cards at https://www.mellanox.com/related-docs/prod_adapter_cards/ConnectX3_VPI_Card.pdf. My favorite is the MCX354A-FCBT Dual FDR 56 Gb/s or 40/56 GbE because it has two ports, supports QDR, FDR10 and FDR.

On eBay, see https://www.ebay.com/sch/i.html?_from=R40&_nkw=MCX354A-FCBT&_sacat=0&_sop=15. Expect around $50~$75 for a dual card. Better deals show up on a regular basis. You will also find non-Mellanox ones (mostly HP or Oracle) for $30. Upgrading the firmware on ConnectX-3 cards works like on ConnectX-2 cards. So even though you buy an HP or Oracle one, you can update its firmware. Upgrading the firmware of the ConnectX-3 to the most recent version is necessary if you are planning to use the Mellanox OFED packages. In this article we use the packages from the Ubuntu APT repository, so there is no immediate need to update the firmware.

Note: do PCIe 3 Mellanox ConnectX-3 cards work on PCIe 4? The ones I tried do.

For your PCs, you can also use ConnectX-3 Pro Mellanox cards. On eBay you find them for about $100~$120 with a better deal from time to time. Again, think about the fact that you want a VPI (that supports both IB and Ethernet) and do not forget the top speed: QDR, FDR10 or FDR.

You find the product brief of the Pro cards there: https://www.mellanox.com/related-docs/prod_adapter_cards/PB_ConnectX-3_Pro_Card_VPI.pdf. ConnectX-3 and ConnectX3 Pro are still supported by Mellanox. This translates into support in the Mellanox OFED packages. For Linux, you can download the Mellanox OFED software there: https://www.mellanox.com/page/products_dyn?product_family=26 Scroll down the page, click on the Download tab and select the flavor for your Linux distribution.

Note: do Mellanox ConnectX-3 cards also work on the ODROID-H2? As of this writing only the Pro version works. The non-pro versions do not. Know anyway that in terms of max speed achievable on the H2, the ConnectX-3 will provide the same result as the ConnectX-2. The ConnectX-2 provide 40 Gb/s in IB mode but only 10 GbE in Ethernet mode. The connectX-3 provide 40 Gb/s in IB mode and 40 GbE in Ethernet mode. However IP over IB provides a speed as good (if not a little bit better) with a port configured for IB as IP on a port configured for Ethernet. So really, no need to run a ConnectX3 Pro on the H2 (unless you already have a 20 or more GbE network running at home based on Ethernet).

Warning

The latest Ubuntu 18.04 apt update brings in kernel 5.x. The current Mellanox OFED package for Ubuntu 18.04 as of this writing (MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu18.04-x86_64.tgz) will not build correctly (probably the KDMS). This is the reason why in this article we use the packages from the Ubuntu APT repository.

Is there a difference between Mellanox OFED and your distribution packages for InfiniBand? Yes, there is but you won’t see the difference at the beginning. The Linux distribution packages for InfiniBand are mostly written by the Mellanox engineers who also write the Mellanox OFED software. What the latter brings is more tools, more configuration, more docs, more late bugs fixes, more “candies”. You really do not need to worry about that.

For Windows, you can download the Mellanox OFED software there: https://www.mellanox.com/page/products_dyn?product_family=32 To support the ConnectX-3 series, use the Windows – WinOF versions. Mellanox OFED for Windows is the only “simple” way to install the InfiniBand on Windows. This is definitely what you want to use if want to use SMB/CIFS full speed between a Windows Server and Windows 10. For more information start there: https://docs.microsoft.com/en-us/windows-server/storage/file-server/smb-direct

As of this writing, Linux Samba does not support RDMA yet. So if you are running Linux on your ODROID-H2 with Samba, the only way your Windows machine can access it is to use regular SMB/CIFS with IP over IB. From this point, we will not talk too much about Windows.

Warning

When buying Mellanox network cards on eBay, make sure you are buying what you really want. VPI cards both support InfiniBand and Ethernet. EN cards only support Ethernet. Dual port cards are usually the best solution because the two ports can be configured to InfiniBand and you can have 3 PCs connected without the need for a switch (meaning PC A is connected directly to PC B and PC C, when B and C want to talk, they go through the daisy chaining via PC A). Two port cards also allow a PC to be on an InfiniBand subnet via port 1 and (usually a 10 GbE) Ethernet subnet via port 2 (as long as you connect it to another PC or switch with SFP+ connectors, not RJ-45).

Why do I look insisting in using an InfiniBand network rather than Ethernet one? In other words, let’s talk about switches.

It is pretty easy to find a used 18, 24 or 36-port QDR, FDR10 or FDR InfiniBand switch on eBay in $125 to $250 price range. On the other hand, a similar switch but Ethernet will deeply hurt the feelings of your bank account (like $1,500 ~ $2,500 hurt.)

Mellanox IS5023 18-port 40Gbps https://www.ebay.com/sch/i.html?_nkw=Mellanox+IS5023 (this is the one I’m currently using)

Mellanox SX6015 18-port 56Gbps (FDR10) https://www.ebay.com/sch/i.html?_nkw=Mellanox+SX6015 (I tested OK this one, but it still has to be put it in “production”)

Conclusion: using IP over IB with an IB QDR, FDR10 or FDR switch costs much much less while not limited to 10 GbE.

Do you need a switch? Not right away. With 1-port cards you can connect the ODROID-H2 to one PC. With a 2-port card you can connect 2 PCs. If you have more devices you can still daisy chain 2-port cards. Bandwidth will suffer when if traffic has to go through multiple cards between device X and Y tough. I did not try the daisy chaining myself I went straight for a switch when I saw the low prices.

The Mellanox switches are built like trucks. The case is quasi unbreakable with thick metal plates. But the switches are also very NOISY beast. The IS5023 has four 40mm fans running at 15K rpm, the SX6015 has six. Remember these are data center models and nobody squats inside a data center so noise is not and issue. For home usage this is an entirely different story. So unless you have a home with a garage attached to the house or a sound-proof attic or basement the other family members will kick the switch out of the home or the apartment probably in the next 5 minutes you turn it on. I’m currently living in an apartment, no attached garage, no attic, no basement, no sound proof room. To solve that, I customized the switch to replace the fans, as shown in Figure 12.

Figure 12 - Customized Mellanox IS5023 switch
Gone the four noisy 15K rpm gremlins, four gentle Noctua 80mm redux took their place. The top plate is gone. Obviously the Noctua fans do not run at the same speed so the switch LED for the fan status is shining bright red. Not a problem. The switch has software thermal protection anyway. Never saw it being triggered. Not placing back any top plate solves multiple issues: (a) I would have have to design one to adapt to the 80mm fans (b) The 80mm fans easily push away the heat emanating from the main heat sink (c) The heat from the AOC transceiver electronics can get away by convection. So far so good. Even by night, the thing is barely audible, just a gentle hum because you know it’s there, otherwise you would not notice.

Figure 13 - Below is a wider field view of the installation showing my QDR switch in my little living room data center

Which cables should I use?

You can use passive copper cables (DAC) for short distances (i.e. from 1 to 5 meters) or active optical cables (AOC) for longer distances (from 1 to 100 meters). You can use a mix of both.

The AOC are more “fragile” than the copper ones. Mellanox advise to not bend AOC cables under a radius of 17 cm (when in use). A badly bent AOC will trigger a lot of retries at the RDMA level.

Tips about AOC cables

a) AOC cables can get damaged in various ways, as shown in Figures 14 and 15.

In Figure 14 someone bent the cable very badly. The best way to check if the cable is still good is to run iperf3 for 10 minutes using that cable. If you see too many retries, the cable is dead and irreparable.

Figure 14 - Badly bent cable

Figure 15 - Someone pulled on the cable to disconnect it instead of using the pull tab. This cable is dead and is irreparable

b) Use copper cables to connect computers close to a switch and where space is reduced: AOC cables would start to bend too much and get entangled. The more bulky copper cables won’t.

c) Keep them in a box when not in use. To avoid the spaghettification of multiple cables and the risk of damaging one when disentangling them, roll them around spools. A simple solution is to use kite winding plastic hoop spool, as shown in Figure 16..

Figure 16 - Using plastic spool to store AOC cables
For more tips, see: https://www.mellanox.com/products/interconnect/pdf/Mellanox_Cable_Management_Guidelines_and_FAQs_Application_Note.pdf

Next you have to decide what eventual theoretical maximal speed you want to have right away or use in the future: 40 Gb/s (QDR), 56 Gb/s (FDR10) or 56 Gb/s (FDR). As you may guess a 40 Gb/s cable will NOT go faster when you connect it to a network card or switch capable of FDR10 or FDR. On the other hand, an FDR cable will happily work with a QDR or FDR10 network card or switch.

Last but not least, you are buying these cables used or refurbished on eBay. The prices for brand new cables are crazy expensive. Short length DAC coppers cables on eBay are numerous, the longer cables are rarer. For AOC it is basically the reverse: 3m, 5m, 10m are common on eBay, good luck finding a 1 meter.

Tip: when you receive a used DAC or AOC cable from an eBay vendor inspect it and try for 10 minutes right away. If the cable is faulty, contact the vendor for return or replacement.

Be nice to your hardware and your hardware will be nice to you - especially with the cards. These used cards probably already have 10+ of activity under the belt. As you may have noticed they come with a heat sink and I can tell you they easily reach 50+ C. A heat sink implies some thermal compound between the heat sink and the chip. That compound has already cooked for 10+ years. Time for a complementary refresh!

The heat sink is attached to the card with two spring rivet fastener push pin. On older cards they were using brass (easy to get through), the more modern cards use plastic ones (a pain in the neck).

Figure 17 - Heatsink with brass spring rivets
Push down on the rivets front side if they are a little bit sticky to the back side. Then use a pair of tweezers (or hemostat) to compress the back pins while gently pulling on the rivet from the front side. If everything goes well, the rivet will go through the board and heat sink holes. The keyword here is “gently” so that you do no break the pins (if plastic). Your mileage will vary, mine is 50% success. If you break the rivet, it is not the end of the world. Either you have bolts and nuts in you stash that will work either you go to https://www.ebay.com/sch/i.html?_nkw=Heatsink+Cooler+Cooling+Fan+Spring+Rivet

Once separated, use isopropyl rubbing alcohol 70% (or similar) to entirely remove the dead compound. You get a very clean new chip and heat sink, as shown in Figure 18. Give the time to the alcohol traces to fully evaporate. Apply some brand new compound (I’m using the extra compound I got with a Noctua CPU cooler. Otherwise you can use a compound such as Artic MX, see Figure 19), then put back the heat sink and plug back the rivets.

Figure 18 - Heatsink and IC cleaned up

Figure 19 - Adding a drop of thermal compound, enough but not too much

Finally, if you have the funds, add a Noctua 40x10mm to pull the heat from the heat sink as shown in Figure 20. The screws to use are: pan head Phillips 6 x 3/4, they bite exactly the right way between the fins of the heat sink. You card will reward you by not dying in 2 or 3 years.

Figure 20 - Adding a 40x10mm fan is a plus

Powering the whole system

The official ODROID-H2 power brick provides 15V x 4A = max 60W. The Hard Kernel documentation (Wiki) indicates that the H2 can be powered by a DC 14V-20V (up to 60W) power supply.

The initial testing of the system (H2 + 10TB WD Red + 1 TB SSD + eMMC + 32Gb memory + Mellanox network card + card fan + chassis fan) showed a burst power consumption of 53W, then 35W to 45W during the various phases of booting to finally land at around 34.5W when idle, 38.5W with the IB card link up and 49.5W when running iperf3 network tests (where disks were not involved.) These measurements were made using the H2 power brick powering everything except the PCIe bus/IB card powered by a separate SFX PSU, which is the small format version of the regular ATX PSU.

This is too close to comfort to the max 60W supported by the lines of the H2 board, for we need some room space for additional devices connecting to the USB ports, and the chassis fan going full speed. So using a separate SFX PSU is warranted. Now it would be nice to solve the simultaneous usage of the two power supplies, this means powering the H2 with the SFX PSU and eliminate the H2 power brick from the equation.

But the SFX PSU can only provide 12V, not in the range of the14V-20V expected by the H2. A DC converter from 12V to 19V (easy to find on Aliexpress.com) could solve the issue. However, the 14V-20V requirement is not an absolute one. The H2 will be a perfectly happy camper with 12V as long as you do not ask him to power the hard disk and SSD. So the SFX PSU will power everything including the H2 itself and the SATA disks will get their power from the SFX PSU, not the H2.

Eliminating one power supply led to a significant reduction in power consumption: the system now idles at 24W (with a burst at 38W during boot), which is very manageable from the monthly electric bill viewpoint. Power consumption only climbs to 32W when running iperf3 network tests and max at 35W while copying files back and forth between the H2 and its clients over NFS.

Figure 21 - The final configuration, with the SFX PSU visible in the background

The blue ATX breakout board is in the foreground on the right. It includes (on the right) a power button to power the ATX PSU on and off. A blue light LED (behind the button turns on). The ATX power cable plugs in the middle of the board. Such a board makes it easy to get the 12V, 5V and 3.3V power lines without cutting cables, soldering, etc. In other words, the SFX PSU and its cables are left intact for reuse in the future if necessary.

Note: with this configuration, powering the H2 therefore consists in two steps. First, power on the SFX PSU, then power on the H2. And once you shutdown the H2 you have to manually turn off the SFX PSU so that the network card and disks do not consume power for nothing. The white (+12V) and black (GND) wires connected to the board bring power to the small fan PWM controller board (foreground left) and the H2 itself. To plug the power into the H2 you just need one male 2.1x5.5mm DC power jack plug adapter. The fan PWM controller board permits to control the 40x10mm fan fixed on the Mellanox network card heat sink (basically bringing it down to sufficient speed while being silent.)

The complete assembled system is shown in Figures 22 and 23.

Figure 22 - Last day on the testing table
Figure 22 - Last day on the testing table
At this point, we are done with the hardware side of the story. Let’s switch to the software side.

Setting Up the IP addresses for InfinBand IP over IB

First check that your Ubuntu 18.04 or 19.04 have its netplan delegating all network configuration to the good old Network Manager:

~$ ls /etc/netplan
01-network-manager-all.yaml
~$ cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

In the rest of this article, we will use the Network Manager. If you prefer netplan because it is the new best thing on the planet and are a netplan expert guru, you will have no problem following what’s below and translating it to the appropriate commands. At this point, the PCIe IB network card is installed and we successful established that it is recognized. So we should see the two ports available for configuration and activation. Let’s see:

~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1e:06:45:0d:47 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.70/24 brd 192.168.1.255 scope global noprefixroute enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::bdf4:34b7:f1a3:eb1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 00:1e:06:45:0d:48 brd ff:ff:ff:ff:ff:ff
4: ibp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UP group default qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:10:ea:45 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
5: ibp1s0d1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UP group default qlen 256
    link/infiniband 80:00:02:09:fe:80:00:00:00:00:00:00:00:02:c9:03:00:10:ea:46 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff

The labels enp2s0 and enp3s0 represent the two ODROID-H2 onboard 1 Gbe ports and yes (!) we have ibp1s0 and ibp1s0d1 (4: and 5: shwon above), the two ports of the ConnectX-2 card. Note that on your ODROID-H2 or other PCs they may show up as ib0 and ib1. It depends on how the naming scheme the NICs has been configured.

What to do if you do not see the IB ports?

If you just installed the IB packages as described earlier a complementary reboot will help a lot. If, after rebooting, you still do not see the network IB ports, you have to dig in to find out what is going on. Is the ib_ipoib kernel module loaded?

~$ sudo lsmod | grep ib_ipoib
Should show something like:
ib_ipoib              110592  0
ib_cm                  57344  2 rdma_cm,ib_ipoib
ib_core               249856  10 rdma_cm,ib_ipoib,rpcrdma,mlx4_ib,iw_cm,ib_iser,ib_umad,rdma_ucm,ib_uverbs,ib_cm

If it does not show up, it means the ib_ipoib Kernel module was not loaded. Try:

~$ sudo modprobe ib_ipobib

If still not successful and depending the error message, your best option is to apt remove the IB packages and reinstall them and reboot. If by any chance you previously had the Linux Mellanox OFED installed, proceed as follows:

# Become root
~$ sudo su -
# Go to the Mellanox OFED installation kit
~$ cd MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu18.04-x86_64/
# Uninstall it
~$ ./uninstall.sh
# Get rid of it 
~$ cd ..
~$ rm -fr MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu19.04-x86_64
~$ rm -f MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu18.04-x86_64 MLNX_OFED_LINUX-4.6-1.0.1.1-ubuntu18.04-x86_64.tgz
~$ exit
# Install the apt repositories versions
~$ sudo apt install rdma-core opensm ibutils ibverbs-utils infiniband-diags perftest mstflint
# Reboot
~$ sudo shutdown -r now

If you still do not see the IB ports, go to the ODROID-H2 forum and ask for help from a good Samaritan, and/or google until exhaustion for solutions from other lost souls who had the same issue(s).

Configuring the IB ports for IPoIB use

At this point, we assume that you do see the IP ports. Let’s configure and activate them using the Network Manager nmtui command

~$ sudo nmtui

Figure 24 - The nmtui ncurse dialog appears

Select Edit a connection in the ncurse dialog, then Select Add and choose InfiniBand and select Create:

Figure 25 - Choose InfiniBand and select Create
The Edit connection dialog appears, as shown in 26.

Figure 26 - Edit connection dialog
Select or enter the following options:

- Transport Mode: Connected,
- MTU: 65520,
- Manual IPv4: 10.10.10.70/8 

The IP is whatever subnet and mask you prefer as long as it is not the subnet of you regular 1 Gbe network. There is no need for Gateway, DNS servers or Search Domains, the H2 (and PCs) will find the IP addresses of the regular domain names via the 1 Gbe network or wireless. Finally select OK. After exiting this screen, select Back and select Activate a Connection in the main dialog to verify that your new NIC port is active. If not, activate it. See Figure 27.

Figure 27 - There are two InfiniBand active connections because I configured and activated both ports of the IB card
Do not forget to add the IP addresses of your IB ports and host names to the host files of your H2 and PCs, or if you are running your own local DNS to add them to it.

Let’s verify that our connection is working and the link is up:

~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
.../...
4: ibp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65520 qdisc fq_codel state UP group default qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:10:ea:45 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff
    inet 10.10.10.70/8 brd 10.255.255.255 scope global noprefixroute ibp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::76fa:9754:1f17:3ca7/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Testing connection and bandwidth with iperf3

Note: If iperf3 does not connect between the server and the client, double-check your nmtui configuration then if the problem persists, double check that the kernel module ib_ipoib is loaded. Finally you can check pinging over InfiniBand, to do so see this man page. Note that ibping does not work like ping, you have to start it in server mode on one machine and then only you can target it from another IB connected machine.

Let’s use an i5 9600K PC to talk with the H2 using IP over OB. First let’s start iperf3 in server mode on the i5:

~$ iperf3 -s --bind 10.10.10.21
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Note: press Ctrl-C to exit the server mode once you’re done testing.

Then connect to it as client from the H2:

~$ iperf3 -c 10.10.10.21 --bind 10.10.10.70 -t 10
Connecting to host 10.10.10.21, port 5201
[  5] local 10.10.10.70 port 54865 connected to 10.10.10.21 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   1.00-2.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   2.00-3.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   3.00-4.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   4.00-5.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   5.00-6.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   6.00-7.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   7.00-8.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   8.00-9.00   sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
[  5]   9.00-10.00  sec  1.29 GBytes  11.1 Gbits/sec    0   3.18 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  12.9 GBytes  11.1 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  12.9 GBytes  11.1 Gbits/sec                  receiver

Let’s now do the reverse, let’s start iperf3 in server mode on the H2:

~$ iperf3 -s --bind 10.10.10.70
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

Then connect to it as client from the i5:

~$ iperf3 -c 10.10.10.70 --bind 10.10.10.21 -t 10
Connecting to host 10.10.10.70, port 5201
[  4] local 10.10.10.21 port 49411 connected to 10.10.10.70 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   1.00-2.00   sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   2.00-3.00   sec  1.68 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   3.00-4.00   sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   4.00-5.00   sec  1.68 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   5.00-6.00   sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   6.00-7.00   sec  1.68 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   7.00-8.00   sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   8.00-9.00   sec  1.68 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
[  4]   9.00-10.00  sec  1.67 GBytes  14.4 Gbits/sec    0   3.12 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  16.7 GBytes  14.4 Gbits/sec    0             sender
[  4]   0.00-10.00  sec  16.7 GBytes  14.4 Gbits/sec                  receiver

With 11.1 GbE in one direction and 14.4 GbE in the other we passed the 10 GbE mark, hence the eye catching title of this article! At this point you may start thinking, but wait a minute! 11.1 and 14.4 is way below the 40 Gb/s of the InfiniBand network. And you are entirely right.

However, let’s take a closer look at what is going on here:

  • We start at 40 Gbe max.
  • Remember the 8b10b line encoding? So we are now at 32 Gbe max.
  • Remember the card is a PCIe 2 x8, but we only have a PCIe x4 slot, so the traffic on the PCIe bus get reduced by a factor of 2. So we are now at 16 Gb/s max (PCIe 2.0 uses an 8b/10b encoding scheme, therefore delivering, per-lane, an effective 4 Gbit/s max transfer rate from its 5 GT/s raw data rate, and 4 Gbit/s x 4 lanes = 16 Gbit/s)
  • Add the processing of the IP stack, the processing of iperf3 itself over the speed of the Celeron J4105 (which is not an i9 9900k or Ryzen 3900x) and yes, we are in the neighborhood of the witnessed 11.1 GbE and 14.4GbE.

Another way to test the connection if you do not have (yet) a second PC with an IB card, and if you have a 2-port card on the H2 is to configure and activate both ports and then connect them to each other:

~$ iperf3 -s --bind 10.10.10.70
.../...
~$ iperf3 -c 10.10.10.70 --bind 10.10.10.71 -t 300
Connecting to host 10.10.10.70, port 5201
[  4] local 10.10.10.71 port 49363 connected to 10.10.10.70 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  3.18 GBytes  27.3 Gbits/sec    0   1.75 MBytes       
[  4]   1.00-2.00   sec  3.14 GBytes  27.0 Gbits/sec    0   1.75 MBytes       
.../...       
[  4] 299.00-300.00 sec  3.08 GBytes  26.5 Gbits/sec    0   3.12 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-300.00 sec   895 GBytes  25.6 Gbits/sec    0             sender
[  4]   0.00-300.00 sec   895 GBytes  25.6 Gbits/sec                  receiver

Because the server and client are on the same machine iperf3 sums the input and output traffic. Not too surprisingly 25.6 ~= 14.4 + 11.1. For a comparison with more powerful PCs and CPUs, here are additional results.

~$ iperf3 -s --bind 10.10.10.24
~$ iperf3 -c 10.10.10.24 --bind 10.10.10.25
Connecting to host 10.10.10.24, port 5201
[  4] local 10.10.10.25 port 38783 connected to 10.10.10.24 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  5.56 GBytes  47.7 Gbits/sec    0   1.37 MBytes       
[  4]   1.00-2.00   sec  5.61 GBytes  48.2 Gbits/sec    0   1.37 MBytes       
[  4]   2.00-3.00   sec  5.64 GBytes  48.5 Gbits/sec    0   1.37 MBytes       
[  4]   3.00-4.00   sec  5.60 GBytes  48.1 Gbits/sec    0   1.44 MBytes       
[  4]   4.00-5.00   sec  5.65 GBytes  48.5 Gbits/sec    0   1.44 MBytes       
[  4]   5.00-6.00   sec  5.55 GBytes  47.7 Gbits/sec    0   1.44 MBytes       
[  4]   6.00-7.00   sec  5.61 GBytes  48.2 Gbits/sec    0   1.44 MBytes       
[  4]   7.00-8.00   sec  5.58 GBytes  48.0 Gbits/sec    0   1.44 MBytes       
[  4]   8.00-9.00   sec  5.52 GBytes  47.5 Gbits/sec    0   1.44 MBytes       
[  4]   9.00-10.00  sec  5.66 GBytes  48.6 Gbits/sec    0   1.44 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  56.0 GBytes  48.1 Gbits/sec    0             sender
[  4]   0.00-10.00  sec  56.0 GBytes  48.1 Gbits/sec                  receiver

Note: this was performed with an industrial board running an AMD v1605b.

~$ iperf3 -s --bind 10.10.10.20
~$ iperf3 -c 10.10.10.20 --bind 10.10.10.21
Connecting to host 10.10.10.20, port 5201
[  4] local 10.10.10.21 port 57059 connected to 10.10.10.20 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.4 GBytes  98.1 Gbits/sec    0   1.56 MBytes       
[  4]   1.00-2.00   sec  11.6 GBytes  99.4 Gbits/sec    0   1.56 MBytes       
[  4]   2.00-3.00   sec  11.4 GBytes  98.3 Gbits/sec    0   1.56 MBytes       
[  4]   3.00-4.00   sec  11.7 GBytes   100 Gbits/sec    0   1.56 MBytes       
[  4]   4.00-5.00   sec  11.5 GBytes  98.7 Gbits/sec    0   1.56 MBytes       
[  4]   5.00-6.00   sec  11.5 GBytes  98.4 Gbits/sec    0   1.56 MBytes       
[  4]   6.00-7.00   sec  11.5 GBytes  98.4 Gbits/sec    0   1.56 MBytes       
[  4]   7.00-8.00   sec  11.8 GBytes   101 Gbits/sec    0   1.56 MBytes       
[  4]   8.00-9.00   sec  11.4 GBytes  98.1 Gbits/sec    0   1.56 MBytes       
[  4]   9.00-10.00  sec  11.5 GBytes  98.7 Gbits/sec    0   1.56 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   115 GBytes  98.9 Gbits/sec    0             sender
[  4]   0.00-10.00  sec   115 GBytes  98.9 Gbits/sec                  receiver

Note: this was performed with a host running an i5 9660K (the motherboard is an ASRock Z390M-ITX/ac, memory is at 3200MT/s) and over FDR.

Not too surprisingly, the more money you throw at something, the best result you get… usually. But the point here is that the ODROID-H2 can do up to 14.4Gbe. Not bad for a $111 embedded board. Let’s now see it behaves as an NSF server.

Using NFS over InfiniBand

To prepare the volumes to be shared, let’s partition and format the 1 TB SSD (/dev/sda).

~$ sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt                                                                 
(parted) unit tb                                                          
(parted) mkpart primary 0.00 1.00
(parted) align-check optimal 1
1 aligned
(parted) q
Information: You may need to update /etc/fstab.

~$ sudo mkfs -t ext4 /dev/sda1
mke2fs 1.44.6 (5-Mar-2019)
Discarding device blocks: done                            
Creating filesystem with 250050816 4k blocks and 62513152 inodes
Filesystem UUID: 48956888-5174-45bb-89d7-c287615650b8
Superblock backups stored on blocks: 
  32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
  4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
  102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done  

Let’s partition and format the 10 TB WD Red (/dev/sdb).

~$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt 
(parted) unit tb                                                                 
(parted) mkpart primary 0.00 10.00
(parted) align-check optimal 1
1 aligned
(parted) q                                                                
Information: You may need to update /etc/fstab.

~$ sudo mkfs -t ext4 /dev/sdb1
mke2fs 1.44.6 (5-Mar-2019)
Creating filesystem with 2441608704 4k blocks and 305201152 inodes
Filesystem UUID: 5f3bb840-7d13-4052-8444-42f9c55c9abf
Superblock backups stored on blocks: 
  32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
  4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
  102400000, 214990848, 512000000, 550731776, 644972544, 1934917632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done    

Check whether or not these new volumes can be mounted without problem:

# Create the mount points
~$ sudo mkdir /mnt/ssd
~$ sudo mkdir /mnt/hdb

# Mount the volumes
~$ sudo mount /dev/sda1 /mnt/ssd
~$ sudo mount /dev/sdb1 /mnt/hdb

# Are they mounted?
~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
.../...
/dev/sda1       938G   77M  891G   1% /mnt/ssd
/dev/sdb1       9.1T   80M  8.6T   1% /mnt/hdb
# Yep!

Add these volumes to /etc/fstab using their UUID:

# Fetch the UUID of /dev/sda1 and /dev/sdb1
~$ sudo blkid
.../...
/dev/sda1: UUID="48956888-5174-45bb-89d7-c287615650b8" TYPE="ext4" PARTLABEL="primary" PARTUUID="b660dfe2-1a2f-4238-a460-3eabbcb39c23"
/dev/sdb1: UUID="5f3bb840-7d13-4052-8444-42f9c55c9abf" TYPE="ext4" PARTLABEL="primary" PARTUUID="3b46613a-302f-4cd0-91bc-80cdd6f81a41"

# Edit /etc/fstab
~$ sudo vi /etc/fstab
# To add these two lines:
.../...
UUID=48956888-5174-45bb-89d7-c287615650b8       /mnt/ssd        ext4    defaults  0  0
UUID=5f3bb840-7d13-4052-8444-42f9c55c9abf       /mnt/hdb        ext4    defaults  0  0
.../...

# Unmount the volumes previously manually mounted
~$ sudo umount /mnt/ssd
~$ sudo umount /mnt/hdb

# Mount all volumes according to /etc/fstab
~$ sudo mount -a

# Are our two new volumes mounted?
~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
.../...
/dev/sda1       938G   77M  891G   1% /mnt/ssd
/dev/sdb1       9.1T   80M  8.6T   1% /mnt/hdb
# Yep!

Setting up NFS (server side)

Let’s install the NFS server package on the H2:

~$ sudo apt update
~$ sudo apt upgrade
~$ sudo apt install nfs-common nfs-kernel-server

Configure the exports (adding the two lines shown below):

~$ sudo vi /etc/exports
.../...
/mnt/ssd/nfs    *(rw,sync,no_subtree_check)
/mnt/hdb/nfs    *(rw,sync,no_subtree_check)
.../...

Let’s set the permissions without bothering at all for security at this point (we’re testing!):

~$ sudo chown -R nobody:nogroup /mnt/ssd/nfs
~$ sudo chmod -R 0777 /mnt/ssd/nfs
~$ sudo chown -R nobody:nogroup /mnt/hdb/nfs
~$ sudo chmod -R 0777 /mnt/hdb/nfs

Load the RDMA kernel module for NFS server over RDMA:

~$ sudo modprobe svcrdma

Restart the NFS service:

~$ sudo systemctl restart nfs-kernel-server

Once restarted, tell the NFS service to also listen on the RDMA ports:

~$ echo rdma 20049 | sudo tee /proc/fs/nfsd/portlist

Note: you have to do this each time you restart the NFS service. Eventually you will want to put it all into a script.

Check whether or not it is correctly set up (optional):

~$ sudo systemctl status nfs-kernel-server
  nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sun 2019-09-15 14:47:12 PDT; 18s ago
  Process: 2386 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
  Process: 2387 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
 Main PID: 2387 (code=exited, status=0/SUCCESS)

Sep 15 14:47:12 h2a systemd[1]: Starting NFS server and services...
Sep 15 14:47:12 h2a systemd[1]: Started NFS server and services.

~$ sudo cat /proc/fs/nfsd/portlist
rdma 20049
rdma 20049
udp 2049
tcp 2049
udp 2049
tcp 2049

Setting up NFS (client side)

Let’s use again an i5 9600K PC as testing client. In the text below, the name “h2a” is the host name of the ODROID-H2 over the 1 GbE network and the name “h2a.ib” is the host name of the H2 over the InfiniBand network. These names get their associated IP addresses via the /etc/hosts file setup on both machines (or a local DNS if you run one.)

Let’s install the NFS client package on the i5:

~$ sudo apt update
~$ sudo apt upgrade
~$ sudo apt install nfs-common

Load the RDMA kernel module for NFS client over RDMA:

~$ sudo modprobe xprtrdma

Testing

For testing, we copied various files from the i5 to the H2:

  • CentOS-7-x86_64-DVD-1804.iso, the ISO image of the CentOS7 64-bit install DVD. What matters here is the file size: 4.5GB
  • Lunar_LRO_WAC_GLD100_DTM_79S79N_100m_v1.1.tif, a TIFF image of the Moon. File size: 10.5GB
  • VMware-image-folder, a directory containing a Vmware image for a total size of 41GB with 41 files.

On the i5, we proceed as follows:

# Create the mount points:
~$ sudo mkdri h2a:/mnt/nfs/h2a/ssd
~$ sudo mkdri h2a:/mnt/nfs/h2a/hdb
# Mount the SSD remote volume from the H2 over the 1 GbE network:
~$ sudo mount h2a:/mnt/ssd/nfs /mnt/nfs/h2a/ssd
# Measure the time it takes to copy a file:
~$ time cp /home/domih/Downloads/CentOS-7-x86_64-DVD-1804.iso /mnt/nfs/h2a/ssd
# Mount the hard disk remote volume from the H2 over the 1 GbE network:
~$ sudo mount h2a:/mnt/hdb/nfs /mnt/nfs/h2a/hdb
# Measure the time it takes to copy a file:
~$ time cp /home/domih/Downloads/CentOS-7-x86_64-DVD-1804.iso /mnt/nfs/h2a/hdb
# Unmount the volumes:
sudo umount /mnt/nfs/h2a/ssd
sudo umount /mnt/nfs/h2a/hdb
# Mount again but this time over NFS RDMA
sudo mount -o rdma,port=20049 h2a.ib:/mnt/ssd/nfs /mnt/nfs/h2a/ssd
# Measure the file copy again.
sudo mount -o rdma,port=20049 h2a.ib:/mnt/hdb/nfs /mnt/nfs/h2a/hdb
# Measure the file copy again.

Tests for the 4.5GB file were made 3 times over NFS in sync mode and then in async mode. The test were made only once for the bigger file and directory over NFS in async mode.

To switch the NFS server from sync to async mode, we just change the shares in the /etc/exports file and restart the NFS server (without forgetting the echo rdma...):

~$ sudo vi /etc/exports
.../...
/mnt/ssd/nfs    *(rw,async,no_subtree_check)
/mnt/hdb/nfs    *(rw,async,no_subtree_check)
.../...
~$ sudo systemctl restart nfs-kernel-server
~$ echo rdma 20049 | sudo tee /proc/fs/nfsd/portlist

Here are the results:

Figure 28 - Testing results
The formula to compute the speed in Gbe is:

File Size in Bytes x 8 / Time in secs / 1000000000 = Speed in Gbe

What to conclude from these numbers

  • The resources (CPU) and time consumed writing to the SSD or hard disk do not affect the speed of the 1 GbE Ethernet because the network speed is slow enough to cover it up. On the other hand they do affect the 10+ GbE interconnect. You particularly see this comparing the NFS RDMA results in sync mode between the SSD and the hard disk. This effect disappears after switching NFS RDMA to async mode. Is there a “danger” penalty to switch to async? Not really as long as your server is behind a UPS and does not fail, meaning I/O error on the disk or crash. Both Windows and Linux in a certain extent cache disk writing anyway so in case of failure, the story is the same. For a longer discussion, see https://www.google.com/search?q=nfs+sync+vs+async.
  • The acceleration varies from a little less than x2 to close to x8. The acceleration varies depending on what you copy and where you copy it. In any case, not bad at all for an embedded board that costs slightly more than $100.
  • Beyond the numbers the human psychological effect is more about how long you wait for an operation: 1m16 is definitely much faster than 6m32! With the former you wait, with the latter you go grab a coffee.
  • These are realistic numbers without time spent on optimizing. See Postscript below.

To play with unrealistic numbers, let’s use a RAM disk on one of the machines (here the i5) and copy from the H2 to the I5:

sudo mkdir -p /mnt/ramdisk
sudo mount -t tmpfs -o size=20480M tmpfs /mnt/ramdisk

time cp /mnt/nfs/h2a/ssd/CentOS-7-x86_64-DVD-1804.iso /mnt/ramdisk
4470079488*8/3.338/1000/1000/1000 = 10.71 Gbe

time cp /mnt/nfs/h2a/ssd/Lunar_LRO_WAC_GLD100_DTM_79S79N_100m_v1.1.tif /mnt/ramdisk
10461394351*8/7.385/1000/1000/1000 = 11.33 Gbe

Yeah, we are back above the 10Gbe mark! So if you really want to pump up the numbers, use a RAM disk (on the server and/or the client), the amount of data you can transfer will be limited to the size of the RAM disk (here 20GB) and you will have to write a CRON job or something like that to eventually copy the RAM disk to the physical disk on the server and/or the client for actual long term persistent storage.

Postscript

We hope you enjoyed reading this article. As mentioned earlier, remember that I am not an embedded computing nor and InfiniBand expert. If you are, do not hesitate to send your feedback to the Odroid Magazine or forum because I and others like to learn more about new things. Due to time and resource restrictions as well as reasonable article length for a magazine publication, I did not address the following topics:

  • Possible CPU affinity, IRQ affinity and TCP/IP optimizations,
  • Use LVM2 to create a cached logical volume for optimizing disk I/O,
  • Samba usage over this type of interconnect,
  • Windows Server 2012 (or later) and Windows 10 integration with SMB direct,
  • Alternate solutions using 10 GbE Ethernet SFP+ cards and switches (SFP+ is significantly less expensive than their RJ-45 cousins as of this writing),
  • Other technologies leveraging RDMA, such as distributed file systems (Hadoop, Lustre, Ceph, GlusterFS…), distributed databases, etc.

Depending on interest, there might be follow-up articles by me or others. Do not hesitate to express your interest to the Odroid Magazine.

About the author

Figure 29 - Dominique when he was younger. We used this image as the opportunity to show how cool the fashion for little boys in France early 60s was

Dominique has grown up since the above image was taken, and has been working as CTO or SVP of Engineering in multiple start-ups located around the San Francisco bay area (Silicon Valley) for the last 30 years. Dominique is currently SVP of Engineering at bonafeyed.com a start-up just getting out from under the radar. Its main product, Cy4Secure, is a data security solution that protects data or information when it is shared with others, through or in the cloud or an application, keeping the data always encrypted while on the move as well as at rest. Cy4Secure represents the last line of data protection after a security breach. Dominique is also consulting for mkrypt.com which is working on a Bluetooth low-energy fob providing true voice encryption for mobile and smartphones. You can reach Dominique on the ODROID forum by messaging @domih.

Is That a Linux Computer in Your Pocket, or Are You Just Glad to See Me?: Build an ODROID Computer You Can Carry in Your Pocket

Fresh on the heels of the ODROID Tablet project, https://magazine.odroid.com/article/build-a-rootin-tootin-dual-bootin-odroid-tablet-using-the-odroid-c0-to-make-a-professional-grade-tablet-for-under-usd100/, comes an even more portable version of the ODROID-C0. Rather than sporting a large-scale HDMI-equipped LCD, this “pocket ‘puter” relies on a framebuffer-driven video output displayed on a 3.2-inch thin-film-transistor (TFT) touchscreen shield dubbed the C1.

Figure 1 – A “pocketable” palm-sized Linux computer.
Figure 1 – A “pocketable” palm-sized Linux computer.

While this touchscreen shield is designed as a simple “plug-n-play” peripheral, the software setup for enabling the ODROID-C0 to use this display can be a daunting task. Luckily, Hardkernel has created a series of articles for enabling you to setup this display quickly and easily. Just religiously follow the Hardkernel wiki steps, while adhering to the following assembly steps, and you will have your very own pocket full of computing pleasure for less than $65.

Parts

  • ODROID-C0 $28.00
  • C1 3.2-inch TFT + Touchscreen Shield $25.00
  • Connector Pack for ODROID-C0 $1.80
  • 3000 mAh Battery $1.00
  • RTC Backup Battery $2.50 [Optional]
  • microSD Card 32GB $5
  • Also, you will temporarily need access to an HDMI monitor and USB keyboard and mouse for programming the ODROID-C0.

Step-by-Step

1. Prepare the ODROID-C0 PCB with several components from inside the Connector Pack for using the C1 shield. Solder the dual stacked USB connector to the PCB. Snap off 26 pins, two rows of 13 pins, from the ODROID-C0 dual row header. Solder this header onto the ODROID-C0 GPIO connector starting from pin 1.

(

Figure 2 - All of the soldering is now complete. Notice that the dual row header has only been soldered to 26 GPIO pins.
Figure 2 - All of the soldering is now complete. Notice that the dual row header has only been soldered to 26 GPIO pins.

2. Connect the 3000 mAh Battery and the optional RTC Backup Battery to the ODROID-C0.

3. Slide the C1 Shield female headers onto the ODROID-C0 headers you soldered in Step 1.

4. Temporarily connect the ODROID-C0 to an HDMI monitor and USB keyboard and mouse.

5. Ensure that the ODROID-C0 is being powered by a 5V 2A power supply. The PCB’s green battery charging LED may or may not be lit during the programming of the ODROID-C0.

6. Follow the Hardkernel Wiki steps for programming the ODROID-C0:

http://wiki.odroid.com/accessory/display/3.2inch_tft_touchscreen_shield/start

Figure 3 - After you’ve completed the Hardkernel C1 shield wiki, look for the touchscreen calibration app inside the Ubuntu menu. Run this app for finalizing the touchscreen shield setup.
Figure 3 - After you’ve completed the Hardkernel C1 shield wiki, look for the touchscreen calibration app inside the Ubuntu menu. Run this app for finalizing the touchscreen shield setup.

7. Disconnect the HDMI monitor and reboot the ODROID-C0. Keep the USB keyboard and mouse plugged into the ODROID-C0. After a one to two minute delay, the mouse cursor will appear on the Touchscreen Shield followed by the Log-in screen.

Figure 4a - The Ubuntu Log-in screen—just click it and you’re ready to go.
Figure 4a - The Ubuntu Log-in screen—just click it and you’re ready to go.

Figure 4b - There isn’t a lot of screen real estate on the touchscreen shield. Use the Notes (i.e., numbers 3 and 4) below for maximizing your little screen’s potential.
Figure 4b - There isn’t a lot of screen real estate on the touchscreen shield. Use the Notes (i.e., numbers 3 and 4) below for maximizing your little screen’s potential.

8. Use the USB keyboard and mouse for configuring your new pocket-friendly ODROID. Possible uses for this Pocket ‘Puter are a portable event timer/stopwatch/clock, a family calendar, a mobile download device, and a personal media player.

Figure 5 - Either ready for the local coffee shop WiFi hotspot or resting attentively at your local family household wifi hotspot, this petite ‘puter powerhouse can handle it.
Figure 5 - Either ready for the local coffee shop WiFi hotspot or resting attentively at your local family household wifi hotspot, this petite ‘puter powerhouse can handle it.

Notes

1. The large ground, GND, plane on the ODROID-C0 PCB can make soldering extremely difficult. Try using an adjustable-temperature soldering station with a temperature setting of about 380-degrees C.

2. Here’s a Pro Tip for beginning DIYers: never solder more male header pins on a PCB than you plan on using. For example, in this project only two rows of 13 pins were used. If all 40 pins of the ODROID-C0 connector were soldered onto the PCB, some power pins will be exposed (e.g., pin 38 1.8V and pin 39 GND) which could result in a short circuit and damage your beloved ODROID.

3. Add a shutdown button to the top panel of the Desktop window. You can add this button by performing a right click with your mouse while the cursor is inside the top panel.

4. Make two modifications to the Preferences of the File Management app: first, change the behavior of the user interface to using “one click” for accessing files and folders. Second, decrease the magnification of the standard view to 50%.

5. The title for this article is a paraphrase quote of Mae West from the movie “Sextette” (1978).

El Punto G: Tu Destino para Todas las Cuestiones Relacionadas con Juegos Android

Basándome en los lanzamientos de juegos anunciados en gamescom 2019, el futuro para los juegos de Android parece muy prometedor. Como recordarás, gamescom, organizada por Koelnmesse y game, la Asociación Alemana de la Industria de los Juegos, es la autoproclamada "Feria más grande del mundo y el evento más destacado para juegos interactivos y entretenimiento". Este año se celebró en Colonia, Alemania, entre el 20 y el 24 de agosto de 2019. Hubo juegos, videos destacados, asistentes cosplay y algo grande, muy grande. Ese "algo" era Sony.

Figure 1 - gamescom 2019 finally pulled the curtain back on Google’s Stadia streaming game subscription service.
Figura 1: gamescom 2019 finalmente corrió el telón del servicio de suscripción de juegos de transmisión Stadia de Google.

Además de la gran cantidad de futuros títulos que se anunciaron, el evento absolutamente más sorprendente tenía que ser el de Sony Interactive Entertainment, que ganó el codiciado premio “Best of gamescom” por su creación del juego sandbox, Dreams. Recordarás que Sony dio mucho que hablar por su "no presencia" en la E3 Expo 2019. Este despropósito en el evento de Los Ángeles no les impidió acaparar el Hall 7 en Colonia y hacerse con un puñado de premios, incluidos los mencionados "Best of gamescom" junto con "Best VR / AR Game" (Marvel's Iron Man), "Best Family Game" (Concrete Genie), "Most Original Game" (Dreams, again!) y "Best Sony PlayStation 4 Game" (lo adivinaste, Dreams).

Figure 2 - No, you’re not dreaming, Sony Interactive Entertainment Dreams title is a worthy winner of the “Best of gamescom” award. Image courtesy of Sony Interactive Entertainment.
Figura 2: No, no estás soñando, el título Dreams de Sony Interactive Entertainment es un digno ganador del premio "Best of gamescom". Imagen cortesía de Sony Interactive Entertainment.

Sony no fue la única gran noticia en gamescom, también hubo algunas noticias sobre juegos de Android. En realidad, estas noticias no hablaban realmente de juegos Android, en sí mismas, ¡TODAS giraban en torno a Google Stadia! Stadia está tanto para Android como para iOS, PC con Windows, MacOS y, puedes creerlo, Linux. Si la plataforma que usas tiene Google Chrome o Chromium, entonces puede convertirte en un gran jugador. ¡HURRA!

Con un coste mensual de 9.99$, Stadia Pro, es decir, la versión incluida en la $ 129 Founder’s Edition de 129$ que incluye lanzamientos regulares de juegos GRATUITOS, está programado para lanzarse en noviembre de este año. Según un pequeño rumor que he escuchado, Google Stadia vendrá con una versión GRATUITA (sin tarifa mensual) en algún momento en 2020. No hay juegos GRATUITOS, sin embargo, esta versión está limitada a 1080p.

Entonces, ¿Qué juegos podemos esperar en Google Stadia? En gamescom, se presentó la lista completa de títulos. Aquí tienes un fragmento de esta lista larga, larga:

Bethesda – DOOM Eternal Bungie – Destiny 2 [este título podría ser un lanzamiento GRATUITO en noviembre para los miembros de Founder’s Edition] CD PROJEKT RED – Cyberpunk 2077 [con críticas favorables desde su lanzamiento en E3 Expo 2019] Dotemu – Windjammers 2 Larian Studios – Baldur’s Gate 3 Pandemic Studios – Destroy All Humans! Robot Entertainment – Orcs Must Die 3 SEGA – Football Manager Square Enix – Final Fantasy XV Square Enix – Marvel’s Avengers 2K – NBA 2K Warner Bros. - Mortal Kombat 11 Ubisoft – Tom Clancy’s Ghost Recon Breakpoint Ubisoft – Just Dance [un favorito de ODROID Magazine]

La cuenta de Twitter de Google Stadia puedes encontrar un video en el que varios jugadores juegan a Stadia:

https://t.co/WeBuVEUYVb

Si eres como yo, seguro que ahora mismo estás pensando: "Noviembre no va a llegar lo suficientemente rápido". Y "¿dónde está mi suscripción a la Founder’s Edition?"

Noticias de última hora

Justo cuando este número estaba en producción, llegaron dos noticias a mi escritorio. Primero, en honor al 25 aniversario de id Software del lanzamiento de DOOM (en 1993), Bethesda ha lanzado DOOM y DOOM II en Google Play por $ 4.99 cada uno. Cómo cambian los tiempos, ¿verdad? Recuerdo que, en el vigésimo aniversario, el lanzamiento de la aplicación DOOM era GRATIS.

Segundo, Nintendo acaba de anunciar que Mario Kart Tour debutará para Android el 25 de septiembre. Así es; se suponía que este título se lanzaría en marzo de 2019. Sin embargo, después de algunas modificaciones en el código, esta edición para móvil finalmente debería estar disponible para cuando leas este artículo.

Sin duda, hay quien se sorprenderá al saber que Mario Kart Tour será una app GRATUITA. Pero no contengas la respiración demasiado tiempo, el juego incluirá compras dentro de la propia app o microtransacciones. Queda por ver como coexistirá este sistema de pago con la propia mecánica de juego.

Refrigeración por Agua de Bajo Coste para tu Ordenador de Placa Reducida: Cómo Lograr que tu ODROID Alcance Máxima Velocidad

La refrigeración por agua en los SBCs no es nada nuevo, hay personas que ya han implementado diseños utilizando componentes estándar para el ODROID-XU4 y otros SBC. Algunas de estas implementaciones se han presentado en ODROID Magazine en el pasado.

Diciembre 2016 https://magazine.odroid.com/wp-content/uploads/ODROID-Magazine-201612.pdf

Julio 2018 https://magazine.odroid.com/article/liquid-cooling-part-1-cluster/ https://magazine.odroid.com/article/liquid-cooling-part-2-server/

Inicialmente el objetivo de este proyecto era conseguir que la refrigeración por agua fuera de bajo coste y económica para el ODROID-XU4. Después de trabajar en el diseño del bloque de agua, descubrí una forma de que éste pudiera soportar una amplia gama de SBC, independientemente de su capacidad para soportar o no un disipador térmico adecuado. Este desarrollo fue el presagio del SBC Model Framework que completé con anterioridad. https://forum.odroid.com/viewtopic.php?f=53&t=33823 Ahora, cualquier SBC que soporte el SBC Model Framework puede utilizar este diseño para montar un bloque de agua universal de bajo coste y así implementar un sistema de refrigeración líquida.

Las implementaciones de sistemas refrigerados por agua que he visto utilizan componentes del entorno de escritorio INTEL/AMD, más grandes y con más capacidad de la necesaria para los SBC y, por ello, generalmente van acompañados de un coste relativamente alto.

Los sistemas de refrigeración cuyo coste es mayor que el del propio SBC no son rentables ni están justificados económicamente. Están bien a nivel de investigación y para usos muy específicos, pero no para utilizarlos de forma generalizada. De modo que, la primera pregunta que me hice cuando empecé este proyecto fue ¿cuánto cuesta un sistema de refrigeración que esté económicamente justificado?

Se puede decir mucho y de hecho se ha hablado bastante sobre el tema, yo he llegado a la conclusión de que el precio no debe superar el 20% del coste total del sistema o sobre el coste de un disipador térmico y ventilador razonable. Cuando monté mi clúster ODROID-XU4, el coste por nodo que incluía la fuente de alimentación, la tarjeta SD y el cableado de red, fue de aproximadamente 73$. Me preguntaba si sería posible montar un sistema refrigerado por agua por 14$ o menos. Ya sabía que no era posible, si usaba componentes comerciales, así que tuve que tirar de creatividad y diseñar nuevos componentes al mismo tiempo que reutilizaba componentes de otras industrias.

Hay una serie de problemas que debemos solventar para logar todos los objetivos de este proyecto. En este artículo trataremos específicamente la primera fase del proyecto, que incluye el bloque de agua universal y el método de conexión y bomba de bajo coste. El intercambiador de calor y la presentación final de todo el sistema de refrigeración se abordará en una segunda fase. Este proyecto, además, representa el primer paso hacia mi objetivo final de diseñar un clúster ODROID-XU4 refrigerado por agua escalable y de bajo coste. Estoy usando un único SBC para resolver muchos de los problemas de diseño antes de meterme de lleno con la implementación de un clúster.

Después de experimentar con varias técnicas para diseñar el bloque de agua, y teniendo en cuenta que en algunos SBC no resulta fácil ni práctico conectar un disipador de calor, empecé a experimentar con una carcasa refrigerada por agua a la que se podía acoplar bloques de agua de diferentes tamaños con un método de fijación universal.

Figure 1 - ODROID-XU4 SBC Water Cooled Case Design with RTC and UART holder
Figura 1 - Diseño de carcasa refrigerada por agua para el SBC ODROID-XU4 con soporte RTC y UART

El integrar el bloque de agua directamente en la carcasa, nos brinda la posibilidad de poder acoplarlo a la mayoría de los diseños de SBC actuando como un accesorio sólido y fiable. El bloque de agua podría moldearse fácilmente a cualquier tamaño o forma, y permitiría acoplar múltiples bloques de agua a cada lado de la PCB. Con la tendencia cada vez mayor de conectar hardware adicional a los SBC para manejar la IA, redes u otros procesos especializados, pensé que sería conveniente proporcionar también el medio para refrigéralos. Además, podría ser una forma de enfriar múltiples chips de memoria. Para transferir calor desde el SOC al sistema de enfriamiento se utiliza una pieza de cobre de 1/8”(3.19 mm) de grosor insertada en el bloque de agua.

Figure 2 - ODROID-XU4 Water Block
Figura 2 - Bloque de agua ODROID-XU4

Diseño de la carcasa refrigerada por agua

Algunas de las características adicionales del diseño de la carcasa refrigerada por agua incluye:

  • Soporte universal SBC
  • Hasta 4 bloques de agua, arriba y/o abajo
  • Separadores integrados y/o proporcionados por el usuario
  • Tapa de la carcasa ciega o atornillada con o sin avellanado
  • Accesorios predefinidos (soporte UART, soporte RTC, soporte para la parte inferior de la carcasa ODROID-XU4, grabados, ventilador de múltiples formas o agujeros para cables, etc.)
  • Accesorios sustractivos o aditivos definidos por el usuario

Problemas y sugerencias

Han sido tres problemas principales en los que he tenido que trabajar para que este diseño siga adelante. El primero fue encontrar accesorios que fueran económicos, pequeños y lo suficientemente fuertes como para que funcionasen adecuadamente. Los accesorios de los sistemas de refrigeración líquida INTEL/AMD son demasiado grandes para la mayoría de los SOC SBC. Dos de ellos no se ajustarán al tamaño de muchos SOC. Al estar familiarizado con los sistemas de riego por goteo, decidí usar púas de riego por goteo que son fuertes, pequeñas, se pueden pegar fácilmente en su correspondiente lugar y disponen de versiones rectas y de 90 grados.

https://www.digcorp.com/homeowner-drip-irrigation-products/1-4-barbed-fittings

Para realizar las pruebas necesité un método sólido, aunque reversible para fijarlas con el objeto de poder reutilizarlas. Tras probar varios pegamentos, el cianoacrilato (Super Glue) parecía ser el que mejor funcionaba. Corté la púa de un extremo y la pegué en su lugar. Era lo suficientemente sólido como para absorber una carga de trabajo considerable y las púas aún podían retirarse debido a la fragilidad del pegamento. Se puede usar otro pegamento más fuerte y permanente o soldadura de acetona ABS para el prototipo final. Incluso puede ser posible tocar un extremo de la púa para conseguir una solución en rosca.

El segundo problema fue encontrar una bomba adecuada que fuera económica, que proporcionara un servicio continuo, que tuviera el caudal adecuado y funcionara con 5 voltios. Después de buscar en la industria médica y alimentaria pude adquirir por 5$ (entregados), una microbomba 23 5v 1.5w serie ET-Tech con capacidad de servicio continuo. También tenía la ventaja de ser muy silenciosas. http://www.et-pump.com/brushless_23.html

El tercer problema a solventar tuvo que ver con la creación de la carcasa. El punto débil del diseño estaba relacionado con la fabricación del bloque de agua utilizando la tecnología de impresión 3D. Cada capa del bloque de agua suponía una posible fuga de agua. Además de esto, la ubicación del SOC ODROID-XU4 supuso un auténtico desafío debido a su proximidad al cabezal GPIO de 12 pines. A causa del grosor requerido del bloque de agua, éste no contaba con el adecuado espacio para el conector. Ninguno de los otros SBC que probé tenía este problema, era específico del ODROID-XU4. Para colmo, si forzamos el ensamblaje de la carcasa, la presión arquea ligeramente la parte superior de la carcasa, creando suficiente presión como para abrir micro grietas en las capas de impresión que con el tiempo pierden agua.

Después de varios meses trabajando en este problema, no logré resolverlo y dejé el diseño a un lado. El diseño funcionaba para otros SBC, pero el ODROID-XU4 era la razón principal por la que me interesaba esta solución. Después de muchos más intentos para abordar lo que consideraba un problema de diseño importante, me di cuenta de que el cuerpo del cabezal GPIO de 12 pines se podía retirar fácilmente de los pines, proporcionando así el suficiente espacio como para que el bloque de agua hiciera el adecuado contacto con el SOC. En términos generales, el planteamiento para por nunca hacer modificaciones permanentes al SBC. Observé que esta solución era razonable ya que la base se podía reinstalar con facilidad. Ten en cuenta que, debido a la poca soldadura utilizada en la fabricación de la PCB y la ausencia de la base que alojan los pines, es muy fácil que se suelte alguno, así que ten mucho cuidado si retiras la base del cabezal GPIO.

Figure 3 - ODROID-XU4 case closeup
Figura 3 - Primer plano de la carcasa del ODROID-XU4

Para garantizar de que las micro fugas no fuesen un problema continuo, también desarrollé una técnica para reforzar todo el bloque de agua. Usando un bastoncillo de algodón y acetona, sumergí el bastoncillo en la acetona y luego lo froté con cada lateral del bloque de agua y las esquinas. Repetí este proceso 2-3 veces por cada lado para que el ABS se derritiera y formara una película continua, minimizando significativamente la posibilidad de que se formasen microgrietas en el bloque de agua. No he tenido ninguna fuga recurriendo a este método. Si la carcasa se fabricara con un molde, este problema no existiría. Al tratarse de proceso de fabricación por capas de impresión 3D tuve que lidiar con este problema.

Otro consejo que vale la pena mencionar para por sumergir el tubo de 1/4” en agua hirviendo para formar las curvas necesarias con la finalidad de que las conexiones no estén bajo tensión una vez ensambladas. Sumergido el tubo unos segundos bastará para ablandar el plástico lo suficiente como para formar cualquier forma que pueda necesitar y ésta se volverá permanente una vez que el plástico se enfríe. Gracias a este truco también nos resultará más fácil colocar el tubo sobre las púas.

Lanzamiento Beta del Diseño

Estoy en un punto en el que puedo hacer una versión beta del diseño a pesar de que el intercambiador de calor no está completo. Muchos radiadores incorporan una bomba dentro, por lo que cualquier persona que tenga alguno procedente de un sistema INTEL/AMD podría crear un económico SBC refrigerado por agua utilizando este diseño beta.

No es práctico probar todas las configuraciones posibles de SBC y carcasas; También puedes recurrir a versiones refrigeradas por aire. Ya han pasado varios meses desde que hice varias pruebas con SBC y éstas estaban limitadas por el SBC ODROID que poseía. No se han realizado pruebas operativas en este caso.

Figure 4 - ODROID Water Cooled Cases (MC1, N1, C2 and XU4)
Figura 4 - Carcasas ODROID refrigeradas por agua (MC1, N1, C2 y XU4

Desde entonces, he reescrito completamente el algoritmo de la carcasa para OpenSCAD y he agregado nuevas funciones. El ODROID-N2 fue lanzado y el ODROID-H2 volvió a estar disponible, así que tenlo en cuenta y enviame cualquier comentario o sugerencia que tengas si has probado uno de estos SBC, no es que el ODROID-N2 necesite refrigeración por agua o un nuevo sistema de refrigeración.

Archivos de Diseño de la Carcasa de Refrigeración por Agua del SBC

Es necesario tener el SBC Model Framework y su directorio debe instalarse en el mismo directorio principal que el directorio SBC Water Cooled Case. Si deseas utilizar una estructura de directorio diferente, las declaraciones de inclusión y uso en sbc_water_cooled_case.scad deben cambiarse en consecuencia.

use <../sbc_models/sbc_models.scad>
include <../sbc_models/sbc_models.cfg>
Puedes conseguir el SBC Model Framework en los foros ODROID en https://forum.odroid.com/viewtopic.php?f=53&t=33823

Prueba Inicial del Bloque de Agua

No sabía muy bien cómo funcionaría un bloque de agua de un tamaño tan reducido. Sé que el ODROID-XU4 tiene un SOC relativamente pequeño, es uno de los SBC más controvertidos a la hora de refrigerar cuando se ejecuta a 2Ghz, y sí, funcionó. Este éxito es una muy buena señalar para su implantación en la mayoría de SBC. Después de más de un año y medio de trabajo en el proyecto, finalmente llegó el momento de hacer la prueba inicial y averiguar con certeza si estaba ante un diseño viable. No es una prueba exhaustiva, ya que la definitiva vendrá cuando el intercambiador de calor se incorpore al sistema.

Banco de Pruebas y Parámetros Operativos

Se utilizó un radiador de cobre de 120 mm y un ventilador de 120 mm para probar el bloque de agua utilizando la imagen HK Minimal Ubuntu 18.04. Todas las pruebas se llevaron a cabo con A15@2ghz, A7@1.5ghz, memoria a 933mhz con la configuración del regulador en “Performance” para la CPU y la GPU.

$ uname -a
Linux c2n1 4.14.127-164 #1 SMP PREEMPT Wed Jun 19 17:28:22 -03 2019 armv7l armv7l armv7l GNU/Linux

Figure 5 - Waterblock Test Bed
Figura 5 – Banco de pruebas del bloque de agua
Kernel compile at 2ghz @ 71F(21.66c) Ambient Temperature
real 25m12.282s
user 172m3.503s
sys 16m48.678s
Figure 6 -Kernel Compile Test 2ghz
Figura 6 - Prueba de compilación de Kernel a 2ghz

Me pareció interesante ver que el tiempo de compilación es ligeramente mejor que el tiempo de compilación cruzada del ODROID-H2 probado en un estudio reciente de cnx-software.com. https://www.cnx-software.com/2019/07/14/odroid-h2-review-ubuntu-19-04/ El autor comparó la compilación cruzada en ODROID-H2 de un kernel ODROID-XU4 con un tiempo de compilación nativo ODROID-XU4Q. La temperatura ambiental durante esa prueba fue más alta. Desafortunadamente no tengo un ODROID-H2, así que no puedo duplicar la prueba para comparar el rendimiento con la misma temperatura ambiental. Otra nota en relación a la prueba de compilación del kernel; tras completar la prueba, me di cuenta de que ésta se había estado ejecutando sobre un kernel stock que tenía habilitadas las denominadas transparent huge pages (THP). No estoy seguro de si esto ayudó o perjudicó al tiempo de ejecución, pero como me interesaban los resultados térmicos, no le di demasiada importancia. La prueba BOINC usó el mismo kernel.

Temperatura Ambiental de la Prueba Boinc 8 hilos de ejecución @ 72(22.22c)

La carga de trabajo de 8 hilos de ejecución de BOINC Universe@home fue usada para las siguientes pruebas a 2ghz, 1.9ghz y 1.8ghz durante aproximadamente 1 hora cada una. Se usó la misma carga de trabajo pausando el procesamiento de BOINC hasta que el SOC se enfriase, se ajustó la frecuencia del reloj y luego se reanudó la carga de trabajo de BOINC. Como es evidente en el cuadro que aparece a continuación, dos hilos de ejecución terminaron aproximadamente 10 minutos antes durante la prueba de 1.8 ghz. Creo que los resultados siguen siendo válidos considerando que no hubo cambios en los últimos 10 minutos de las pruebas de 1.9ghz o 2.0ghz. Al observar la drástica diferencia de temperatura una vez que se completaron los 2 hilos de ejecución, inicialmente supuse que ambos estaban funcionando con núcleos A15, pero después de examinar los datos de la prueba más de cerca no pude corroborar esta conclusión porque la temperatura en todos los núcleos A15 cayó proporcionalmente. Esto parece indicar que podrían haber sido los dos núcleos A7. No se hubiera esperado tal disminución y uniformidad en la temperatura del núcleo A15 si ese fuera sido el caso. No he hecho ningún otro análisis o prueba para confirmar esta hipótesis, por lo que aún está por determinar. Por simplicidad, el gráfico muestra el núcleo A15 más popular para cada frecuencia probada.

Figure 7 - BOINC Test at 2ghz, 1.9ghz and 1.8ghz
Figura 7 - Prueba BOINC a 2ghz, 1.9ghz y 1.8ghz

Figure 8 - BOINC htop
Figura 8 – htop BOINC

Resumen

La prueba de compilación del kernel pudo mantenerse aproximadamente en los 68 °C y las cargas de BOINC también funcionaron bien en las distintas frecuencias de la prueba. Es posible realizar algunas pequeñas mejoras en el rendimiento térmico añadiendo un fluido con mejores propiedades de absorción térmica, velocidad de flujo variable o ajustando los patrones de flujo a través del bloque de agua. Espero terminar el diseño del intercambiador de calor para poder realizar pruebas más exhaustivas con el sistema completo.

Listado Materiales XU4 Coste (USD)
Púas 1/4”, ABS $.09 x 2 $0.18
Tubo 1/4” 1’ $0.15
Cobre 1/8” 15.5mm x 16.75mm $0.38
Bomba 5v 1.5w .5 L/min $5.00
Filamento Plastico ABS, 30g $0.34
Pegamento y Electricidad $0.25
Sub-Total $6.30

Del presupuesto de 14$, quedan $ 7.70 para el intercambiador de calor. Tengo varios diseños en los que estoy interesado actualmente. Aunque la bomba actual ha funcionado bien, también he estado viendo otras opciones para reducir su tamaño y coste. Si este proyecto tiene éxito, la refrigeración por agua del SBC puede ser económica y permite ampliar la envoltura térmica al permitir que un SBC funcione sin estrangulamiento a temperaturas ambiente altas mientras aumenta el rendimiento en el mundo real de SOC utilizando procesos de fabricación más antiguos.

Los archivos de diseño de OpenSCAD, los datos de prueba y los scripts gplot están disponibles en el foro https://forum.odroid.com/viewtopic.php?f=98&t=35751.

Cinco Minutos de Diversión con tu Monku R1: Comando Retro Cubículo

Requisitos

  • Una Monku Retro 1,2,3 / ODROID-C1+, 2, XU4 (se supone que estos dispositivos estén configurados con Ubuntu y MATE. Consulta las referencias al final para los dispositivos R1, R2 y dispositivos R3).
  • Una tarjeta de audio USB
  • Un adaptador WiFi USB ODROID
  • An ODROID USB WiFi Adapter x1

Introducción y Objetivos del tutorial

Todos nos aburrimos en el trabajo y a veces tenemos la oportunidad de matar el tiempo. ¡Este tutorial te muestra cómo convertir tu consola Monku Retro en un Comando Retro Cubículo! La perfecta consola para jugar discretamente en una pantalla VGA. Los siguientes pasos te mostrarán cómo ajustar los scripts en tu Monku R1, R2 o R3 (ODROID-C1+, -C2, -XU4) para que al usar el botón de control personalizado puedas cambiar al modo VGA y se ajuste automáticamente el archivo de configuración de retroarch para usar la tarjeta de audio USB. El R3, ODROID-XU4, no utiliza script de control personalizado, aunque puedes ejecutar a mano los scripts que cambian la configuración del audio de retroarch. Necesitarás un dispositivo Monku Retro, como el que te hemos ayudado a montar R1, R2 y R3, una tarjeta de audio USB, un adaptador WiFi USB y un gamepad inalámbrico. Usaremos auriculares para audio e inalámbricos siempre que sea posible para mantener un perfil bajo cuando juegue durante el tiempo de inactividad del cubículo. Continua con el resto de pasos para crear tu propio Comando Retro Cubículo En primer lugar, unas cuantas cosas sobre los componentes necesarios. El gamepad inalámbrico GameSir no es realmente necesario. Puedes optar por la versión cableada por aproximadamente la mitad del precio. Hardkernel tiene un precio muy bueno para ese modelo, así que tenlo en cuenta cuando vayas a comprar los componentes. Recomendamos la versión inalámbrica porque es más fácil de ocultar y menos apreciable: no vemos el cable negro largo; son todas las cosas que necesitamos para nuestro Comando Retro Cubículo. También puede evitar el coste de la tarjeta de audio USB. Aunque, ¿quién quiere jugar a juegos sin sonido? El adaptador WiFi también es opcional si no tienes pensado navegar por la red WiFi de la cafetería más cercano, de lo contrario, es un complemento perfecto para nuestra sigilosa consola de juegos retro. Muy bien, vamos a ponernos manos a la obra.

Configurar el audio

Lo primero es lo primero, desactivemos el modo de pantalla completa en retroarch. Inicia retroarch, si es necesario, navega hasta la sección Drivers y desplázate hacia abajo hasta la opción Video, continua hacia abajo hasta la opción Start in Fullscreen Mode y desactívala. Usa este mismo proceso y vuelva a activarla cuando hayamos terminado de configurar retroarch. La siguiente captura de pantalla muestra la configuración que debemos aplicar.

A continuación, dirígete a la sección Drivers del sistema de menús y seleccione la opción Audio. Cambia la opción Audio Driver a alsa. Desplázate hacia abajo y busca la opción Device. Asegúrate de dejar la configuración en su valor original. Usa la navegación izquierda y derecha para hojear los dispositivos de audio que hay disponibles. Nota: Si no puede seleccionar ningún dispositivo, salte de retroarch, reinícialo e intente hojear de nuevo los dispositivos de audio disponibles. Añadiremos los cambios en el archivo de configuración a mano, de modo que esta parte no es la más importante.

Si tienes problemas para que aparezca el hardware de audio en retroarch, salte de retroarch y abre un terminal desde la ubicación del menú Applications -> System Tools -> MATE Terminal. Introduce el siguiente comando, aplay -L, deberías ver algo similar a lo que se muestra a continuación.

Deberías ver una entrada similar a esta, hw:CARD=ODROIDHDMI, DEV=0, y tras conectar el adaptador de audio USB, otra entrada similar a esta, front:CARD=Device,DEV=0. Haz una copia de estas cadenas y guárdalas en un archivo temporal. Ejecuta los siguientes comandos desde el terminal en el directorio de inicio de odroid, es decir, el directorio por defecto.

$ cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.Orig
$ cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.VgaAudio
$ cp .config/retroarch/retroarch.cfg .config/retroarch/retroarch.cfg.HdmiAudio
Estamos haciendo una copia de seguridad del actual archivo de configuración de retroarch y dos copias que podemos usar con scripts para alterar la configuración del audio. Una vez que los comandos terminen de ejecutarse, abre retroarch.cfg.VgaAudio usando tu editor CLI favorito, yo usaré nano.
$ nano .config/retroarch/retroarch.cfg.VgaAudio
Desplázate hacia abajo hasta la línea que tiene la configuración del dispositivo de audio. Cambia el valor de esta configuración por front:CARD=Device,DEV=0. Repite estos pasos con el archivo retroarch.cfg.HdmiAudio, en este archivo introduce hw:CARD=ODROIDHDMI,DEV=0 para el valor del dispositivo de audio.

Una vez realizados estos cambios, escribe algunos scripts que utilizarán los archivos que acabamos de crear. Usa tu editor favorito para crear los siguientes archivos.

#!/bin/bash
#set_hdmi_audio
$ cp /home/odroid/.config/retroarch/reroarch.cfg.HdmiAudio 
/home/odroid/.config/retroarch/reroarch.cfg
#!/bin/bash
#set_vga_audio
$ cp /home/odroid/.config/retroarch/reroarch.cfg.VgaAudio 
/home/odroid/.config/retroarch/reroarch.cfg
Fijemos los permisos adecuados para estos archivos. Ejecuta los siguientes comandos en la terminal.
$ sudo chmod 755 set_vga_audio set_hdmi_audio
$ sudo chmod +x set_vga_audio set_hdmi_audio
Ejecuta el script set_vga_audio que acabas de crear y prepárate para probar tu consola de juegos retro en una pantalla VGA con adaptador de audio USB. Inicia retroarch y comprueba la configuración del dispositivo.

¡Ejecuta un juego con los auriculares puestos y experimenta con disimulo los juegos retro que puedes disfrutar en tu escritorio! Nota: ¡No olvide restaurar la toda configuración de pantalla en todas las copias de los archivos de configuración de retroarch, incluso en las nuevas que haya creado! Simplemente usa Ctrl + W y escribe en pantalla completa para localizar la entrada, fija su valor en "on" si está "off". Haz esto con todas las copias del archivo de configuración.

Una configuración del Comando Cubículo un poco menos sigilosa, pero igualmente funcional.

Configurar el mando

Supongo que el mando inalámbrico GameSir no lo has configurado previamente para tu consola de juegos retro. La siguiente sección te ayudará a configurar un nuevo mando para un dispositivo Monku Retro 1, 2, 3 (ODROID-C1 +, -C2, -XU4). Vamos a configurar Antimicro para que podamos empezar a controlar el entorno de escritorio con el gamepad. Abre una terminal, no indicaré la ruta del menú a partir de ahora. Escribe antimicro en la terminal y espera a que se inicie la aplicación. Conecta tu mando compatible con Linux y asegúrate de que antimicro lo reconozca. Si no funciona, deberías probar con otro mando. Haz clic en el botón Controller Mapping en la esquina inferior izquierda de la IU. Aquí es donde le cuentas a antimicro la funcionalidad básica de tu mando. Si no tiene un botón para una posición específica de la lista, por ejemplo, Linux parece ignorar el botón central azul en los mandos GameSir, usa tu ratón para hacer clic en la siguiente opción viable. Empareja los botones del mando con el indicador de botón verde del gráfico del mando.

Nota: Algunos botones, como los disparadores, se disparan varias veces y tendrá que usar el ratón para hacer una copia de seguridad de la posición del mapeo y corregir la doble entrada. Haga clic en “sabe” cuando haya terminado y regresa a la interfaz de usuario principal de antimicro.

Verás un nuevo mapeo en la IU principal de antimicro que contiene botones para todas las nuevas asignaciones que acaba de crar. Lo que vamos a hacer ahora es activar la compatibilidad con el ratón para que puedas controlar el entorno de escritorio desde el gamepad cuando no se ejecute retroarch. Usaremos el joystick izquierdo para controlar el ratón de forma más pausada y precisa y el joystick derecho para controlarlo con mayor rapidez. Los botones A y B serán los botones izquierdo y derecho del ratón. Haz clic derecho en el área de la barra izquierda y selecciona el ratón normal de la lista de opciones.

Vuelve a hacer clic en los botones del area izquierda y localiza el botón Mouse Settings en la parte inferior de la ventana. La imagen de arriba muestra el botón que estamos buscando. En la ventana de configuración del ratón, configura la Velocidad horizontal y la Velocidad vertical en 10 para el joystick izquierdo tal y como se muestra a continuación.

Haz lo mismo con el joystick derecho, pero en este caso fija la Velocidad horizontal y la Velocidad vertical en 30 como se muestra a continuación.

Ahora, asignaremos los botones del ratón, cierre todos los cuadros de diálogo y regresamos a la IU principal de antimicro. Localiza el botón A en la lista de botones debajo de la lista de miniaturas y dpad. Haz clic en él y luego en la pestaña Mouse. Selecciona el botón izquierdo del ratón. Haz lo mismo para el botón B, pero en este caso elije el botón derecho del ratón para esa asignación. A continuación, se muestra una captura de pantalla que muestra la asignación del botón izquierdo del ratón en la práctica.

Pruébalo mientras la IU principal de antimicro está abierta. Deberías ver que el ratón se mueve por la pantalla cuando las listas de botones en la IU de antimicro se vuelven azules para indicar que están activos. Experimenta cómo se siente, ajusta las velocidades de los controles del ratón como mejor te parezca.

Cuando estés listo para volver a la interfaz de usuario principal de antimicro, haz clic en el botón Save As en la parte superior derecha de la pantalla. Guarda la configuración del mando como game_sir_wired.xml o como quieras nombrar tu mando dentro del directorio de inicio de ODROID tal y como se muestra a continuación. Aquí tienes una copia de mi archivo XML (http://middlemind.net/images/products/monku_r1_build/gs3w.xml) por si está utilizando un mando GameSir, puedes usarlo y así ahorrar algo de tiempo. Si está utilizando un controlador Easy SMX, usa este archivo (http://middlemind.net/images/products/monku_r1_build/easySmx.xml).

Haga clic en Options -> Settings en el menú antimicro y asegúrate de que solo esté marcados Close To Tray y Launch In Tray. Esto nos permite que antimicro se mantenga activo en la bandeja de aplicaciones y no sature nuestra pantalla. ¡Tenemos una configuración más que ajustar y luego terminaremos con antimicro y retroarch!

Estando todavía en la ventana de configuración de antimicro, haz clic en la opción Auto Profile de la izquierda. Esto determina qué perfil se asociará automáticamente cuando se conecte el gamepad. Solo tienes un mapeo. Sería genial si tuvieras diferentes opciones para diferentes hardware, pero hasta dónde puede llegar, solo lo estás configurando para el único mando que tienes. Haz clic en la casilla de verificación Active en la parte superior de la ventana. Luego selecciona la fila Default en la tabla. Haz clic en el botón Edit y busca el archivo XML de asignación del mando que guardaste anteriormente. Haz clic en Ok, luego salte de antimicro. Si aparece en la bandeja del sistema, haz clic en el icono del mando en la bandeja del sistema y salte de la aplicación. ¡Fantástico! ¡Hemos terminado con la configuración antimicro!

 

A continuación, vamos a poner a trabajar retroarch. Inicia retroarch desde el sistema de menús, no mencionaré la ruta del menú desde este aquí en adelante. Primero, hagamos que el gamepad funcione en retroarch. En retroarch, puedes usar las teclas de flecha, intro y retroceso del teclado para navegar por el sistema de menús sin el gamepad. Asegúrate de tener un ratón, teclado y mando del juego conectados a tu ODROID. Lo primero que haremos es hacer que funcione el mando. Usa las flechas en el teclado para desplazarte hasta la sección Settings, luego baja hasta a la sección Input tal y como se muestra a continuación.

Ajusta la configuración en esta pantalla tal y como se ve a continuación. Por lo general, yo configuro el número máximo de mandos en 4 ya que hay 4 puertos USB. Y me gusta la configuración del combo "L1 + R1 + Start + Select" del gamepad. Seamos realistas, si accidentalmente golpeas esta combinación durante el juego, algo no irá bien. Deja la configuración restante y desplázate hacia abajo hasta User 1 Binds. Deberás configurar cada entrada de usuario de esta forma, no es tan lamentable y solo te llevará un minuto. Consejo: asigna los botones A y B por nombre, no por posición. Si estás utilizando un mando GameSir, los colores verde y rojo se asignan al botón positivo/seleccionar, negativo/atrás. Simplemente es lo que me gusta a mí, ¡Aunque tú puedes asignar los botones como mejor te parezca!

Perfecto, esto es todo lo que necesitas hacer para usar tu nuevo mando inalámbrico. El sistema de juego sigiloso está a la vuelta de la esquina.

Configuración del adaptador WiFi USB

Conecta el adaptador WiFi USB a tu dispositivo ODROID configurado como consola de juegos Monku Retro o, de lo contrario, ejecuta Ubuntu y MATE. En la esquina superior derecha de la pantalla del escritorio, después de cerrar retroarch, si fuera necesario, debería ver un icono de red, haga clic en él. Usa las opciones del menú para agregar una nueva red inalámbrica para que pueda navegar por la web cuando no estés jugando.

Bueno, con esto concluimos este tutorial. Espero que hayas disfrutado. ¡Ahora vete a pasar horas sigilosas de juego retro dentro de tu cubículo!

Referencias

http://middlemind.net/tutorials/odroid_go/mr1_build.html http://middlemind.net/tutorials/odroid_go/mr3_build.html https://amzn.to/2m3QWii https://amzn.to/2m8BnWs https://bit.ly/2kWBbcP https://bit.ly/2JxEu4V http://middlemind.net/tutorials/odroid_go/5mf_mr1_cc.html

SMS Text Messaging Status Updates With Your CloudShell2: Remote Monitoring Made Simple

There is a new version of the Cloudshell2 Info and Monitoring Tool, Version 1.0.4-1. Following are a couple of new features:

  • Add GSM Shield support via USB2UART device
  • Add new command line switch to identify a defective hard disc more easily (experimental)

GSM shield support

Figure 01

Figure 02

The picture above shows how I connected the GSM shield to my ODROID-XU4, the picture also shows an Arduino Nano which is only a suggestion as they are very cheap and it's successor (Arduino Nano Every) is only 8€ with a stronger microprocessor, of course, you could use any USB2UART device (see link below) but a lot of you guys own maybe already an Arduino so you could also use it, each Arduino should also have a tristate mode in which you start the Arduino with RST and GND connected to each other. It's like a bridge from USB to pin 0 and 1. If this is not working for you, like it didn't work for me, you have to use a sketch/source like this example (https://bit.ly/2kxFxaf). Skip the text output, use the same baud rate for hardware und software serial and it should work.

Here is a link with further instructions for which device you should use to communicate with the GSM Shield: https://bit.ly/2kXcxZD. By the way, I used this https://bit.ly/2kqkbLI to connect the 5V to my GSM shield, depending on what GSM shield you are using this could be entirely different, external power supply plug, etc.

Before you connect anything you should setup the GSM shield with your PC/Laptop/ODROID with minicom minicom -b 115200 -D /dev/ttyUSB0 or if you want to do that on Windows, you can use my tool (SerialLogger) which I wrote back in 2013. It is shipped with the debian package and you can find it inside the /usr/share/doc/cloudshell2-monitoring/ folder. It is a 64-bit application, if you want a 32-bit or WindowsXP build, please ask.

Figure 03 - Serial Logger

If the communication is working, you must disable the PIN of your SIM card with this command AT+CLCK="SC",0,"1234" (1234 should be exchanged with your PIN) and configure other settings about your network band. You should already be able to send and receive SMS with your shield (Fixed baud rate setup is also recommended instead of auto on your GSM shield).

Now you can setup the GSM shield inside the /etc/cloudshell2-monitoring/cloudshell2-monitoring.conf config file, with your phone number to send SMS, nickname, port name, and baud rate.

Note: I do not check signal strength nor do I check if the GSM shield is connected to a network provider, you have to have a good cell reception and the right frequency band must selected and auto select network must be enabled.

If everything is working and your PIN is disabled and your GSM shield is connected to your ODROID-XU4, you have to restart cloudshell2-monitoring tool sudo systemctl restart cloudshell2-monitoring.service and you can check if the GSM shield was detected with:

odroid@odroidxu4:~/CloudShell2$ sudo systemctl status cloudshell2-monitoring.service
● cloudshell2-monitoring.service - "ODROID Cloudshell2 Monitoring"
   Loaded: loaded (/lib/systemd/system/cloudshell2-monitoring.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-09-12 18:05:17 CEST; 5s ago
 Main PID: 6137 (start-lcd)
   CGroup: /system.slice/cloudshell2-monitoring.service
           ├─6137 /bin/bash /usr/bin/start-lcd
           └─6141 /usr/bin/cloudshell2-monitoring

Sep 12 18:05:17 odroidxu4 systemd[1]: Started "ODROID Cloudshell2 Monitoring".
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: Found GSM Shield
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM disable echo
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM enable live SMS
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM set SMS text mode
Sep 12 18:05:17 odroidxu4 start-lcd[6137]: GSM shield command executed OK
If this is OK, you can now send SMS messages to your CloudShell2 and your CloudShell2 will automatically inform you if something goes wrong (RAID error, over temperature, etc.)

Figure 04 - iPhone SMS messages

Valid commands at the time of publication, include (status, reboot, shutdown) with the nickname of your cloudshell2 as prefix (cs2 as default), like in the picture above.

References https://bit.ly/2mtQdr0

Monku R3: Building The Ultimate ODROID-XU4 / XU4Q Gaming Console - Part 1

Requirements

Tools:

  • A small screwdriver set that contains a few small Phillips head screwdrivers.
  • A clean static free work surface.
  • Monitor or TV with HDMI support to test the device.
  • Mac SD card image writing software. I use balenaEtcher, it is free and works great.
  • Window SD card image writing software. I use Win32 Disk Imager, it is free and works well but can be a bit finicky with very large drives.

ODROID items:

  • ODROID-XU4 / ODROID-XU4Q x1
  • Case x1
  • 64GB Micro SD Card x2
  • HDMI Cable x1
  • Power Supply 5V/4A x1
  • GameSir Wired Controller x1
  • USB WiFi Module x1
  • SD Card Reader x1

The total project cost as described above and not including shipping or tools you do not have is around $94. If you exclude the game controller or already have one you can save around $17. Also you do not need two micro SD cards. I like to have a spare one, in case one goes bad and the dual set listed above has a great price. Also, the card is well rated and from my personal experience I have only had one fail unexpectedly out of 12 purchases so I have been using them regularly during the configuration and development of these devices. If you have an HDMI cable, a micro USB cable, and a 5V/4A 5.5mm barrel AC adapter then you can save even more on the cost of this project. So while the price listed is around $94 you can probably get it done for around $80 if you have some parts already. Not too bad once you see what this thing can do.

Introduction and Tutorial Goals

This tutorial will cover the setup, and construction of the game console from a hardware and software point of view. Now unlike the Monku Retro 1 and 2, we will not be adding any special hardware buttons. The ODROID-XU4 comes with a hard reset button built in, so that is already done for us. As for the custom control button I have not found a good location for it using the current case. However, this device is much more powerful than the ODROID-C1+ or even the ODROID-C2, so for now we will not add one to the R3. We will also cover all the software setup including installing and configuring Ubuntu, retroarch, and antimicro. Let us take a look at some of the features of the device we are working building. And look at that emulator list!

R3 / ODROID-XU4 Features:

  • ODROID Goodness!
  • Hardware Reset Button
  • Support for Atari 2600, Atari 7800, Atari Lynx, ColecoVision, MSX-1, MSX-2, NES, GameBoy, GameBoy Color, Virtual Boy, SNES, GameBoy Advance, WonderSwan Pocket/Color, NEO GEO Pocket/Color, Sega SG-1000, Sega Mark 3, Sega Master System, Sega Genesis, Sega GameGear, NEC Turbo Graphics 16, NEC Super Graphics, PSP, and PS1 emulators configured and ready to go.
  • Retroarch with XBM, custom scripts to monitor the software button, start retroarch, maintain antimicro.
  • Configured for low memory usage and for use with included controller.
  • Full linux desktop environment gamepad control when not in game kiosk mode via antimicro.
  • WiFi network connectivity.

Take a look at the performance specs of this device when compared to some other common devices.

Figure 01 - ODROID-XU4 versus other boards.

The Hardware

First things first - let us go over the tools and parts, lay them out, and get ready to build. We have an electronics screwdriver set. If you have built an ODROID-GO, the same screwdriver set should work fine. Our target device, an ODROID-XU4, is depicted below. This tutorial applies equally to the ODROID-XU4 or the ODROID-XU4Q version of this device. The device runs just about every emulator you can think of and it runs them wonderfully. We have our board, case, SD cards, USB WiFi module and tools all ready to go.

Figure 02 - Monku R3 build 1

Clear your workspace and grab the case, take it out of its plastic bag if need be, place it down in the center of the work space. There are two main clips on the case, all-in-all it is easier to work with than the ODROID-C1+ / ODROID-C2 cases. The first main clip is on the left hand side of the case bottom, near the top. The second main clip is on the top side of the case bottom, near the right. You can see slight rectangles near these areas in the image below.

Figure 03

To clear the first main clip, give the case a slight skew as shown below. Ever so slightly pushing the bottom to the left while pushing the top to the right should do it.

Figure 04

Once it comes undone flip the case around so that the other main clip is in the position depicted below. Apply a similar set of actions until the clip separates. It should come apart easily once you get it right. Notice we are using a similar technique for the second main clip as we used for the first.

Figure 05

Once you have the case separated you will find a surprise inside. A bag of tiny screws. If you have an ODROID-GO and you have a good amount of leftover screws I would recommend using them instead of the screws provided. Now this could have changed but at one time the default case screws were a bit smaller than the ODROID-GO screws and I found the extra screws in the ODROID-GO kit to be easier to work with. Let us layout the tools and parts we need to assemble the case with the ODROID-XU4 board mounted inside. You will not have to worry about SD card access, if you are familiar with the ODROID-C1+ or ODROID-C2 case, the SD card is easily accessible by default.

Figure 06

Carefully open the antistatic bag that the ODROID-XU4 comes in. Make sure you do not have a static charge: discharge yourself against something large and metal. Layout the case and the board, rest the board on top of the antistatic bag, we are going to place the board on the bottom half of the case and place and tighten the 2 internal screws. The ODROID-XU4 case is similar to the ODROID-C1+ / ODROID-C2 case in that there are two internal screws and 2 external screws.

Tip: Make sure the screws are tight but do not over tighten them, snug would be a good description of how much to tighten them.

Figure 07

Figure 08

Flip over the case and place and tighten the two external screws. With the back of the case facing towards you, note the small white switch. Flip the switch closer to the edge of the case for SD card use, flip the switch the other way, closer to the center of the case, for eMMC use. You are all done with the hardware construction. Next up we will be working on the base SD card and OS image.

Figure 09

Figure 10

The Software

For the next step we are going to locate a specific Ubuntu OS image. I have tried a few images and ran all sorts of tests and I have come to the conclusion that Ubuntu 16.04 LTS offers the best mix of performance, features, and support. Head over to the Hardkernel wiki. Locate the ODROID-XU4 entry on the right hand side of the site. Select it, and then select os_images from the list of options. Next select linux and ubuntu_4.9. I know it is an older kernel and no longer supported but I wanted to run with a slightly older kernel that has less features and is a little bit more efficient. You can try a newer one. The software configuration steps should be almost identical as long as you are using MATE.

Figure 11

I use the South Korean mirror most of the time. You can use any one that works best for you. Find the entry ubuntu-16.04.2-mate-odroid-xu4-20170510.img.xz or you can use this direct link https://tinyurl.com/y3oj4lr3.

Figure 12

Next decompress the downloaded OS image. You should end up with a file entry named ubuntu-16.04.2-mate-odroid-xu4-20170510.img that is almost 5GB in size. You will need to flash a microSD card with the OS image now. A link to the SD card I currently use is posted above in the parts listing. For Apple MacOS, I use Balena Etcher. On Microsoft Windows, I use Win32 Disk Imager. Linux users can use some CLI tools like dd.

On MacOS, install Balena Etcher from the link. Select the uncompressed OS image we just downloaded. Insert your micro SD card into your Mac using a converter of some kind, link to one listed above. Make sure to select the proper target drive. You do not want to overwrite important data so make sure to double check the destination drive. Once you are sure everything is set correctly, flash the OS image to the SD card. This will only take a few minutes. The SD card will be unmounted and ready to remove at the end of the process.

Figure 13

Figure 14

On Windows, install Win32 Disk Imager from my link. Select the uncompressed OS image we just downloaded. If you have trouble uncompressing the OS image, try using 7-Zip. It has come in handy for me in the past.

ALERT: Make sure to triple check your destination drive letter. It is very easy in Windows, using this software, to select the wrong drive and ruin your PC. So triple check and make sure you have the correct drive letter selected. Once that is done, click the Write button to write the OS image to the SD card. Wait a few minutes and let it complete. You will want to unmount the SD card before removing it from the computer.

Figure 15

On Linux use the following command to list the drives on the system.

$ sudo fdisk -l
Look for an entry like the following. Make sure you have identified the correct drive by ejecting the SD card and checking that the entry is not longer available.

ALERT: Be careful and take the time to correctly identify the correct Linux device or you could end up overwriting one of your drives.

Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 30253055 30244864 14.4G c W95 FAT32 (LBA)
To restore an image to a drive using the terminal on an Ubuntu linux system, use the following command:
$ sudo dd of=/dev/sda1 if=~/ubuntu-16.04.2-mate-odroid-xu4-20170510.img
Wait a few minutes for the process to finish and an output report to be printed to the terminal. Now you have an SD card ready to use on your ODROID-XU4!

Software Updates, Partition Sizes, and More

First things first--let’s get rid of that pesky login prompt. If your device has USB trouble on boot up just power cycle it. I would say though to use the software control buttons once things are all setup and never use the hardware power button unless you are turning it back on again. For the remainder of the tutorial, you should have a keyboard and mouse hooked up to the device. If you go to the following menu location Applications -> System Tools -> MATE Terminal it will open up a terminal window for you.

Figure 16

We are going to run a series of commands at the terminal. I am going to list them below. Some take a while to run but you may have to sit near the screen in case you are prompted by an installation question. We are setting up auto login, updating Ubuntu, and installing some packages.

Type this command or copy and paste it into the terminal window.

$ sudo nano /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
You will be prompted for the password, use odroid. You will see some text like this in the file.
[Seat:*]
greeter-session=lightdm-gtk-greeter
You are going to add a line at the bottom, autologin-user=odroid, and then save and close the file. Press Ctrl+O then hit enter to save the file. Press Ctrl+X then press enter to exit the editor. You will not be prompted to login on the next reboot.

Next up we will be running updates on the OS packages and installing a few things. This part takes some time, but, for the most part, it runs by itself. Enter and execute each of these commands in the order shown below from the terminal window.

$ sudo apt-get update -y
If you get a boot.ini prompt for this command just hit enter.
$ sudo apt-get upgrade -y
$ sudo apt-get install git -y
$ sudo apt-get install gparted -y
$ sudo apt-get install make -y
$ sudo apt-get install cmake -y
$ sudo apt-get autoremove -y
Now that all of that is done, the system is starting to shape up a bit. The next thing we want to do is turn off any swap space the OS is using. The conventional wisdom is that swap partitions will degrade the SD card which I think are rated for some number of read/write operations before they begin to fail. So far I have been disabling them without a noticeable performance hit. Run the following command at the terminal.
$ swapon -s
If you see output similar to the following, then you have zram enabled. Follow the steps below to turn it off and remove it.
$ swapon -s
Filename Type Size Used Priority
/dev/zram0 partition 219824 2080 5
/dev/zram1 partition 219824 2076 5
/dev/zram2 partition 219824 2076 5
/dev/zram3 partition 219824 2076 5
Ok so we want to disable these swap partitions so our SD card lasts as long as it can. Run the following command. The ODROID-XU4 I believe does not have a swap partition by default.
$ sudo apt-get remove --purge zram-config -y
If you notice a standard swap partition listed, use these steps to remove and disable the swap partition.
$ swapoff -a
This will immediately disable swap on the system. Next remove any swap entries from /etc/fstab by editing the file as root and commenting out any swap partition entries. Reboot the system. If, for some reason, the swap partition is still there open gparted, System -> Administration -> GParted. Locate the partition in the list of active partitions and unmount, then delete the partition.

Next up we are going to run a MATE software update by navigating to System -> Administration -> Software Update in the menu system.

ALERT: If you are asked to perform a partial update, then skip this step. We will run with the packages we have installed. I have noticed that in some cases the packages can get out of control. I would only proceed with an update, if no Partial Update dialog pops up.

If there is not a partial update prompt, click the Update button, wait a little while it slowly turns into a progress bar dialog and perform the updates. At the end of the process, you will be prompted to restart the system.

Figure 17

Notice the absence of a login prompt when the system started up. It’s looking more and more like a retro gaming console by the minute. Ok last thing we are going to do is resize the main partition to use all the available space. If you go to System -> Administration -> GParted in the menu system you should see something like what's depicted below. Notice that there is around 50GB of unused space. If you have less unused space, but still have room on the SD card, you need to resize your root partition.

Figure 18

I will give you a quick rundown of the process.

ALERT: You may not need to do this but you should double check anyway. The best way to work with an ext4 file system is on our ODROID-XU4. Use the second SD card that comes with the recommended purchases listed on the hardware build. Write the base OS image onto the SD like we did above and install gparted, also like we did above. You do not have to run all the updates, just make sure gparted is installed. Use the SD to USB adapter, listed above, to mount the SD card that we want to resize its partitions onto the OS. You should see a little drive icon appear, we will call this SD-USB for SD to USB.

Fire up the bare bones Ubuntu SD card if you haven't already. Start gparted from the menu System -> Administration -> GParted and select the SD-USB card attached--not the root file system running Ubuntu.

Figure 19

Select the root file system on the SD-USB card. Right click on it and go to the resize option if you get an error you may need to unmount this partition and then try to resize it. You can visually resize the partition now by dragging the arrow all the way to the right or by setting the fields contained in the form to have 0 free space following. We are done with this section.

Figure 20

Retroarch and Antimicro Installation

Alright now we are getting somewhere. Let’s get retroarch and antimicro installed, so we can begin the configuration process. To install retroarch we need to open a terminal, Applications -> System Tools -> MATE Terminal.

$ sudo add-apt-repository ppa:libretro/stable && sudo apt-get update -y && sudo apt-get install retroarch* libretro-* -y
Try the command above on the ODROID-XU4, hit enter if prompted, and Y if prompted. If it fails, do not worry. I noticed it fails on the ODROID-C2, but I am not sure about the ODROID-C1+--the *'s in the package lists are the culprit. It will pull down some packages that have dependency issues and that then halts the whole command. If it fails, try running this command instead.
$ sudo apt-get install retroarch retroarch-assets retroarch-dbg libretro-beetle-lynx libretro-genesisplusgx libretro-handy libretro-4do libretro-bsnes-mercury-performance libretro-bsnes-mercury-accuracy libretro-bsnes-performance libretro-beetle-wswan libretro-dinothawr libretro-beetle-ngp libretro-bsnes-balanced libretro-gambatte libretro-fbalpha2012 libretro-fba libretro-beetle-psx libretro-vba-next libretro-gw libretro-mupen64plus libretro-beetle-sgx libretro-2048 libretro-tyrquake libretro-beetle-pcfx libretro-prosystem libretro-bsnes-accuracy libretro-parallel-n64 libretro-picodrive libretro-mame libretro-nestopia libretro-mednafen-psx libretro-core-info libretro-gpsp libretro-mess libretro-beetle-pce-fast libretro-mgba libretro-fbalpha2012-neogeo libretro-fba-neogeo libretro-beetle-vb libretro-tgbdual libretro-fba-cps1 libretro-fba-cps2 libretro-fmsx libretro-stella libretro-yabause libretro-mess2014 libretro-mess2016 libretro-desmume libretro-beetle-bsnes libretro-glupen64 libretro-catsfc libretro-quicknes libretro-bsnes-mercury-balanced libretro-vbam libretro-bluemsx libretro-fceumm libretro-nxengine libretro-snes9x-next libretro-mame2014 libretro-mame2016 libretro-fbalpha2012-cps1 libretro-fbalpha2012-cps2 libretro-fbalpha2012-cps3 libretro-fbalpha libretro-snes9x libretro-prboom libretro-beetle-gba -y
Ok, if one of these packages fails, remove it from the list, and try again. The command above is the exact command I use on my ODROID-C2s. For my ODROID-XU4s, I have been using the initial command listed above. After that is done, do a little updating and cleaning.
$ sudo apt-get update -y
$ sudo apt-get upgrade -y
$ sudo apt-get autoremove -y
Now you should have this menu option available after the commands are done running, Applications -> Games -> Retroarch. Click on it and you should see something similar to what is depicted below.

Figure 21

Do not mess with retroarch now, we will come back to it. Next we have to get antimicro installed so we can control everything with a gamepad when retroarch is not running. Go to this URL, https://github.com/AntiMicro/antimicro/releases and download the latest release as a zip file. You should see it below the Windows EXE entries. Once it is done downloading, open the ODROID home folder. There is a link on the desktop for it. Create a new folder called install_zips as depicted below.

Figure 22

Now go to the downloads folder and copy the antimicro zip file from there and paste it into the install_zips folder. Right click on it and select Extract Here.

Figure 23

Now open up a terminal at, Applications -> System Tools -> MATE Terminal, and run the following commands. If your antimicro folder, after file extraction, has a different name use that name in the change directory command below.

$ cd install_zips/antimicro-2.23/
$ sudo apt-get install libsdl2-dev -y
$ sudo apt-get install qttools5-dev -y
$ sudo apt-get install qttools5-dev-tools -y
$ sudo apt-get install libxtst-dev -y
Once all those packages are installed we can compile antimicro without any errors. Run the following commands.
$ cmake .
$ sudo make
$ sudo make install
You should see something like the following during this process.

Figure 24

Once that is done, test antimicro, by typing run antimicro at the terminal. If everything is ok you should see something like what is depicted below.

Figure 25

Plug in a game controller that is supported by Linux. Hardkernel has the best price I have seen for GameSir controllers. So, if you pick up some ODROID-GOs or other hardware grab one of these GameSir Wired Controllers. Start retroarch, Applications -> Games -> RetroArch and you should see large yellow text flash across the bottom of the screen, look closely. I have had some versions of the controller act a bit weird, but I have had no problems. Close retroarch. Now type into the terminal window the antimicro command. You should see something similar to what is depicted below with a properly detected controller.

Figure 26

Next up we are going to configure antimicro, and retroarch.

Retroarch and Antimicro Configuration

Get antimicro configured first, so that we can start controlling the desktop environment with the gamepad. Open up a terminal, I will not list the menu path for it from this point forward. Type antimicro in the terminal and wait for the app to launch. Connect your linux supported controller and make sure that antimicro recognizes it. If it does not you will need to try another controller.

Click the Controller Mapping button on the bottom left hand corner of the UI. This is where you tell antimicro about the base functionality of your controller. If you do not have a button for a specific position in the list, for instance Linux seems to ignore the blue central button on the GameSir controllers, use your mouse to click down to the next viable option. Match up the buttons on the gamepad with the controller graphic's green button indicator.

ALERT: Some buttons act like triggers and fire multiple times. Use the mouse to back up the position of the mapping and fix the double entry. Click save when you are done and return to the main antimicro UI.

Figure 27

You will see a new mapping on the main antimicro UI that contains buttons for all the new mappings you just made. What we are going to do here is setup mouse support so that you can control the desktop environment from the gamepad when retroarch is not running. We will use the left thumbstick for precise, slower, mouse control and the right thumbstick for faster, coarse mouse control. The A and B buttons will serve as the left and right mouse buttons. Right click on the left thumb-stick area and select mouse normal from the option list.

Figure 28

Click on the left thumb, tick buttons again, and find the Mouse Settings button at the bottom of the window. The image above shows the button. In the mouse settings window, set the Horizontal Speed and Vertical Speed to 10 for the left thumbstick as depicted below.

Figure 29

Do the same thing for the right thumbstick except now set the Horizontal Speed and Vertical Speed to 30 as depicted below.

Figure 30

Now let us map the mouse buttons, close all dialogs and get back to the main antimicro UI. Find the A button in the button list below the thumbstick and dpad listing. Click on it then click on the Mouse tab. Select the left mouse button. Do the same thing for the B button except choose the right mouse button for that mapping. Below is a screen shot depicting the left mouse button mapping in action.

Figure 31

Figure 32

Take it for a spin while the main antimicro UI is open. You should see the mouse move around the screen as the button listings in the antimicro UI turn blue to indicate they are active. Adjust the speeds of the mouse controls according to your personal preferences.

Figure 33

When you are all set, go back to the antimicro main UI and click the Save As button at the top right hand side of the screen. Save the controller configuration as game_sir_wired.xml or whatever you want to name your controller in the odroid home directory as shown below.

Figure 34

Click on Options -> Settings in the antimicro menu and make sure only Close To Tray and Launch In Tray are checked. This will ensure antimicro lives in the app tray and does not clutter up our screen. We have one more setting to adjust and then we will be done with antimicro and on to retroarch!

Figure 35

While still on the antimicro setting window click on the Auto Profile option on the left. This will determine what profile will automatically be associated with the attached gamepad. You only get one mapping. Click the Active checkbox at the top of the window. Then select the Default row in the table. Click the Edit button and browse to the controller mapping XML file you saved just a few steps back. Click Ok then quit out of antimicro, if it appears in the system tray click the controller icon in the system tray and quit the app. We are done with the antimicro configuration!

Figure 36

Figure 37

Figure 38

Next up, fire up retroarch from the menu system, I will not list the menu path for it from this point forward. First Let us get the gamepad working in retroarch. In retroarch, you can use the keyboard arrow keys, enter, and backspace to navigate the menu system without the gamepad. Make sure you have a mouse, keyboard, and game controller connected to your ODROID. First thing we will do is get the controller working. Use the arrows on the keyboard to navigate left to the Settings section, the move down to the Input section as shown below.

Figure 39

Adjust the settings on this screen as you see below. I usually set the max number of controllers to 4 since there are 4 USB ports. I like the "L1 + R1 + Start + Select" Menu Toggle Gamepad Combo setting. Leave the remaining settings and scroll down to the User 1 Binds. You will have to setup each user input.

Tip: Map the A and B buttons by name not position. If you are using a GameSir controller, map the colors green and red to positive/select, negative/back button usage. It is just what I like to do, you can map ‘em anyway you like!

Figure 40

Figure 41

The next step takes a little while but requires very little work on your part. You just have to click on a few things and wait for them to complete. Navigate back to the Main Menu which is the first section retroarch starts on. Make sure you're connected to the internet. Scroll down to the Content Updater and open that section.

Figure 42

I usually run each option in order. Try the Core Updater option first.

Tip: You may have to start retroarch from the terminal: sudo retroarch; when updating core files. If you run retroarch with a -v for verbose output and you see an error message during the Core Update command's execution, then you should close retroarch and relaunch it with the sudo command.

Next go to the Thumbnails Updater, this part can take a while, and select each system you plan to load ROMs. Resist the urge to click a bunch in a row. I have done that and it can crash the app or slows down each individual process as they are all competing for resources. Best to let one blast through then move on.

Tip: There are some one-off games you can get thumbnails for here like DOOM Demo, Cave Story, and Dinothawr. You will be able to load those games from the Content Downloader.

Figure 43

Next you will want to back out of the Thumbnail Updater section with the backspace key. Scroll down to the Content Downloader and download any special content you want from the listing.

Tip: If you see a screen that has no options wait a minute, back out, and go into that section, again. It might not have finished downloading the index of available options. I usually do not install the one-off games, but this is the spot for it. Most of the content I think you can safely ignore, but I will leave that up to you. Run the following list of updates one at a time.

  • Update Core Info Files
  • Update Assets
  • Update Joypad Profiles
  • Update Cheats
  • Update Databases
  • Update Overlays
  • Update GLSL Shaders
  • Update Slang Shaders

Close retroarch. Next up, load some ROMs. I own a copy of Contra for the NES and I have a version of it in ROM form. Open the odroid home folder using the link on the desktop. Right click on the folder and create a new directory, name it ROMS. Open the ROMS folder and create a new folder and name it NES. Obviously you would substitute the NES folder for whatever system you intend to load ROMs. Not every single system is supported and some emulators have caveats for BIOS files that need to be copied, etc. Many of the older systems are well supported and easily added. The ODROID-C1+ can probably handle SNES and Genesis, but I just like to use it for 8-bit games. The ODROID-C2 certainly has enough power for 16-bit systems and I like to use it for 8-bit, 16-bit, and all of the handheld systems.

Figure 44

Once you have all your ROMs installed, we can start telling retroarch about the files. Fire up retroarch and scroll to the right until you see the Scan Directory option.

Figure 45

Navigate to the ROMS folder and you should see a list. Then select one system at a time for scanning. Scanning large ROM sets can take a while. Again resist the urge to start multiple scans, things will go smoother if you let an operation complete before starting a new one. In this case we only have one ROM, Contra, so it will complete the scan instantly.

Figure 46

Back out of the Scan Directory section and you should now see a little NES controller on the section listing. Scroll to it and now you should see Contra, or whatever ROMS you were trying to load. Load up a game by selecting it and then selecting a target emulator. Your game should load.

Figure 47

Figure 48

Figure 49

Retroarch will not recognize every single ROM for every single system. Also you may want to try different emulators on troublesome ROMs. That is more advanced stuff and I will cover that in the next tutorial where I will wrap everything up.

Reference

http://middlemind.com/tutorials/odroid_go/mr3_build.html