Posts Tagged ‘debian’

How to Use CHIP Board as a Linux Printer & Scanner Server

February 19th, 2017 13 comments

We have a Canon Pixma MP250 series multi-function USB printer connected to a Windows 10 laptop at home, and for several years, I had no problems printing from my Ubuntu computer to that printer. However, this setup recently stopped to work, and whatever I would do, printing would never start from my Ubuntu PC, even though the file was (allegedly) successfully transfered to the Windows 10 laptop connected to the printer. So I decided to setup my own printer server, as well as a scanner server since it’s a multi-function printer, using one of the boards from my collection. As I opened my cabinet, I wondered whether I would use an Orange Pi board, Raspberry Pi board, or Nano Pi board, but I needed WiFi since there’s no Ethernet in the office where the printer is located, and I found that Next Thing CHIP board was the ideal candidate as it comes with a USB port, built-in WiFi, and storage, and I paid just under $15 in total to have it shipped to South East Asia. So I’ll report my experience setting up CUPS printer server and SANE (Scanner Access Now Easy) on the board. Those are generic instructions working on Debian / Ubuntu, so they will other work for Raspberry Pi, Orange Pi, Nano Pi board, etc… via WiFi or Ethernet.

Click to Enlarge

While I reviewed PocketCHIP last year, I had yet to actually use a standalone CHIP board. I did not want to connect it to a display, so I used some of the “Headless CHIP” instructions to set it up. I used a micro USB to USB cable to connect it to my computer, and use minicom to connect to /dev/ttyACM0 with 115200 8N1 settings, and yould access the command line with chip / chip credentials:

Then I configured WiFi from the command line, by first listing SSIDs:

and connect to my the closest access point from the list above:

The next step is to check whether CHIP has successfully connected to the wireless router with the command:

That’s all good. The micro USB to USB cable works, but it was unstable in my case, with the two LEDs something going dark due to power issues, which means CHIP consumes more power than NanoPi NEO + armbian, as I’ve been running it from a USB port for several weeks… CHIP ships with Debian with XFCE4, so it might be a good idea to remove the corresponding packages:

Alternatively, you could flash Debian without GUI based on the instructions here.

So since WiFi had been setup, I connect the board to a 5V/2A power supply, and logged it to the board with SSH, and everything became much more stable. I received the board in the middle of the last, so I updated the system first:

Now that the initials setup was done, I could start the printer server setup, with the steps below greatly inspired from instructions on Next Things forums.

By default CHIP board hostname is  “chip”, so I changed it to something more specific by editing /etc/hostname and /etc/hosts, and replacing chip with CNX-PRINTER. You’ll need to restart avahi-daemon for the changes to take effect:

At this point, we can access the board with CNX-PRINTER.local instead of using the IP address or chip.local. So I could SSH to the board with:

If you are doing this from a Windows machine, you’ll need mDNS (Bonjour) installed for .local addresses to be recognized, and one way is to simply install iTunes.

The next step is to install CUPS server:

CUPS will start automatically, and the web interface will be accessible from the locahost interface on port 631, but since I have not connected a monitor, this would not be convenient, so we can enable remote management with:

At this point I could access the web interface by going to http://cnx-printer.local:631/ in my preferred web browser.

Click to Enlarge

If you have not already done so, you may want to connect the printer to the board’s USB port, and power it on at this stage. Now we can click on Adding Printers and Classes.

Click to Enlarge

and then click on Add Printer, which will switch to an HTTPS connection with a self-generated certificate, so you may get a warning, but you can safely add the certificate to carry on. You’ll then be asked for a username and password. Don’t login with chip user, but instead root. The default password is also chip, so you may want to change that in the board.

Click to Enlarge

The next page is called “Add Printer”, and my printer was automatically detected. So I selected “Canon MP250 series (Canon MP250 series)”, and clicked on Continue button.

Click to Enlarge

You can add some location information on the next page, and also remember to tick Share This Printer, before clicking on Continue. Note that if you’re going to use Windows clients, you may want to note the Printer Name, in my case Canon_MP250_series, as we’ll need it.

Click to Enlarge

The next page will show a list of models, but in my case everything was already selected, to I just had to click on Add Printer to carry on with the setup.

Click to Enlarge

