Bluetooth on the Asus T100TA (Ubuntu 16.04)

Hi,

I managed to install Ubuntu Mate 16.04.1 (kernel 4.4.0-66 at the time of writing) on the T100TA using John Well’s excellent tutorial (here).

I’m adding these instructions for people interested in getting bluetooth working, as the instructions I found (here) are, well, quite simplified, especially for people with limited knowledge of the build system. (That’s me by the way.)

So here is a bit more detailed instructions for building the latest bluez (5.44 at the time of writing), basically a step by step version of step #2 of the previously mentioned tutorial (a.k.a "automake or autoreconf (may need to install dependencies“).

Please note that I’m using Ubuntu Mate myself, but this should apply to all variants.

2.1) Install the required packages

sudo apt-get update && sudo apt-get install git automake libtool libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline-dev

2.2) Create a directory, open a terminal window and clone the latest BlueZ sources:

git clone git://git.kernel.org/pub/scm/bluetooth/bluez.git

2.3) Move to the newly created bluez directory and run these commands in the following order:

libtoolize
aclocal
autoheader
automake --add-missing
autoconf
./configure --enable-experimental
sudo make install -j4

Now you can go back to the original article (this one) and carry on with the instructions starting with step 3.

If you get a permission denied error when trying to run btattach, make sure you are member of the dialout group, or run the command as root. Please note that this command also doesn’t return (keeps your terminal busy) so run this one in a second terminal window for the time being (that’s only for testing anyway)

Sources:

http://www.jfwhome.com/2016/01/04/latest-steps-to-install-ubuntu-on-the-asus-t100ta/    Original Ubuntu on T100TA tutorial

https://launchpad.net/asust100-ubuntu/+milestone/bluetooth-t100ta     Bluetooth howto (very simplified)

http://rrbluetoothx.blogspot.ca/2016/04/rr-bluetooth-compile-bluez-539.html     Solution to most bluez “./configure” errors

Posted in Linux | Leave a comment

Audio and Overscan update

Wow, am I pissed at Samsung right now (again).

I’ve been trying to get the analog audio working on my Series 4 LCD TV to make some tests but couldn’t get it to switch to analog. I went through every menu 10 times (at least 10 times) but still couldn’t find an option to change that.

Turns out, the answer from Samsung from  2013 is basically, update your drivers.

LOL, no. Very much no.

So after a bit of googling around, it seems I wasn’t the only one with that issue; turns out that the (insert swear word) TV will NOT switch from digital audio to analog audio if it senses audio capabilities from the graphics card, WHICH THEY ALL DO. It’s 2017 for …. sakes.

The answer? Get in the “Service Menu” and toggle the DVI Audio flag from AUTO to DVI in the “Option Bytes” section. In my case, to get the service menu, with the TV off, press the remote buttons in the following order: mute 1 8 2 power, the TV will turn on as usual and then display the service menu as an over lay. Note that to be able to toggle the option, you have to be on the specific input, which is HDMI2 in this case.

BEWARE THAT THE SERVICE MENU IS SCROLL DOWN ONLY. LEFT KEY PRESS WILL ENTER THE CURRENT HIGHLIGHTED ITEM.

You’ll scare the crap of yourself if you end up hitting the wrong options. Trust me !

Also, BE ……. CAREFUL! THAT MIGHT BRICK YOUR TV!

Well, that was fun.

Oh and it doesn’t end there! The overscan issue… There was an interesting line in the TV manual…

“When using a PC on HDMI Inputs, the input name should be changed to ‘PC'”, without any information as to why or what it does…

Turns out.. Guess what… Changing the …. input name DISABLES OVERSCAN.

Yeah, screw you Samsung, it’s so DAMN hard to specify that and have a damn menu option to toggle between analog and digital audio…

/rant.

Posted in Uncategorized | Leave a comment

Fixing HDMI overscan issues on Ubuntu 16.04 and Intel Graphics

Hi,

I’ve been having trouble using xrandr with the commands I normally use with AMD and Nvidia cards for overscan.

Those are the ones I normally use:

xrandr --output HDMI-0 --set underscan on
xrandr --output HDMI-0 --set "underscan hborder" 48 --set "underscan vborder" 24

On Intel graphics, I get error messages similar to this, since the commands are not supported.
X Error of failed request: BadName (named color or font does not exist)

I finally found the answer here and got it working with a bit of fiddling.

First, install the intel-gpu-tools package to acquire the intel-panel-fitter tool.

In my case, the answer was this command: sudo intel_panel_fitter -p A -x 1848 -y 1030
Note that you will have to change the x and y values for your specific TV/monitor.

The ‘-p A’ part is a bit mystical for me, I’m assuming the “pipes” are the outputs available. (Sadly even the man page isn’t more helpful on that subject)

