Archive

Posts Tagged ‘open source’

FalconGate Open Source Anti-Hackers Smart Gateway Runs on Raspberry Pi, Banana Pi, and other ARM Debian Boards

March 29th, 2017 1 comment

Everyday we can read stories about password database hacking, malware, ransomware, and so on, and companies can try to protect themselves by paying professionals that do a more or less good jobs, but individuals can’t afford professional service, so it is harder to protect oneself. One solution is to educate yourself as much as possible, but everybody has the time and/or skills to do it, so developers have worked on  FalconGate open source smart gateway that’s supposed to protect home devices against hackers, and alerts the user in case of intrusions on your home network, or devices misbehaving.

FalconGate is said to be able to:

  • Block several types of Malware based on open source blacklists
  • Block Malware using the Tor network
  • Detect and report potential Malware DNS requests based on VirusTotal reports
  • Detect and report the presence of Malware executables and other components based on VirusTotal reports
  • Detect and report Domain Generation Algorithm (DGA) Malware patterns
  • Detect and report on Malware spamming activity
  • Detect and report on internal and outbound port scans
  • Report details of all new devices connected to your network
  • Block ads based on open source lists
  • Monitor a custom list of personal or family accounts used in online services for public reports of hacking

The software relies on dependencies such as Bro IDS, Python 2.7, Nginx,Dnsmasq,Exim, and PHP, as well as Have I been pwned API, and as been tested with Debian Jessie Lite on Raspberry Pi 2/3 and Banana Pi M2+ boards, with the Raspberry Pi boards limited to 10/100M Ethernet, potentially a bottlenck if you have a fast Internet connection, but FalconGate should also be supported on other (ARM based) boards running Debian or Ubuntu.

The easiest way to install it to get the SD card image for the tested boards. For other boards, you can try a manual installation:

This will take a while depending on your platform and storage device. Your FalconGate powered board will also become your new DHCP server, so you’ll need to disable DHCP in your router. Reboot both, and login to the web interface to configure the email address(es) to be used as recipients for alerts and optionally your VirusTotal API key. Finally, remember to change the default root password, and re-generate the SSH keys.

Via n0where

Instreamer App Streams Zidoo X8/X9S/X10 HDMI Video Input to YouTube Live / RTMP Servers with FFmpeg

March 25th, 2017 6 comments

Zidoo X8, X9S and the upcoming X10, are TV boxes powered by Realtek RTD1295 processor with an HDMI input. The stock firmware already supports UDP broadcasting, but robbi5 decided he needed more, and designed Instreamer “HDMI IN Streamer” app leveraging work from Danman’s ZidoStream app for Mstar TV boxes and Zidoo’s own VideoAndHdmiIN app.

Instreamer app supports the following:

  • Streaming as MPEG-TS to network (unicast/multicast)
  • Streaming in FLV format to RTMP server (e.g. Youtube)
  • No need for intermediate recording file – thus no length limit
  • Streaming runs in background
  • HDMI out is usable as pass-through

That looks good. Installation is easy.

  1. Download and install the latest Instreamer APK release
  2. Download and extract FFmpeg Android binaries to /mnt/sdcard

You’ll be able to adjust a few video and audio settings after launching the app  (not tested as I don’t have X9S anymore).

Click to Enlarge

You can now start a terminal, and stream HDMI input using MPEG-TS + UDP:

or to RTMP servers such as YouTube:

You’ll find the “Stream name/key” on YouTube Live Dashboard by clicking on Reveal button.

Since the source code is open source, you could also adapt to app to your need, and build it with Android Studio.

GnuBee Personal Cloud 1 Low Cost Linux NAS Supports Up to Six 2.5″ SATA Drives (Crowdfunding)

March 23rd, 2017 41 comments

Networked Access Storage (NAS) with a large number of SATA bays usually cost several hundreds dollars up to thousands of dollars depending on the features set and performance, but there’s a new a project called GnuBee Personal Cloud 1, or GB-PC1, that delivers a MIPS Linux system supporting up to six 2.5″ SATA drives for less than $200.