Finally, you’ll be asked to define some default options, but again I did not change anything there, and clicked on Set Default Options to complete the setup.

Click to Enlarge

The next step was to fo the Printers in Ubuntu to see what I had to do to configure the network printer, and the answer is: Nothing at all. The new networked printer was automatically detected and added to the list of printers.

Click to Enlarge

I went ahead, and clicked on Print Test Page, and it worked beautifully, although it started a little slower than usual.

But the printer server won’t last long if it cannot work with my Wife’s Windows 10 laptop, so I followed some instructions on ArchWiki. First I went to Control Panel -> Hardware and Sound -> Devices and Printers, and clicked on Add a printer.

Click to Enlarge

In the next window, you’ll need to select “Select a shared printer by name“, and type the printer name.

Click to Enlarge

The URL should look like http://<hostname>:631/printers/<printer_name>, where <hostname> is the IP address or hostname, and <printer_name> the printer name shown in CUPS web interface. Once this is done we can click on Next, and you’ll be asked to select Windows drivers for your printer, once it is done you’ll get a confirmation the installation was successful.

Click to Enlarge

The printing server installation went pretty smoothly, and worked with both Linux and Windows clients. But my printer is also a multifunction scanner, so I’d also need to enable scan function too. I adapted instruction @ and SaneDaemonTutorial on using SANE. I did manage to make it work, but only once. I guess there may be a permission or systemd issue, and I’ll update the post once I find a solution. In the menatine, I’ll still report what I’ve done below.

Before we try the scanner over the network, we need to make sure it works locally inside the CHIP board. SANE is probably already installed, but to make sure we can install the following packages.

The following command will try to find scanners, and it could find my Canon MP250 series scanner connected via USB:

Another way to check this out is to use the following scanimage command line:

We can now try to scan one image:

The scanning started shortly after, and we’ve got our scanned file:

So far, so good. SANE is is working…

We can now configure saned (SANE daemon) to be able to access the scanner from the LAN. First we need to create /etc/systemd/system/saned.socket file as root with:

Please note that this differs from the instructions on Ubuntu as there seem to be an error. The line:

does not seem right, and would cause systemdctl to report a “bad message”, and the line at the top are ignored by systemd. I tried to edit the Wiki, but I could not due to a gateway error on the site.

We also need to create a separate file called /etc/systemd/system/saned@.service with:

We als oneed to enable access to computer on the LAN, by editing /etc/sane.d/saned.conf:

The exact IP address subnet will depend on your own local network configuration. We can now enable saned (so that it starts automatically), and start it as follows:

We can check the status with:

So everything appears to be going smoothly. We can now configure clients. Let’s start with a Linux client (my Ubuntu computer) to make sure it work. We can first install xsane, a graphical interface for saned:

And then configure sane to connect to our SANE daemon by editing /etc/sane.d/net.conf, and adding the hostname or IP address of our server, and enabling time out:

Time to start xsane from the command line or dash for some scanning, except it did not work for me with the window below showing up each time after a few seconds.

So I spent a few hours studying about this problem, reading articles online, capturing packets with Wireshark, and trying the same thing on a Windows client with SaneWinDS. I could not find any solution in any articles, but I could see packets exchanged between the server and client, and SanWinDS could connect the CHIP board SANE daemon, but would not find any device/scanner. I could not find anything relevant in /var/log. or dmesg either, so I tried to mess up with the config files, and changed saned@.service to use User=chip instead of User=saned, and success! I could start xsane, and scan a document.

Click to Enlarge

So I rebooted, the board to see what would happen, and sure enough it went back to the “no devices available” window. I tried to change that back to User=saned, and reboot, and then try again with User=chip, but I had no luck in all of my subsequent attempts, and ran out of time for the day… The solution is probably close, and I’ll update the post once/if I found out what the problem is.

ASUS Tinker Board’s Debian & Kodi Linux Images, Schematics and Documentation

January 24th, 2017 31 comments

We discovered ASUS Tinker Board powered by Rockchip RK3288 processor earlier this year via some slides hidden in a dark corner of the Internet… ASUS has been incredibly quiet about it, but as the board has finally started to sell in Europe on sites like CPC Farnell UK, Proshop (Denmark), or Jimm’s (Finland)  for the equivalent of $57.5 without VAT or $69 including VAT, and more technology sites have started to write about it.