The man page is located here if you desire more information on this tool.

Once you have found the values for your display, to have the command run automagically on boot (even on login screen!), add your command (less the ‘sudo’ part)
to /etc/rc.local  (sudo nano /etc/rc.local) BEFORE the ‘exit 0’ statement.

I can’t believe I didn’t find that earlier! Let’s fight the audio now…

EDIT: Using those instructions worked for me to force HDMI output, else it always switches back to analog audio.

http://unix.stackexchange.com/questions/293399/how-to-set-hdmi-sound-output-as-default-on-ubuntu-16-04

 

Posted in Linux, Uncategorized | Leave a comment

Configuring an Android build environment for A20 with Ubuntu Mate 16.04

Hi !

I recently updated my machines to Ubuntu Mate 16.04.1 (x64) so here is the configuration required to successfully build the A20 SDK.

I broke it all down in 11 easy step for my and everyone else’s pleasure.

These instructions assume you have already downloaded and extracted one of the A20 SDK for the Olinuxino-A20 (list below).

SDKs:

Olimex:
Kernel 3.4.0.39, Android 4.2.2 (link) ** Won’t build or boot without modifications **

Original Allwinner SDK2.0, No modifications

axonjakarta (aka dave-at-axon):
Kernel 3.4.0.39, Android 4.2.2, (link) ** Preferred **

Modifications:

DS1307 i2c RTC, Huawei RIL, Fusion F07A-0102 Touchscreen (How to revert – Read the comments)

1) Install the OS

Install the version of the OS you selected, all the updates and reboot as asked before continuing.

2) Install Oracle Java JRE 6

sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer

3) Install required packages (after all updates are installed)

sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven u-boot-tools flex xsltproc libswitch-perl android-tools-adb lib32ncurses5

4) Revert ‘make’ version

Compiling older android versions requires make version 3.82 but the included make version is 4.1 with the new version of the OS. Here are the instruction to revert make version back to version 3.82.

Please note that I am unaware of any consequences at the time of writing but I cannot guarantee that it won’t cause any issues.

a) Download make version 3.82 from http://ftp.gnu.org/gnu/make/

b) Extract the archive and using the terminal, get into the folder

c) Run the following command :   ./configure

d) Run the following command :   ./build

e) Make a backup of the current ‘make’ version:   cd /usr/bin && sudo cp make make-4.1

f) Get back to the newly build make 3.82 folder

g) Copy it to the proper location sudo cp make /usr/bin

h) Confirm that the process was successful by running: make --version

5) Install Repo (optional)
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/Bin/repo && chmod a+x ~/Bin/repo

Note: I install repo in ~/Bin instead of ~/bin like proposed by google for one simple reason; LiveSuit installs itself to ~/Bin anyway.

6) Install Livesuit 3.06 (download)

a) Extract Zip file

b) *** IN TERMINAL *** from the folder you extracted the zip file to, run:

chmod +x LiveSuit.run && LiveSuit.run

7) Add required paths to your .bashrc file

Note: Change those examples to reflect the location on your computer, ie. where you extracted the SDK

PATH=$PATH:$HOME/A20/android4.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin
PATH=$PATH:$HOME/A20/android4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/
PATH=$PATH:~/Bin:~/Bin/LiveSuit

8) Configure ADB user access
Add the following lines to the 51-android_adb.rules file in /etc/udev/rules.d:
(sudo nano /etc/udev/rules.d/51-android_adb.rules)

# Google / Generic
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

9) Configure LiveSuit user access
Add the following lines to the 50-LiveSuit.rules file in /etc/udev/rules.d:
(sudo nano /etc/udev/rules.d/50-LiveSuit.rules)

# LiveSuit user access
KERNEL=="aw_efex[0-9]*", MODE="0666"

10) Reload udev rules to enable LiveSuit and adb user access 

sudo udevadm control --reload-rules

11) Build

Instructions here

 

Posted in A20 | Leave a comment

Configuring a build environment for the Olinuxino-A20-micro

WARNING: Do NOT use these instructions, as they broke some time ago.

Please see my updated instructions for building on Ubuntu Mate 16.04.1 here.

 

I have been playing around quite a bit with my OlinuXino-A20-Micro lately. Quite a nice little thing! Figured since I spend so much time getting my build environment for android working correctly that it could be useful for other people.

In the past I used Ubuntu 12.04.5 LTS as a build OS but recently moved to Ubuntu Mate 14.04.2 LTS. I have provided the instructions for both OSes.

Note: You need the 64 bits version of the OS in either case

I broke it all down in 10 easy step for my and everyone else’s pleasure.

These instructions assume you have already downloaded and extracted one of the A20 SDK for the Olinuxino-A20 (list below).

SDKs:

Olimex:
Kernel 3.4.0.39, Android 4.2.2 (link) ** Won’t build or boot without modifications **

Original Allwinner SDK2.0, No modifications

axonjakarta (aka dave-at-axon):
Kernel 3.4.0.39, Android 4.2.2, (link) ** Preferred **

Modifications:

DS1307 i2c RTC, Huawei RIL, Fusion F07A-0102 Touchscreen (How to revert – Read the comments)

1) Install the OS

Install the version of the OS you selected, all the updates and reboot as asked before continuing.

2) Install Oracle Java JRE 6

sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java6-installer

3) Install required packages (after all updates are installed)

For Ubuntu 12.04.3 LTS (Tested Oct. 2015)

sudo apt-get install libglapi-mesa:i386

sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 gettext \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \
uboot-mkimage

sudo apt-get install lib32ncurses5-dev

Note: Untested, but this should work to install adb on 12.04.3:

sudo add-apt-repository ppa:nilarimogard/webupd8 && sudo apt-get update && sudo apt-get install android-tools-adb

For Ubuntu Mate 14.04.2 LTS (Tested Nov. 2015)

sudo apt-get install libghc-bzlib-dev

sudo apt-get install git ccache lzop libglapi-mesa:i386 libgl1-mesa-dri:i386 flex bison gperf curl zlib1g-dev zlib1g-dev:i386 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev lib32bz2-dev squashfs-tools pngcrush schedtool dkms android-tools-adb u-boot-tools libswitch-perl

sudo apt-get install build-essential g++ g++-multilib gcc-multilib

In both cases do:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

4) Install Repo
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/Bin/repo && chmod a+x ~/Bin/repo

Note: I install repo in ~/Bin instead of ~/bin like proposed by google for one simple reason; LiveSuit installs itself to ~/Bin anyway.

5) Install Livesuit 3.06 (download)

a) Extract Zip file

b) *** IN TERMINAL *** from the folder you extracted the zip file to, run:

chmod +x LiveSuit.run && LiveSuit.run

6) Add required paths to your .bashrc file

Note: Change those examples to reflect the location on your computer, ie. where you extracted the SDK

PATH=$PATH:$HOME/A20/android4.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin
PATH=$PATH:$HOME/A20/android4.2/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/
PATH=$PATH:~/Bin:~/Bin/LiveSuit

7) Configure ADB user access
Add the following lines to the 51-android_adb.rules file in /etc/udev/rules.d:
(sudo nano /etc/udev/rules.d/51-android_adb.rules)

# Google / Generic
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

8) Configure LiveSuit user access
Add the following lines to the 50-LiveSuit.rules file in /etc/udev/rules.d:
(sudo nano /etc/udev/rules.d/50-LiveSuit.rules)

# LiveSuit user access
KERNEL=="aw_efex[0-9]*", MODE="0666"

9) Reload udev rules to enable LiveSuit and adb user access 

sudo udevadm control --reload-rules

10) Build

Instructions here

Posted in A20 | Leave a comment

Building Android for the A20

Here is how to actually build the kernel and android for the OlinuXino-A20-Micro.

These instructions assumed you have already followed the instructions here to properly configure your machine.

1) Build the kernel

Note: These commands will build the default configuration (sun7ismp_android_defconfig) the first time it is run, and use the resulting .config file on the following runs. I suggest running it as-is the first time (ie. without modifying the kernel configuration) to make sure everything is building accordingly and booting.

Note: To configure the kernel run (in the linux-3.4 folder): make ARCH=arm menuconfig

To build the kernel, type the following command in the lichee folder:

./build.sh -p sun7i_android -b olinuxino-a20

2) Build Android

To build Android, type the following commands in the android4.2 folder:

Note: You have to build the kernel before compiling Android.

source build/envsetup.sh
lunch (choose olinuxino_a20)
extract-bsp
make -j4     <- Adjust to the number of cores in your computer

3) Pack the resulting images for LiveSuit

To pack the resulting build to a LiveSuit image, type the following command in the android4.2 folder:

pack

The location of the resulting image will be printed after packing is done. (lichee/tools/pack by default)

4) Upload using LiveSuit

a) Power off the board and unplug the USB cable

b) Start LiveSuit and select your image

c) Hold the recovery button down and connect the USB cable

d) Release the recovery button and follow LiveSuit’s instructions

Posted in A20 | Leave a comment

Arduino libraries for ADS7828 and DAC7678

I figured I should share those for the community.

It is still a bit of a work in progress as for some reason not all the DAC commands work correctly.

Those that don’t work correctly aren’t included in the library for that exact reason.

https://github.com/deskwizard/Arduino

The examples and library code is heavily (to say the least) commented, it should be pretty straight forward.

DW

Posted in Arduino | Leave a comment