GB-PC1 NAS specifications:

  • ProcessorMediaTek MT7621A dual core, quad thread processor @ 880 MHz, overclockable to 1.2 GHz
  • System Memory512 MB DDR3
  • Storage – micro SD card slot tested up to 64 GB, 6x 2.5” SATA HDD or SSD
  • Connectivity – Dual Gigabit Ethernet
  • USB – 1x USB 3.0 port, 2x USB 2.0 ports
  • Serial port – 3-pin J1 connector or 3.5 mm audio-type jack
  • Power – 12 VDC @ 3 A via 5.5 mm x 2.1 mm, center-positive barrel jack
  • Dimensions –  21.6 cm (L) x 7 cm (W) x 14 cm (H)
  • Weight – ~210 g (without drives)

The case is comprised of two anodized aluminum side plates assembled with six threaded brackets and screws, and comes with 24 drive screws (four per drive).

The NAS supports Debian, OpenMediaVault, LEDE, as well as the lesser-known (at least to me) LibreCMC distribution. Source code including Linux 4.9 and U-boot, some documentations, as well as the BoM & schematics (PDF) can be found on Github.  Potential applications include network storage and backup, file server,home media server, download server, web server, or remotely accessible private cloud.

A comparison table has also been provided by the developer with GB-PC1, QNAP TS-431 ($294.22 on Amazon US) and Synology DS416slim ($289.99 on Amazon US).

Click to Enlarge

TS-431 might have an implicit price advantage with support for 3.5″ SATA drives, as you may need less 3.5″ drives to achieve the same amount of storage as with 2.5″ drives. One clear advantage of GB-PC1 is that you should have better control over the software than the two competing commercial solution. One clear disadvantage however is the mechanical design, as GB-PC1 has been designed to offer as low a cost as possible.

GB-PC1 launched on Crowdsupply a few days ago with the goal of raising at least $75,000. Rewards start at $168 for a diskless GB-PC1, but you may also want to add $19 to get a 12V/3A power supply, and potential $6 for a 2 GB micro SD card preloaded with Debian. Shipping is free to the US, and $12 to the rest of the world, with delivery planned for August 2017.

Via Orange Pi’s Facebook Group

Google Releases Guetzli Open Source JPEG Encoder Generating 20 to 35% Smaller Files Compared to Libjpeg

March 17th, 2017 13 comments

Google has been working one several front to make data and images smaller, hence faster to load from the Internet, with project such as Zopfli algorithm producing smalled PNG & gzip files, or WebP image compression algorithm that provides better lossless compression compare to PNG, and better lossy compression compared to JPEG, but requires updated support from clients such as web browsers. Google has now released Guetzli algorithm that improve on the latter, as it can create JPEG files that are 20 to 35% smaller compared to libjpeg with similar quality, and still compatible with the JPEG format.

The image above shows a close up on a phone line with the original picture, the JPEG picture compressed with libjpeg with the artifacts around the line, and a smaller JPEG picture compressed with Guetzli with less artifacts.

You can find out more about the algorithm in the paper entitled “Guetzli: Perceptually Guided JPEG Encoder“, or read the abstract below:

Guetzli is a new JPEG encoder that aims to produce visually indistinguishable images at a lower bit-rate than other common JPEG encoders. It optimizes both the JPEG global quantization tables and the DCT coefficient values in each JPEG block using a closed-loop optimizer. Guetzli uses Butteraugli, our perceptual distance metric, as the source of feedback in its optimization process. We reach a 29-45% reduction in data size for a given perceptual distance, according to Butteraugli, in comparison to other compressors we tried. Guetzli’s computation is currently extremely slow, which limits its applicability to compressing static content and serving as a proof- of-concept that we can achieve significant reductions in size by combining advanced psychovisual models with lossy compression techniques.

The compression is quite slower than with libjpeg or libjpeg-turbo, but considering that on the Internet a file is usually compressed once, and decompressed many times by visitors, this does not matter so much. Another limitation is that it does not support progressive JPEG encoding.

You can try Guetzli by yourserlf as the code was released on github. It did the following to build the tool on Ubuntu 16.04:

