Sunday, March 20, 2016

Trekstore Surftab Wintron 7.0 II: UEFI

See post about hardware: https://technikgebastel.blogspot.de/2016/03/trekstore-surftab-wintron-70-i-hardware.html
See post about UEFI: https://technikgebastel.blogspot.de/2016/03/trekstore-surftab-wintron-70-i-uefi.html
See post about Linux: https://technikgebastel.blogspot.de/2016/04/trekstore-surftab-wintron-70-iii-linux.html

The nice thing about the Trekstore Surftab Wintron 7 is that is has a proper UEFI, because it is delivered with Windows 10.

When attaching a keyboard via microUSB and pressing ESC while booting, we first see a general screen, where we can choose several things to do:
 Boot Manager: Choosing "Boot Manager", we find all startup entries that are registered in the UEFI.
 Device Management:
Boot from File:
Secure Boot Option:  Although not activated when shipped, it seems to be possible to deactivate it. Furthermore all the functionality to load own keys seems to be there.
SCU (System control unit of the Intel SOC): I was completely astonished by the functionality and options included here.



We can even get an old-school boot output!!!



Trekstore Surftab Wintron 7.0 I: Hardware

See post about hardware: https://technikgebastel.blogspot.de/2016/03/trekstore-surftab-wintron-70-i-hardware.html
See post about UEFI: https://technikgebastel.blogspot.de/2016/03/trekstore-surftab-wintron-70-i-uefi.html
See post about Linux: https://technikgebastel.blogspot.de/2016/04/trekstore-surftab-wintron-70-iii-linux.html

Recently a colleague of mine made me aware of a very cheap 7 inch Windows 10 tablet. Even though he intended to use it with Windows 10, when searching for the specs I came across some forum posts of people that tried to run Ubuntu instead of Windows on it.
The Trekstore Surftab Wintron 7 (http://www.trekstor.de/detail-surftabs-de/product/produktsupport/product/surftab-wintron-70-v2.html) costs about 50 Euro.
Motivated by Ron and Frank Riegers talk about the 32C3 (https://www.youtube.com/watch?v=DBv0eykj_m8&feature=youtu.be&t=1h5m35s) I started to tackle the problem of getting Debian to run on this device.

The inside looks like:




Specifications:
Display: 7 inch, 1024x600, IPS
CPU: Intel Atom Z3735G (http://ark.intel.com/de/products/80275/Intel-Atom-Processor-Z3735G-2M-Cache-up-to-1_83-GHz)


RAM: 1 GB DDR3, Kingston N11915-01, D2516EC4BXGGB (http://media.kingston.com/pdfs/emmc/MKF_585_DDR3_3L_US.pdf)

CMOS Flash memory: 64 Mbit 25LQ64GVIG

internal memory: 16 GB, FORESEE NCEMBS99-16GB


cameras: front 0.3 MP, back 2 MP

Audio: ALC5651, internal speaker (mono), 3,5mm external connector


Wireless/Bluetooth: RTL8723BS, 802.11 b/g/n, 2.4 GHz

Touchscreen: 5 fingers, Silead GSL1686


battery: 2500 mAh, 3.7V
microSD: SDHC, SDXC

microUSB: host and client mode

orientation sensor BMA222E (BMA2x2)

cameras: Gcoreinc gc0310, OmniVision 2680


Sunday, March 13, 2016

bike home trainer and Fallout 4

I bought my bike home trainer a few months before the release of Fallout 4, but according to Steam and my list of training exercises I have spend much more time playing Fallout 4 than I have spend on the home trainer.

So this is about to change....

The main idea is to couple the bike home trainer to Fallout 4 in some way. As documented in  my previous post (https://technikgebastel.blogspot.de/2016/02/bike-home-trainer-i.html) I have succeeded in getting measurements from the bike home trainer to my linux laptop.
Now there are two major problems/questions to solve:
0. How to get the measurements from the home trainer?
1. Which aspect of the game should my performance on the bike trainer influence?
2. How do I make the necessary modifications in the game and feed in the data?
3. How to play comfortably while exercising on the bike?

0. home trainer:

In a previous post (https://technikgebastel.blogspot.de/2016/02/bike-home-trainer-i.html) I have shown how to measure the rotations speed of the bike home trainer with a USB-io-card. My fork of the Python tolls for the LabJack U3 can be found at https://github.com/ravenschade/LabJackPython. The script Examples/u3allio_ergometer.py measures the rotation speed and records them to a text file, i.e. python Examples/u3allio_ergometer.py ~/ergometer_log

1. game property:

There were several options for the first problem:
a. total game speed
b. AP recovery rate
c. HP recovery rate
d. movement speed

I chose the movement speed option, because it is most immersive. It can be modified by the effect Fallout4.esm/Magic Effect/AbFortifyActorSpeedMult, which takes a positve or negative percentage of change. Now all that has to be done is to create ingame items with this effect. I choose the ring-slot. In order to put the items somewhere in the game, where they can easily be picked up, I started form the mod Strongman's Rings by OmegaDir (http://www.nexusmods.com/fallout4/mods/5593), that puts a dave with some ring in the control station outside of vault 111. My mod uses this mod as a master file and adds a lot of rings, which have AdFortifyActorSpeedMult-modifiers from -100 to 300 in steps of 10, i.e.  -100% to 300% change of movement speed. The names are ".speed [percentage]".

2. external input to the game:

For the second problem Bethesda was very helpful, because they made the Pipboy-app for smartphones and tablets, so that one can use it as a secondary screen and modify the equpiment status and several other things. Luckily other people have already reverse engineered the protocol (special thanks to matzman666 https://github.com/matzman666/PyPipboy).
My fork can be found at https://github.com/ravenschade/PyPipboy. The relevant script is examples/equip.py.
It takes one command line argument, which is the file name of the log file produced by the ergometer logger, i.e. python3 examples/equip.py ~/ergometer_log.
This script then tries to connect to a Fallout 4 game in the same network, keeps reading the log file and submits movement speed changes in the form of item equip/uneqip commands to the game.

equip/unequip sound problem:

One problem here is that there is a noise if we equip/unequip and armor piece even when done via the app. The solution is to place empty sound files in Steam/steamapps/common/Fallout 4/Data/sound/FX/ITM/ for the files: ITM_Clothing_Down_01.xwm, ITM_Clothing_Down_02.xwm, ITM_Clothing_Up_01.xwm, ITM_Clothing_Up_02.xwm and modify the Fallout 4 ini to include the path.

3. How to play comfortably while exercising on the bike? 

The interface works pretty well. There is a delay of about a second between changes in the rotation speed on the bike and the corresponding change of the movement speed in the game. This is mainly due to the fact, that the bike only generates a pulse on a full rotation of the pedals.
So in principle everything works, one remaining challenge is to modify the bike, mouse and keyboard so that I can play comfortably while exercising.

The current setup is shown in the following pictures:





The book and box under the mouse are there so that the hands rests higher and there is no force on the joint of the hand.

If you are interested in my work, please leave a comment below.