dimanche 24 janvier 2016

Adding gamepads support to MXQ S805 Android TV box

I recently bought an Android TV BOX from a chinese vendor for less than 30 euros. The model is the MXQ one, embedding an Amlogic S805 quad core UC under Android 4.4 (kitkat).
Board model is "m201".

Connected via HDMI to a Samsung flat screen, I can say it does the job. I can browse my LAN with the 10/100M ethernet to watch HD movies , and that is much faster than using any WIFI connection. It also supports external NTFS USB2 hard drive.
Specifications :
  • Chipset: Am logic S805 Quad-Core Cortex-A5 at 1.5GHz
  • GPU: Quad-Core Mali-450 at 600MHz+
  • FLASH: 8GB NAND FLASH / RAM: 1GB DDR3
  • USB host: 4 High speed USB 2.0,support U DISK and USB HDD
  • Card reader: SD/SDHC/MMC cards
  • High Definition video output: SD/HD max.1920×1080 pixel
  • LAN: Ethernet:10/100M, standard RJ-45 / Wireless: Built in WiFi
  • HDMI: HDMI 1.4b with CEC / AV: Support / SPDIF/IEC958: Coaxial
I have installed the Archos Video Player app from the Google market. This small piece of software is perfect for the box, and much faster and simplier than the XBMC app on Android. It allows me to browse my SMB shares with a really cool GUI, designed especially for TV.

I own 2 PC Logitech cordless rumble pad,

so I wanted to use them with MAME, to play retro-games. But no luck. The Linux kernel of the beast doesn't include any game pad drivers, so Android apps can't see them. I tested also my Xbox 360 game pad : same result.

After a full kernel recompilation, I have now full gamepad support for both Logitech and Xbox gamepads !!

Hopefully, the box is pre-rooted, so you don't have to hack it to get superuser permissions.
Drivers can be loaded as module with the "insmod" shell command, in a terminal session (use adb or a terminal Android app). You must be in su mode.
for instance:  

insmod ff-memless.ko
insmod xpad.ko
insmod hid-logitech.ko

will load Xbox gamepads support (ff-memless is the force feedback driver) + HID Logitech support.

You have to install some "keylayout" to the /system/usr/keylayout directory if you want to use the gamepad to navigate in Android menu and applications.  The kl file maps gamepad events to keys events that Android will interpret. You can edit the mapping to build you customized controls.
To copy theses files , you must remount the system partition as writeable.

I made a zip pack containing all games pads drivers as ko modules I was able to compile with the kernel,  a set of keylayout. and a script to launch modules. I recommend to unzip on the /sdcard and to not modify system/lib.  Modules can be loaded from the sdcard.

To launch modules at each boot, you can use SManager (Script manager), an app on the market, and making the sh script to be "boot" and "root".  It is the most easy and safe way.

Download here
Enjoy !!



lundi 18 janvier 2016

Mon chappy 13F LB 50 (French)


Comme les vacances sont propices à la réflexion, ,et bien , je me suis acheté un nouveau jouet, fourni par un de mes amis, fana du modèle :  un chappy 13F LB 50, de 1981, entièrement d'origine.


J'ai eu le plaisir de l'essayer un peu avant : c'est assez fun à conduire, idéal pour les vacances au soleil !

L'étape suivante a consisté à chercher toute la documentation possible sur le web concernant ce modèle, en vue de quelques modifications et améliorations.

Comme d'habitude, on trouve beaucoup de petits rigolos pas très malins qui veulent se faire de l'argent en vendant les manuels techniques en PDF sur Ebay ou autre.  C'est super agaçant, mais on finit quand même par trouver ce que l'on cherche.  Alors pour vous éviter à votre tour de chercher pendant des heures, je mets à disposition tous ce que j'ai trouvé ici, en espérant n'enfreindre aucun copyright.

Bonne lecture.
Docs Chappy et autres 50 cm3 Yamaha

EDIT : J'ai vendu l'engin !!

ODB2 on a 1999 BMW Z3 2 liters

Subject : Trying to connect an OBD2 diagnostic tool on my Z3;
Getting some errors when trying to connect to IKE and EWS.


The BMW diagnostic connector, 20 pins,  under the hood.
20 pin car OBD2 proprietary of BMW OBD II  vehicle diagnostic connector connector layout
used in all BMW models in 1988-2000's
   
Pin
Signal
Description
1
Engine rotation speed
TD
2
OBD-II diagnostic
7
Oil service and Inspection reset
11
External starter turn on
14
Battery power
15
ISO 9141-2 L Line
RXD- Diagnostic Data link
16
Ignition +12V
17
ISO 9141-2 K Line
TXD II - ODB2
8
PGSP
Programming line
19
GND
20
ISO 9141-2 K Line
TXD - Diagnostic data link

The specific BMW OBD-II pinout in the car :