Click to Enlarge

So people have been buying the board, and one even uploaded an unboxing video. One interesting part is the the top comment from the uploader in that video:

Currently, a £55 paperweight as I can’t seem to find a link to the OS image anywhere.

And indeed, ASUS appears to have launched a board without any support website, firmware image and documentation. Maybe that’s why they are quiet about it. But after using some of my voodoo search skills, I finally found firmware images for the board, as well as the schematics, and some other documentations on Asus website. [Update: New official link with the same files as of today (27/01/2017)]

There are currently 10 documents & files for download on the site:

  • Operating System Images – TinkerOS DEBIAN & TinkerOS KODI images
  • Hardware Docs – Tinker Board Schematics (PDF only), 2D & 3D Drawings
  • Software Docs – GPIO API for Python & C,
  • Other documents
    • Qualified Vendors List for devices tested with the board include micro SD cards, USB drives, Bluetooth headsets (A2DP), headphone amplifiers, Bluetooth keyboards & mice, HDMI TVs & monitors, AC adapters, Ethernet dongles, flash disks, and WiFi routers
    • Tinker Board FAQ overview
    • CSI & DSI configuration explaining how to use an external display and/or camera.

Note that there may be a reason why ASUS has not officially published the images yet: they might consider them alpha or beta (TBC).

Inforce 6309L Board is Powered by Qualcomm Snapdragon 410E Processor with 10-year Availability

January 22nd, 2017 2 comments

Inforce Computing launched 6309 micro single board computer powered by Snapdragon 410 processor, and compatible with 96Boards Dragon 410c board, a little over a year ago. The company has sent a newsletter promoting the launch of cost-down version with long term support equipped with Snapdragon 410E processor, and named Inforce 6309L.

Comparison table between Inforce 6309L board and DragonBoard 410C provided by the company:

Inforce 6309L
Dragonboard 410C
Qualcomm Snapdragon 410E quad core ARM Cortex A53 processor with Adreno 306 GPU
54mm x 85mm
Micro SD
1080p HD video
720p HEVC playback
Dual cameras 13MP on MIPI-CSI
Micro USB, USB, Micro HDMI, MIPI-CSI, expansion header
Micro USB, USB, HDMI, expansion header
Operating System
Android Lollipop 5.1
Linux (Debian)
Win10 IoT core

Both boards are pretty similar, except Inforce 6901L replaced the HDMI port with a mico HDMI port, and adds a MIPI CSI header. Cost down have been achieved by removing Ethernet, the PoE header, LVDS, and the optional interface for RS-485, as well as offering the SBC with  commercial temperature grade (0 to 70 °C) by default. Some of the specifications not mentioned in the table include the supported voltage range (7-24V DC input), the presence of an RTC, and the signal on the expansion header: 1x I2C, 1x SPI, 1x I2S, 2x UART, and 20x GPIOs.

Inforce 6309L Block Diagram – Click to Enlarge

The board is available now starting at the price of $85 for a minimum order quantity of 100 units. More details can be found on Inforce 6309L product page. Note that while the page indicated the board comes with a “quad-core Snapdragon 410E processor which has a 10-year supply commitment from Qualcomm”, Inforce did not make any explicit commitment for the board.

How to Install Domoticz Home Automation System in NanoPi NEO and Other ARM Linux Boards

January 19th, 2017 7 comments

I’ve recently started experimenting with IoT projects, and the first hurdle is to select the hardware and software for your projects are there are simply so many options. For the hardware your first have to choose the communication protocols for your sensors and actuators, and if you are going to go with WiFi, ESP8266 is the obvious solution, used together with your favorite low cost Linux development board such as Raspberry Pi or Orange Pi to run some IoT server software locally or leveraging the cloud. But the most difficult & confusing part for me was to select the server software / cloud services as there are just so many options. I prefer having a local server than something running only in the cloud, as my Internet goes a few hours a month, so I started with a solution combining ThingSpeak with MQTT gathering data from Sonoff power switches running ESPurna firmware and vThings CO2 monitor. This works OK, but while cloud service is continuously update, its open source version has not been updated since mid 2015. Among the many service and software framework available, one seems to have come more often than other, is supported by vThings air monitoring platforms, and recently been added to ESPurna. I’m talking about Domoticz described as:

a Home Automation system that lets you monitor and configure various device like lights, switches, various sensors/meters like temperature, rain, wind, UV, Electra, gas, water and much more. Notifications/Alerts can be sent to any mobile device.

The system can run on Linux, Mac OS, Windows on x86 platform, but also on 32-bit and 64-bit ARM Linux boards such as Raspberry Pi and Cubieboard with just 256MB memory recommended, and 200MB free hard disk space. It can also generate charts from the data like the ones below.

Click to Enlarge

On top of that, the forums appear to be very active, and the last stable version was released in November 2016, and the last beta release yesterday according the download page.

I’m going to take it slow, so today I’ve just tried to install it on NanoPi NEO since it’s compact and runs Linux. However, it does not appear to be officially supported by Domoticz, so we’ll have to see whether it’s possible to install it on the board.

Domoticz is not a Linux distributions but a framework, so first we need to install a Linux distributions on the board, and the obvious choice for NanoPi NEO is to use the latest Armbian release either Debian Jessie or Ubuntu Xenial.

I downloaded Debian, extracted the image, and flashed it to a micro SD card on a Ubuntu computer:

Replace /dev/sdX with your own SD card device, which you can find with lsblk command.  If you are a Windows user, you can flash the firmware like you’d do for a Raspberry Pi using Win32DiskImager after uncompress Armbian firmware.

Now we can insert the micro SD card into the board, and connect the power to start the board. If you have not connected the serial console to your board, please be patient for the first boot as the system may take around 3 to 4 minutes to boot before you can login to it, as it expands the micro SD card to full capacity, and creates a 128MB emergency SWAP file.

Once it’s done we can login through the serial console or SSH using root / 1234 credentials. The first time, you’ll be asked to go through the first setup, changing the root password, and creating a new user with sudo privileges.

So now that we have Linux running on the board, and after login again as the new user, we can follow the instructions for Raspberry Pi board and other ARM boards to install domoticz with a single command line that works on systems running Debian/Ubuntu:

After a minute or two, as the system update the packages, and download domoticz, the setup wizard should start.

At some points we’ll need a fixed IP address, either by configuring Linux with static IP, or setting a permanent IP linked to the board MAC address in the router. The second option is usually my favorite option. Nevertheless, let’s click on OK to proceed.

You’ll be asked whether you want to enabled HTTP or/and HTTPS access. I selected both for now, but it’s probably a good idea to only select HTTPS for better security.Next is the HTTP port number set to 8080 by default, followed by the HTTPS port number to 443 by default (no screenshot), and finally the installation folder which defaults to ~/domoticz. You should now have reached the Installation Complete! window, and you can click Ok to exit the installation wizard.
Wow.. That was easy, and no errors. But does it work? Let’s access from a web browser.

We have a “Your Connection is not secure” error, but it’s expected as Domoticz simply generated a self-certificate, you can safely add exception to your browser to avoid this issue next time. Your data will still be encrypted, but if you plan to access your Domoticz setup from the Internet, you should probably install an other certificate using Let’s Encrypt certificate authority for example.
Once we have added an exception to the web browser we can indeed access Domoticz web interface, so the installation worked, but it will only show “No favorite devices defined…” Again that’s normal, because we need to configure it for example by clicking on the Hardware link.

Adding Hardware to Domoticz – Click to Enlarge

This will allow you to configure the system with MQTT, local I2C sensors, all sort of gateways, and even Kodi Media Center.  I’m pretty sure all devices working over the network or USB should work, but things like “Local I2C Sensors” which may be connected directly to the board may or may not work. Anyway, that looks promising, but I’ll stop here for today, as I have a lot more to study before going further, including upgrading Sonoff firmware, and configuring vThings CO2 monitor for Domoticz.

ASUS Tinker Board is a Raspberry Pi 3 Alternative based on Rockchip RK3288 Processor

January 5th, 2017 48 comments

Regular readers may remember MQMaker MiQi board, a $35 (and up) development board powered by Rockchip RK3388 quad core ARM Cortex A17 processor, based on Raspberry Pi 3 form factor, but much faster according to benchmarks. Sadly, the board’s crowdfunding campaign was not that successful, possibly because of the “its’ a 2-year old processor” syndrome. But now, Minimachines has found that ASUS has designed a very similar board, dubbed Tinker Board, with an extra WiFi and Bluetooth LE module, audio jack, MIPI DSI connector, and a few other modifications.