You’ll the executable in bin/release directory, and you can run it to list all options:

Ideally you should have a raw or losslesly compressed image, but I tried a photo taken from my camera first:

But it reported my JPEG file was invalid, so I tried another file (1920×1080 PNG file):

It’s a single threaded process, and it takes an awful lot of time (about 3 minutes on an AMD FX8350 processor), at least with the current implementation. You may want to run it with “verbose” option to make sure it’s not dead.

I repeated the test with convert using quality 95, as it is the default option in Guetzli:

The file compressed with Guetzli is indeed about 15% smaller, and should have similar quality:

It’s just currently about 1,400 times slower on my machine.

$80 BeagleBone Blue Board Targets Robots & Drones, Robotics Education

March 14th, 2017 3 comments

Last year, we reported that BeagleBoard.org was working with the University of California San Diego on BeagleBone Blue board for robotics educational kits such as EduMiP self-balancing robot, and EduRover four wheel robot. The board has finally launched, so we know the full details, and it can be purchased for about $80 on Mouser, Element14 or Arrow websites.

Click to Enlarge

BeagleBone Blue specifications:

  • SiP (System-in-Package) – Octavo Systems OSD3358 with TI Sitara AM3358 ARM Cortex-A8 processor @ up to 1 GHz,  2×32-bit 200-MHz programmable real-time units (PRUs), PowerVR SGX530 GPU, PMIC, and 512MB DDR3
  • Storage – 4GB eMMC flash, micro SD slot
  • Connectivity – WiFi 802.11 b/g/n, Bluetooth 4.1 LE (TI Wilink 8) with two antennas
  • USB – 1x USB 2.0 client and host port
  • Sensors – 9 axis IMU, barometer
  • Expansion
    • Motor control – 8x 6V servo out, 4x DC motor out, 4x quadrature encoder in
    • Other interfaces – GPIOs, 5x UARTs, 2x SPI, 1x I2C, 4x ADC, CAN bus
  • Misc – Power, reset and 2x user buttons; power, battery level & charger LEDs; 6x user LEDs; boot select switch
  • Power Supply – 9-18V DC input via power barrel; 5V via micro USB port; 2-cell LiPo support with balancing,
  • Dimensions & Weight – TBD

The board ships pre-loaded with Debian, but it also supports the Robot Operating System (ROS) & Ardupilot, as well as graphical programming via Cloud9 IDE on Node.js. You’ll find more details, such as documentation, hardware design files, and examples projects on BeagleBone Blue product page, and github.

The board is formally launched at Embedded World 2017, and Jason Kridner, Open Platforms Technologist/Evangelist at Texas Instruments, and co-founder and board member at BeagleBoard.org Foundation, uploaded a video starting with a demo of various robotics and UAV projects, before giving a presentation & demo of the board at the 2:10 mark using Cloud 9 IDE.


If you attend Embedded World 2017, you should be able to check out of the board and demos at Hall 3A Booth 219a.

Turtle Board is a Raspberry Pi 2 Like FPGA Board for J-Core J2 Open Source SuperH SH2 SoC

March 13th, 2017 8 comments

J-core J2 is an open source processor and SoC design implemented in VHDL, and using  SH2 instruction set found in some Renesas (previously Hitachi) micro-controllers. The code available royalty free under a BSD license, and it’s also patent-free since all SH2 related patents expired expired in October 2014. The developers used to run the code on Xilinx Spartan 6 based Numato Mimas v2 board since it was cheap ($50) and mostly did the job. “Mostly”, because it still lacked Ethernet, capability for SMP and the serial port was slow, so they decided to design their own Turtle Board to address those issues.

Turtle Board preliminary specifications:

  • FPGA – Xilinx Spartan 6 LS25 or LS45 FPGA
  • MCU – 8-bit Atmel MCU for load/update flash at power on.
  • Storage – micro SD slot, 8MB SPI flash
  • System memory – 256 MB RAM
  • Video & Audio Output – HDMI and AV jack
  • Connectivity – Ethernet
  • USB – 4x USB 2.0 ports
  • Expansion – 40-pin Raspberry Pi compatible header
  • Power Supply – 5V via micro USB port
  • Dimensions – Raspberry Pi 2/3 form factor