16 pin J1962 OBD-2 car proprietary of BMW OBD-II diagnostic interface connector layout
used in all BMW models produced after 2000's
   
Pin
Signal
Description
1
+12V
Ignition(in run or start)
4
CGND
chassis ground
5
SGND
Signal ground



7
ISO 9141-2 K-LINE
engine (ISO-9141 and ISO-14230), automatic transmission diagnostic (in some models)
TXD II
8
ISO 9141-2 K-LINE
IKE/KOMBI, ABS, ABS/ASR, ABS/ABD, ESP, DSC, Airbag and other electronic equipment
(AFTER 2001 )
TXD
9
TD/RPM
Engine rotation speed
16
+12v
Battery power
   



For BMW cars before 2001 having the OBD2 DLC in vehicle, as  shown on the above figure, it is not possible to acces the IKE, EWS, ABD, and maybe others modules because the “TXD” is not connected to the OBD2 plug.
Note that you need to close the cap of the 20 pins diag connector to establish the connection between TXD II and the OBD plug (the #17 and # 2 are connected when the cap is closed).   


If you are using some tools like BMW scanner, you will only be able to read the DME module, most of the time.
To enable the reading of all module FROM THE OBD2 in the vehicule, you have, with a thin wire, to brigde the 17 TXDII and 20 TXD and 2 on the 20 pins diag connector, or only bridge 17+20 and close the cap if the wire is thin enough.    Then, IKE, EWS and other modules become accessibles.




Volca Sample MIDI OUT mod - Step by step.


STEP 1 : Removing the back cover

. remove the battery cover
. remove batteries
. Unscrew the 7 screws as shown below

Volca1.png

STEP 2 : Adding the mini-jack female connector

Volca2.png

The picture above is showing how the mini jack female connector is attached to the Volca sample box.  BEFORE SOLDERING ANYTHING, you have to drill carefully a small hole, and make a flat surface inside the box with a “Dreymel like” tool.  GO Slowly.

Try to put the connector in place, with its locking ring, tighted by hand, then try to put the Volca box carefully.

I recommend to protect the PCB under the connector with insulating tape, to avoid tearing or rubbing the surface soldered components.

Volca4.png

I don’t give any measure here as the connector you will get may be different than mine.
So, make your own measure with precision.

Volca3.png

Once everything is ok, you can remove the connector, and solder the 3 wires on the connector.  I recommend to bend the connector pins against the connector box to facilitate the passage in the housing.  Put the connector in place, and tight ( not to much !!) the locking ring externally with a small pliers. 


STEP 3 : Soldering wires on the Volca PCB

Volca5.png
 
. Locate the MIDI OUT print on the PCB : you will find 3 pads names GND, TX, VD
. Solder the 3 wires from the mini-jack connector on the PCB as shows the picture above
         
DO NOT OVERHEAT THE PCB AS DAMAGE MAY OCCUR : BE FAST.

. Check connections with an  ohm-meter.  Ideally, use a male mini-jack inserted into the female connector to test point to point, from the PCB to the external mini-jack.

. Put the PCB in the case, carefully inserting the mini-jack connector between the two PCB, and screw the back cover.  Then take the time to print a nice “Midi Out” sticker to finish the job properly 

STEP 3 : Build a mini-jack to MIDI DIN 5 cable adaptor


You have to connect  : 
- TX (red) to the MIDI DIN PIN 5
- VD (white) to the MIDI DIN PIN 4
- GND (green) to the MIDI DIN PIN 2

Warning : do not use DIN 5 to mini-jack adapter sold on the web as they are not compatible with MIDI. 


About MIDI OUT on the Volca Sample

 
  1. The MIDI clock is sent to any device connected to the MIDI OUT despite the chart above

  2. Know that the Volca Sample uses permanently 10 MIDI channels : one per part, as it is a sampler, and not a drums box.  You can play the part 1 on the channel 1, the part 2 on the channel 2, and so on..on the full range of an external keyboard connected to the midi in, BUT NOT CHROMATICALLY. On the other hand, the Volca sample will trig notes from parts to the MIDI OUT.  So, you have to set the global midi channel of other instruments connected upper # 10, to avoid “note on” effect.  For example, if I set my Microbrute to global channel 1 and want to use the internal step sequencer, the Volca “resets” the sequence by sending a “note on” from the part 1 to the synth (nb : i set the sequence reset from the Microbrute configuration software because I feel better like that !!).  Then I set the global channel to 11, and everything is working fine.   
    Check also my "Vokaoss" project allowing to use the Volca Sample as a drum machine at the channel 10, as a General MIDI drums device.
  3. The “motion capture” is not sent externally (e;g. when you turn the PAN knob when recording motion on a part) , but you can send CC from an external device.

    END

Do you need a cheap USB midi /din converter ?

KonverterMidiUSB Host USB to Serial Midi bidrectionnal converter This project based on Arduino Uno allows you to get a very economical USB M...