Click to Enlarge

Click to Enlarge

Asus Tinker Board specifications (bold highlights and strike-through show differences with MiQi board):

  • SoC – Rockchip 3288 quad core ARM Cortex A17 up to 1.8 GHz with Mali-T764 GPU supporting OpenGL ES 1.1/2.0 /3.0, and OpenCL 1.1
  • System Memory – 2GB LPDDR3, dual channel
  • Storage – 8 or 32 GB eMMC flash + micro SD slot
  • Video output & Display I/F
    • 1x HDMI 2.0 up to [email protected]
    • 1x 15-pin MIPI DSI supporting HD resolution
  • Audio – 1x 3.5mm audio jack; Realtek HD codec with 192KHz/24-bit audio
  • Connectivity – Gigabit Ethernet, 802.11 b/g/n WiFi, Bluetooth 4.0 + EDR
  • USB – 4x USB 2.0 host ports, 1x micro USB port (for power)
  • Expansion Headers
    • 40-pin “somewhat Raspberry Pi compatible” header with up to 28x GPIOs, 2x SPI, 2x I2C, 4x UART, 2x PWM, 1x PCM/I2S, 5V, 3.3V, and GND
    • 2-pin contact point with 1x PWM signal, 1x S/PDIF signal
  • Misc – Button, unpopulated fan header
  • Power Supply – 5V/2A via micro USB port
  • Dimensions – 85.6 x 54 cm

The company targets education, maker, and IoT markets for the board, with applications ranging from mini PC to portable game console and RC products like drones. The board supports Debian with Kodi.

asus-tinker-board-vs-raspberry-pi-3ASUS also provided a quick comparison table with Raspberry Pi 3 model B, that mostly shows the advantages over the Tinker board. The table is mostly fine, and I got some Phoronix benchmarks showing RK3288 can be about three times as fast as BCM2837 processor for FLAC audio encoding. The last row with officially supported OS appears to show both boards on the same footings, but Raspberry Pi 3 model B will have a clear advantage here, although I’m not sure why Asus did not list Android OS support for their board. The table does not include any price information either.

The only information I could find was from the Slideshare presentation above, and there does not appear to be any official website or page on Asus website.

Thanks to Freire for the tip.

Lichee Pi One Allwinner A13 ARM Linux Board is Equipped with LCD Display and Camera Interfaces

December 26th, 2016 21 comments

Allwinner A13 – repackaged as Allwinner R8 – single core Cortex A8 processor is used in $9 C.H.I.P board with 512MB, 4GB storage, WiFi and Bluetooth, and I/Os. Now a Chinese company has created a new Allwinner A13 board called Lichee Pi that appears especially suited to drive LCD displays thanks to its 40-pin LCD RGB connector, but it also comes with WiFi & Bluetooth, a micro SD slot, and some I/Os.

Click to Enlarge

Click to Enlarge

Lichee Pi One board (preliminary/tentative) specifications:

  • SoC – Allwinner A13 ARM Cortex A8 processor @ 1.0 GHz with Mali-400 GPU
  • System Memory – 512MB DDR3 RAM
  • Storage – 2x micro SD slot
  • Display Interface – 40-pin RGB LCD connector, with 8080 interface, VGA and LVDS supported via add-on board
  • Camera – 24-pin CSI interface
  • Audio – 3.5mm audio jack
  • Connectivity – Optional 802.11 b/g/n WiFi and Bluetooth via RTL8723BU module (Multiplexed with USB 2.0 host port)
  • USB – 1x USB 2.0 host port, 1x micro USB OTG port, 1x micro USB port for power only
  • Expansion – Two 20-pin headers with 9x GPIO, 3x I2C, 3x UART, 3x SPI, etc…
  • Misc – RGB LED
  • Power Supply – 5V via micro USB port or 2-pin header, LiPo battery via miniJST connector
  • Dimensions – Est. 75 x 55 mm