There are very few details about the board, and J-Core Project’s twitter account has not been very active recently. However, they showcased Turtle Board at ELC 2017 last month, so the project is still very alive.

Click to Enlarge

Based on the slide above, the board will start shipping in May 2017, and I could not find a link to pre-order them. They have a dedicated (currently parked) domain @ turtleplatform.com, so it could eventually be announced there, or via a Kickstarter campaign. Patents for newer SH3 and SH4 cores have recently expired too, and J-Core Roadmap includes plans for  J3 (SH3+MMU+FPU) in 2017 and J4 (SH4 64bit – Used in SEGA Dreamcast) in 2018.  If you want to know more about J-Core implementation, you may want to check out ELC 2016 presentation, and/or subscribe to J-Core mailing list.

Thanks to Leon for the ELC 2017 picture.

How to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

March 12th, 2017 6 comments

Leon ANAVI may be a full-time software engineer, but in his spare time he has started to develop open source hardware project with the help of others and by himself. Last year, I got hold of his RabbitMax Flex HAT for Raspberry Pi, and tested it with the provided LCD display, one temperature sensor, and a Raspberry Pi 2 board. The board also featured IR receiver & transmitter, and I tried to use it with my aircon remote control, but at the time I did not find a way to do it easily, and control my TV with LIRC instead. Leon has now made a simpler, smaller, and cheaper add-on board for Raspberry Pi Zero, and other Raspberry Pi boards with a 40-pin header, with 3x I2C headers, two IR transmitters, and one IR receiver. He sent me a sample of “ANAVI Infrared pHAT”, and after quickly describing the board, I’ll show how to I could control my air conditioner with a Raspberry Pi 2 board and his Infrared pHAT.

ANAVI Infrared pHAT

The top of the has the 3x I2C header for 3.3V sensors, a UART header to access to serial console, two x 5mm IR transmitters (IR LEDs), and one IR receiver (IR photo sensor). It also has an EEPROM to store the HAT ID.

Click to Enlarge

The other side comes with the 40-pin female header to connect to your Raspberry Pi board.

The board was designed with KiCAD, and the hardware design files are released under a “Creative Commons Attribution-Share Alike 3.0 United States” License on github.

ANAVI Infrared pHAT Connection to Raspberry Pi Board

There’s only one step: insert the board on the 40-pin connector of your RPi board. You can only make one mistake, inserting it the wrong way. It has to be connected in away that it covers part of the board.

I’ve connect it with a Raspberry Pi 2 board with a battery kit, but it fits even better on the Raspberry Pi Zero, or newly released Raspberry Pi Zero W.

Setting up Raspberry Pi, and Controlling the Air Conditioner with LIRC

It’s time to start software setup in order to control the Haier air conditioner pictured below.

You’ll need to install Raspbian, and some packages including LIRC, but I’ve already explained how to do that in RabbitMax Flex Getting Started Guide, so I’m not going to repeat those steps here, especially you can find them in ANAVI Infrared pHAT user’s manual too, and I’ll assume you have already setup your board.

The reason why I could record IR commands from my TV remote control, and not my aircon remote control last time around, is because aircon remotes send not only one byte but also status info each time. The trick is to use mode2’s “alternative display mode” to capture pulse/space data as raw config files.

Let’s do that:

Now I faced the IR receiver and pressed the power key on the remote control:

Wow, that’s a whole bunch of numbers, but that’s exactly what we need as those are the duration of the high and low levels of the IR signal. I have repeated the same command, but capturing 4 keys: off, on, up to 29C, and down to 28C.

Then we need to edit our lircd-haier-ac.conf file manually:

Note that you need to delete the first “big number” from each captured command. For example, I had to delete “4989552” from the first capture of the power key. If you want full control, you’ll need to record all keys. You may want to read lircd.conf manual to understand parameters like aep or aeps. I used the default values, but in case it does not work for you, or works unreliably, you may have to adjust them, possibly from data obtained using an oscilloscope. I did not have such problem, and copied the file to /etc/lirc/lircd.conf:

In theory, you can restart lircd from the command line:

but in my case, I always had troubles when running irsend command:

So I had to reboot the board with sudo reboot to enable changes. Later I used the reload command (to take into account the update config) after restart, and I could avoid a reboot:

Once it’s all working, we can list the keys we’ve just defined in lircd.cong:

To turn on the aircon:

Then I was not sure what action would happen when I recorded the up key once setting the temperature. So I first set the temperature to 23C to check whether it would increment the temperature to 24C, or set it to 29C:

And the later happened, which means you need to record all temperatures you want to set, and there’s no such thing as UP and DOWN keys.

You’ll already guessed how to turning off the aircon:

Then I realized that since “29C” and “28C” commands send the temperature, it might also send the power status, and indeed I can turn on the aircon @ 28C directly with with 28C command. So instead of recording keys for your aircon, you are actually recording “scenes” which you could name “night”, “25Cfanlowswingup”, “off”, and so on. I added 25Cfanlowswingup with temperature set to 25C, fan speed set to low, and swing set to up, added it to lircd.conf, and a single command would turn on the aircon and set all those values:

Pretty neat.

While the instructions above will work with any board with IR receiver (for first time setup) and IR transmitter, you may be interested in getting ANAVI Infrared pHAT on Indiegogo for $9 plus shipping ($5 to  $7). There are also other rewards including the pHAT, I2C sensors, and debug tools. The campaign has already surpassed its funding target ($500), and delivery is planned for September 2017.

Macchina M2 is an Open Source Hardware OBD-II Development Platform for Your Car (Crowdfunding)

March 10th, 2017 10 comments

ODB-II Bluetooth adapter and head-up displays to monitor and diagnose your car have been around for a while. I actually got two models to use with a Toyota Avanza and Torque Lite app, but never managed to make it work with my phone. Macchina M2 board is doing much of the same thing and more, as it is open source hardware, and supports more communications protocols including GPS, WiFi, 3G/LTE,  BLE, and Ethernet using XBEE boards.

M2 with Xbee Cellular Board

Macchina M2 specifications:

  • MCU – Atmel SAM3X8E ARM Cortex M3 processor @ 84 MHz (also used on Arduino DUE) with 96 KB SRAM, 512KB flash
  • Storage – micro SD card socket, 32KB EEPROM via I2C
  • USB – 1x micro USB port (USB device or host mode)
  • Wireless XBee Socket – For Bluetooth LE, WiFi, GSM, 3G, LTE,
  • I/Os
    • 6x automotive level I/O pins to control 12V devices (Examples: relays, fans, lights, etc) OR act as analog input (like temp sensor)
    • 2x channels of CAN, 2x channels of LIN/ K-line, J1850 VPW/PWM, single-wire CAN interfaces for maximum car compatibility.
  • Misc – 5x user LEDs, 1x RGB LED
  • Power Supply – 5V@ 3A, [email protected] amps for connecting add ons
  • Dimensions – 56.4mm x 40.6mm x 15.7mm

Once you’ve done the hardware setup – very easy with the ODB-II connector, and a little bit more difficult under the hood -, you can hack your car away, programming it with the Arduino IDE to gather RPM, speed, diagnostics data, etc…. This will also allow you it to tune it, or even control it remotely, for example starting it with a mobile control app. If you don’t want to program the board, ELM327 emulation will allow support for popular apps such as Torque for Android, or Dashcommand for iPhone, Android, and Windows App. The developers also uploaded some video tutorials on YouTube, some guides can be found on M2 Wiki, and one of the member of the team wrote a book called “The Car Hacker’s Handbook“.

Macchina M2 launched on Kickstarter a few weeks ago, and the project has already raised over $90,000, surpassing its $25,000 goal. Rewards start at $45 with M2 interface board only, which requires you to add your own MCU/CPU board, but most people will be interested in the $79 pledge to get a complete Macchina M2 board including the Atmel SAM3X board. Shipping is free to the US, but adds $15 to the rest of the world. Deliver is scheduled for July 2017.

Thanks to Thomas for the tip.