Affichage des articles dont le libellé est computer. Afficher tous les articles
Affichage des articles dont le libellé est computer. Afficher tous les articles

mercredi 1 mai 2013

SNES USB Gamepad with Raspberrypi

Last week-end I setup RetroPie with 2 SNES USB gamepad bought on eBay.

I would like to share my gamepad mapping.

HTH



Add these lines at the bottom of the retroarch.cfg
vi /home/pi/RetroPie/configs/all/retroarch.cf

Exit current game and go back to emulator menu with these two lines
input_enable_hotkey_btn = "9"
input_exit_emulator_btn = "8"
Mapping for 2 SNES gamepad

 input_player1_joypad_index = "0"
input_player1_a_btn = "1"
input_player1_b_btn = "2"
input_player1_x_btn = "0"
input_player1_y_btn = "3"
input_player1_l_btn = "4"
input_player1_r_btn = "5"
input_player1_start_btn = "9"
input_player1_select_btn = "8"
input_player1_left_axis = "-0"
input_player1_up_axis = "-1"
input_player1_right_axis = "+0"
input_player1_down_axis = "+1"

input_player2_joypad_index = "1"
input_player2_a_btn = "1"
input_player2_b_btn = "2"
input_player2_x_btn = "0"
input_player2_y_btn = "3"
input_player2_l_btn = "4"
input_player2_r_btn = "5"
input_player2_start_btn = "9"
input_player2_select_btn = "8"
input_player2_left_axis = "-0"
input_player2_up_axis = "-1"
input_player2_right_axis = "+0"
input_player2_down_axis = "+1"




lundi 2 avril 2012

Installer openwrt sur le TL-WR703N et piratebox



1- Dans un premier temps téléchargez le firmware ici

2- Reliez votre ordinateur par cable RJ45 ou connectez-vous en wifi directement au TP.

4- Ouvrez la page  http://192.168.1.1 avec un navigateur web.

Je vous rappel que le login et le password est admin.

5- Même si tout est écris en chinois pas de panique !
Dans le menu allez à la derniere section et selectionnez la 3e option.
Vous Pourrez uploader le firmware téléchargé dans l'étape 1.

6- Reboot du TP sous openwrt.
Connectez-vous en Telnet à l'adresse 192.168.1.1

7- Définissez un mot de passe pour root avec passwd.

8- Editez le fichier /etc/config/network avec vi
vi /etc/config/network

Inspirez-vous du miens pour faire cohabiter le TP avec votre réseau local

config interface ‘loopback’
option ifname ‘lo’
option proto ‘static’
option ipaddr ’127.0.0.1'
option netmask ’255.0.0.0'
config interface ‘lan’
option ifname ‘eth0'
option type ‘bridge’
option proto ‘static’
option ipaddr ‘adresse ip libre sur le réseau‘
option netmask ’255.255.255.0'
option gateway ‘l'adresse ip de votre routeur‘
list dns ‘ l'adresse ip de votre routeur ‘ // DNS principal
list dns ’8.8.8.8' //DNS secondaire (google)

9- On modifie la configuration du fichier du firewall /etc/config/firewall

config defaults
option syn_flood ’1'
option input ‘ACCEPT’
option output ‘ACCEPT’
option forward ‘ACCEPT’
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name ‘lan’
option network ‘lan’
option input ‘ACCEPT’
option output ‘ACCEPT’
option forward ‘ACCEPT’
config zone
option name ‘wan’
option network ‘wan’
option input ‘ACCEPT’
option output ‘ACCEPT’
option forward ‘ACCEPT’
option masq ’1'
option mtu_fix ’1'

10- On active le wifi du routeur dans le fichier /etc/config/wireless
il faut que la ligne option disabled soit à 0

11- On reboot le TP avec la commande reboot.

12- On accède au TP avec la nouvelle adresse IP.
On test la connexion internet avec un ping: ping google.com -c 3

13- Installez le support USB au kernel d'openwrt


opkg update
opkg install kmod-usb-uhci
insmod usbcore
insmod uhci
opkg install kmod-usb-ohci
insmod usb-ohci

Connectez votre clé usb FAT32 et vérifiez qu'elle est bien reconnue avec la commande dmesg

A ce stade on peut installer Piratebox

14- Lancez l'installation de PirateBox et patientez !


cd /tmp
wget http://piratebox.aod-rpg.de/piratebox_0.3-2_all.ipk
opkg update && opkg install piratebox*

15- Connectez-vous et partagez !

Vous pouvez personnalisez le SSID de votre PirateBox en rééditant le fichier  /etc/config/wireless




lundi 5 mars 2012

Proxy Socks over SSH

It is an useful command that let you secure a web connection thanks to an SSH tunnel.

ssh -D 2000 sam@serveur.fr - p 22

-D specify the local port
-p specify the port from your ssh server

Now you just have to setup your Internet browser.