The board can run Android or Linux distributions like Debian or Ubuntu, and you’ll find some information such as schematics and some documentation on Github.
You’ll find soon info in English on Linux-Sunxi website, as well as with more info, but in Chinese only. The price of the board was  as low as 39 CNY ($5.6) in Elecfans crowdfunding (most components not soldered), and a complete kit with a 4.3″ display (800×480) a 3MP camera went for 168 CNY (~$24). Shipping costs were not included. It’s not available for sale right now. The company has also registered, but the site is not accessible for now as it’s waiting for an ICP license.

$59 RetroEngine Sigma Retro Game Console is Based on Orange Pi Lite Board (Crowdfunding)

December 9th, 2016 14 comments

2016 has been the year of retrogaming comeback with products like PocketCHIP, Nintendo NES Classic, GPD Win and quite a few other projects. There will soon be a new option with RetroEngine Sigma, an inexpensive Linux based retro-gaming console based on Allwinner H3 processor.

retroengine-sigmaRetroEngine Sigma fanless game console hardware specifications:

  • SoC – Allwinner H3 quad core Cortex A7 @ 1.2 GHz with an ARM Mali-400MP2 GPU up to 600 MHz
  • System Memory – 512 MB DDR3
  • Storage – 16 or 32GB micro SD card
  • Video & Audio Output – HDMI port
  • Connectivity – 802.11 b/g/n WiFi
  • USB – 2x USB 2.0 host ports, 1x micro USB OTG port
  • Misc – Programmable status LED, 2 user configurable buttons P1 & P2
  • Power Supply – 5V/2A via power barrel
  • Dimensions – 110 x 85 x 33.5 mm

The specifications look similar, so I went to my little list of Allwinner H3 boards, found the specs matches closely Orange Pi Lite board, and after checking the video and more picture, the ports also happen to be exactly in the same place… So it’s pretty sure the console is based on Shenzhen Xunlong’s Orange Pi Lite board, which is cool since there’s a good community support.

retrogame-sigma-armbianRetroGame developers leveraged that, and the console supports Atari 2600/7800, Sega Genesis, Nintendo NES / 64, Amstrad, Sega, and many more, and can be used as a mini computer and a media player with Kodi. It seems to have the same features as RetrOrangePi firmware based on Armbian plus Kodi and various game emulator.

The mini console’s Indiegogo crowdfunding campaign has been very successfully so far as they’ve raised closed to $250,000 from over 3,000 backers. All early bird rewards are gone, but you can still pledge $59 for the “Speedy Backer” reward including a mini console with a 16GB micro SD card pre-loaded with the firmware, a power adapter, a dual stick analog controller, a micro USB card reader, and a Xmas voucher. The 32GB micro SD Deluxe version goes for $89, and adds a Bluetooth adapter, a Bluetooth game controller, and a HDMI cable. Shipping adds $7 to the US, and $15 to the rest of the world. Delivery is scheduled for April to June 2017, but you’ll first receive a Christmas Gift voucher.


Qualcomm Starts Sampling of Qualcomm Centriq 2400 ARM Server SoC with Up to 48 ARMv8 Cores

December 8th, 2016 3 comments

Qualcomm has announced commercial sampling of Qualcomm Centriq 2400 series server SoC built with 10nm FinFET process technology and featuring up to 48 Qualcomm Falkor custom ARMv8 CPU cores “highly optimized to both high performance and power efficiency, and designed to tackle the most common datacenter workloads”.


Qualcomm Datacenter Technologies demonstrated the new processor in a Live demo showing Apache, Spark, Java, and Hadoop on Linux running on a SBSA compliant server powered by Qualcomm Centriq 2400 processor, but the company did not provide any further technical details or preliminary benchmark results for the solution.

The Qualcomm Centriq 2400 processor series is now sampling to select customers and is expected to be commercially available in H2 2017. That’s about all we know from the press release. However, Linaro have been working on Qualcomm Technologies QDF2432 based board for several months with support for Debian 8.x ‘Jessie’ and CentOS 7 operating systems, as well as Hadoop and OpenStack. It’s not 100% clear if this is indeed related to Centriq 2400, albeit the name QDF2432 seems to indicate so, and it would probably have started on some FPGA board to simulate Centriq 2400 (32-core?) processor, unless they had engineering samples for nearly a year. There’s also a basically empty page on for “Qualcomm QDF2432 Server Dev Platform”. It’s close to impossible to find much details since those things are developed under NDAs.