Mostrando entradas con la etiqueta Raspberry. Mostrar todas las entradas
Mostrando entradas con la etiqueta Raspberry. Mostrar todas las entradas

viernes, 19 de junio de 2015

IR Remote - Configure any TV Handler

IR receiver Pinouts
IR diode/receviver - VS1838B (1838 requires a resistance between Vcc and Signal)
1 -Left - Signal/Out
2 -Middle - GND

3 - Right  - VCC+(3V)




Xinda board with a 1838B (top view) (this board includes a resistance and a led)
1-Left – GND-
2-Middle – VCC+ (3V)
3- Right – Signal/Out

VS1838B
38 kHz carrier frequency
Most IR remote controls use the 38 kHz carrier frequency.


Name of basic keys
KEY_PLAY
KEY_STOP
KEY_PAUSE
KEY_ENTER
KEY_LEFT
KEY_RIGHT
KEY_UP
KEY_DOWN
KEY_MENU
KEY_EXIT
KEY_FORWARD
KEY_REWIND
KEY_SUBTITLE
KEY_MUTE
KEY_FASTFORWARD

List more names of KEYS with:
irrecord --list-namespace | grep KEY


From SSH


(if lirc is executing, stop it with
 sudo /etc/init.d/lirc stop)

irrecord -d /dev/lirc0 /home/pi/mi_mando_tv.conf

irrecord -f -d /dev/lirc0 /home/pi/my_nevir_tv.conf
(-f for raw mode; it was required for my tv handler. it writes more hex codes for each key) 
(irrecord will ask to press many buttons, have patience because it is a quite boring process, after it it will ask for KEY names, enter a previous keyname, press enter, press key in IR handler.)

cp my_nevir_tv.conf lircd.conf


From RaspBMC/Openelect GUI(GUI Graphical User Interface)

 If using RaspBMC, from Menu enter in "Raspbmc Settings", "IR Remote"
Then, verify following options.
"Enable GPIO TSOP IR Receiver" must be enabled
"GPIO TSOPremote profile"=Custom
and it will detect a new lircd.conf file and will ask for reboot. Select "Yes"


From RaspBMC/Openelect GUI(GUI Graphical User Interface)

 If using RaspBMC, from Menu enter in "Raspbmc Settings", "IR Remote"

From OSMC(GUI Graphical User Interface)

By default, it is enabled
Verify from:
"Pi Config"; "Hardware support";
Enable LIRC GPIO support=yes
gpio_in_pin=18

From  "Remotes", "Browse" and load a config file



Files
My example file, generated with several TV handlers in raw mode(-f)
lircd_nevir.conf
lircd_ansonic.conf





martes, 4 de noviembre de 2014

Deploying OS on Rasperry - partitions, filesystems,...


From my point of view, the default raspberry OS images or the installation script, lacks of some useful features, such as:

  • Deployment from an image
    • A bigger fat partition (useful for data exchange; it able to insert this SD in a Windows computer and copy files there)
    • Additional partition for  data  (having system and data separated, it is possible to have smaller backups containing only system partition)
  • Deployment from a installation script
    • OSMC (installation script, creates a
    •      a 1st partition of 242MB FAT32-LBA
    •      a 2nd partition using the rest of the SD.


So, we can improve the default deployment with the following solutions:
  1. Deploy the standard image on a bigger SD card (default)
  2. Deploy the standard image on a bigger SD card and resize partitions (gparted)
  3. Manual method 1
  4. Manual method 2
    1. Deploy standard image on a bigger SD card
    2. Resize ext partition (decrease from begining) in order to free space after the fat32 partition
    3. Copy or pack (tar) files from fat32 partition
    4. Delete fat partition
    5. Create a new fat32 (lba) partition with desired size
    6. Paste, untar files on fat32 partition

Some examples of a "better" partition

XBMC

SD 8GB
fat32 1GB(boot+media)
ext4 7GB(system+media)

SD 16GB 
fat32 8GB(boot+media)
ext4 8GB(system+media)

Raspbian

SD 16GB 
fat32 1GB(boot+media)
ext4 7GB(system)
ext4  8GB(data)


Partition backups on images

Backups to image can be done at partition level, using dd command or graphical tool (i.e Disks in Ubuntu)
To restore an image containing a partition, you have to create a partition on destination disk.
If you are using "Disks" and image size and destination partition have not the same size, it will alert you but don't worry it works.



Checking content of images

sudo fdisk /media/midisco/raspberry_cosas/OpenELEC-RPi.arm-4.0.5.img


Resizing OS from an image


Gparted

In theory with gparted it is possible to resize fat and ext partitions but it

sometimes can have problems resizing a  fat32 filesystem, it means that partition have desired size but filesystem and available space still having the original size.
-usually works fine with ext2, ext3 partitions


Manual method for fat32 partition

dd partition1(fat32) on a disk

Copy or pack (tar) files from fat32 partition
Delete partition
Create a new fat32 (lba) partition with desired size
Paste, untar files 

Accessing from Windows to Linux Filesystem

Use a file explorer, i.e Linux reader from diskinternals


jueves, 28 de agosto de 2014

Raspberry Pi - Pimame/Piplay

Piplay 8.0.5beta (note for user with a compact keyboard;less than 102 keys, by default some keys required to play don't work)

Commands/files
Sudo raspi-config (overclocking)
press 'LeftCtrl+Q': quit to terminal   

Map Keys:
/home/pi/pimame/pimame-menu/controller.yaml

Default pasword: pi / raspberry


Menu
    PSX-Usb Joystick1 - OK
    PSX-Usb Joystick2 - OK

Emulation
Neogeo (Final Burn Alpha )
    PSX Joystick
         Plug in port2 psx2usb adapter
         Select: insert coin
         Analog mode: to be able to use Up and down keys
   Audio: OK
   Games:
         Armoredwar         
         Mpang (Mighty Pang)
         Dino (Cadillac dinosaurs)
         Winjammer CD  (failing)
 
Final Burn Alpha (Arcade Cabinet and Neogeo emulator)
PSX Joystick (same than neogeo)
Games:
     Metalslug2
     Magical crystals

SNES
PSX Joystick
         Plug in port2 psx2usb adapter
Games:
     All - OK

Neogeo pocket
  PSX Joystick
  Games
     Metal slug 2

Scummvm
   Games cannot be in zip files
   Unzip to folders
   Manually Add game, from roms folder
  Audio: OK
   Games:
      Loom
  
MasterSystem
  Joystick ¿failing left and right arrows??


ZxSpectrum
Games cannot be in zip files
Unzip to folder




c64
Games cannot be in zip files
Unzip to folder




Turbografx 16

   Failing, nothing is displayed in screen

pcsx-reARMed (PSX)
   Menu is not properly displayed
   Bios missing warning
.iso, .img, .bin/.cue or .mdf/.mds
.ecm file. These will not work in this emuator, but can be 'un-ECMed' by using the utility software unecm

GBA
   Bios missing warning (Gba_bios)

NES
   Failing

Mapping keyboard:
pygame module to work with the keyboard
KeyASCII ASCII      Common Name
K_BACKSPACE   \b      backspace
K_TAB         \t      tab
K_CLEAR               clear
K_RETURN      \r      return
K_PAUSE               pause
K_ESCAPE      ^[      escape
K_SPACE               space
K_RSHIFT              right shift
K_LSHIFT              left shift
K_RCTRL               right ctrl
K_LCTRL               left ctrl
K_RALT                right alt
K_LALT                left alt
K_RMETA               right meta
K_LMETA               left meta
K_LSUPER              left windows key
K_RSUPER              right windows key

lunes, 18 de agosto de 2014

Configuring Raspberry

 

Index:
Common Raspberry configuration
Configuring XBMC
Configuring Openelec
Configuring RaspBMC
Configuring Raspbian
Configuring RiscOS

 

Common Raspberry configuration

http://elinux.org/RPiconfig#
System configuration parameters that would normally be kept and set using the BIOS are now stored in a text file named "config.txt". 

http://elinux.org/R-Pi_ConfigurationFile
http://www.raspians.com/Knowledgebase/raspberry-pi-configuration-file/
Including an example configuration file with comments

i.e
Make display smaller to stop text spilling off the screen
## overscan_left
##     Number of pixels to skip on left
overscan_left=20


http://elinux.org/RPi_cmdline.txt
File is for passing arguments to the Linux kernel and it can be found in /boot/
i.e   ip=192.168.0.10    (Static ip for direct RJ45 cable connect)


Configuring XBMC

-Scrape directories to download art work, information, categories,...
Movie add-ons: filmaffinity,..
Over a folder, set content, select scraper.

-TV a la carta
blog.tvalacarta.info/plugin-xbmc/

Manage  xbmc  from an Android and WIFI:
XBMC Remote 
(default port:8080)

Kore
Seetings, Services, Webserver, Allow control via HTTP
(default port:80)
(activate in Raspberry)

Configuring Openelec

Network, programs, openelec configuration, Connections

Install addons
Programs, Openelec configuration, Addons
XBMC backups
CU lrc lyrics

Create a backup
programs, openelec settings, system, backup
->storage/XBMC

Configuring RaspBMC

As backup feature is not included, addon XBMC backup can be installed  but it is not working  (tested on ver 2014-06) 
Install/config from Addons, Program Addons
Execute from from "Programs"; but it will not show an icon

SSH from a linux terminal, requires to specify that user is "pi"
ssh pi@x.x.x.x

Configuring Raspbian

 



multimedia player GUI for omx player

sudo raspi-config
configure keyboard layout
Raspbian on a old CRT TV


>>>from https://github.com/KenT2/tboplayer
tboplayer
A GUI interface using jbaiter's pyomxplayer wrapper to control omxplayer

Required pexpect:
wget http://pexpect.sourceforge.net/pexpect-2.3.tar.gz
     tar xzf pexpect-2.3.tar.gz
     cd pexpect-2.3
     sudo python ./setup.py install

Installing tboplayer:
From a terminal window open in your home directory type:
     wget https://github.com/KenT2/tboplayer/tarball/master -O - | tar xz

There should now be a directory 'KenT2-tboplayer-xxxx' in your home directory. Rename the directory to tboplayer

Open the tboplayer directory and from a terminal opened in THIS directory:

    python tboplayer.py

TBOPlayer is developed on Raspbian Wheezy with python 2.7
<<<<

Useful software for Raspbian/RapberryOS:

matchbox-keyboard (on screen keyboard)

gnumeric
abiword
sylpheed (email)
gmusicbrowser (music browser)
gstreamer
GNOME partition editor (gparted)
xarchiver
pyneighborhood
mp3

RealVNC  (android, win, linux)


(preinstalled) RealVNC (not compatible with other clients)
tightvnc-server  (launch with vncserver :1) ¿by default port 5901?

From PiStore
Pi-Web-Agent (l/p admin/admin)
sudo /etc/init.d/pi-web-agent start
from local https://127.0.0.1:8004
from remote https://192.168.1.109:8003

Packages from CLI:
nmap
apt-get install nmap --no-install-recommends
pistore

sudo apt-get install pistore


Configuring RiscOS

Its is not CRT friendly. Default image works with a CRT screen however, Risc OS has a screen resolution is too high for a CRT TV and it is impossible to use the OS.


Configuring OSMC

Install from AppStore:

SSH Server
Samba SMB
FTP Server

Addons from: "Programs" ,"Addons"


SSH
default login/password: osmc/osmc




viernes, 4 de octubre de 2013

Raspberry Pi - stuff (pins, model specs,...


Raspberry Hardware

Raspberry Pi 1 Model B revision 1.2
Model B - Rev2 aka Rev2 - 512MB RAM


ARM1176JZF-S a 700 MHz (family ARM11)
implements the ARM11 ARM architecture v6. provides support for extensions to ARMv6 

ARM11 single core model B 512MB
3Conector RCA (PAL and NTSC),
HDMI (rev1.3 y 1.4),
gpio pins for B - rev2
61 Interfaz DSI for panel LCD62 63
HDMI Type A



 from a cat /proc/cpuinfo
ARMv6  rev7(v6L)
hardw: BMC2708

GPIO:26 pins

Spanish Lesson:
Raspberry Pi y GPIO
http://www.diverteka.com/?p=1370




http://techcrunch.com/2012/10/21/getting-started-with-the-raspberry-pi-is-not-as-easy-as-pie/

Raspberry Pi 3 Model B

Quad-Core, 1.2 GHz, 1 GB RAM, USB 2.0, Bluetooth 4.0, Wi-Fi

BCM2837R1FBG
The Cortex-A53 supports the full ARMv8-A architecture.
It not only runs 64-bit applications also seamlessly and efficiently runs legacy ARM 32-bit applications.


 Combined 3.5mm audio jack and composite video
Camera interface (CSI)
Display interface (DSI)
Micro SD card slot (now push-pull rather than push-push)
VideoCore IV 3D graphics core

GPIO: 40 pins

Raspberry Pi 4 Model B

64bit Quad-Core,  Cortex A72, 2 GB RAM, 2HDMI
USB 2.0, USB 3.0, Bluetooth 5.0, Wi-Fi
Power: 3V/5V


Software/Images


Most of raspberry images are based in copy files to SD formated in FAT, and during the 1st boot, original partition is dynamically resized  and new partitions are created.


rpix86 is a PC emulator for the Raspberry Pi
http://rpix86.patrickaalto.com/index.html

 chameleon Pi
 http://chameleon.enging.com/?q=download


Tools:Windows Software
Ms. Windows is not the best environment to work with disks, filesystems etc.. but using the following apps we can do most of the tasks without the need of rebooting a Windows computer.

Win32DiskImager.exe (GPL)
Linux Reader (Diskinternals)
EaseUS Partition Master (EaseUS)

There are better software for Windows\DOS and Linux but at least the previous are gratis



Installation


//Raspbian//
dd
gparted
wifi config


multimedia player GUI for omx player
>>>from https://github.com/KenT2/tboplayer
tboplayer
A GUI interface using jbaiter's pyomxplayer wrapper to control omxplayer

Required pexpect:
wget http://pexpect.sourceforge.net/pexpect-2.3.tar.gz
     tar xzf pexpect-2.3.tar.gz
     cd pexpect-2.3
     sudo python ./setup.py install

Installing tboplayer:
From a terminal window open in your home directory type:
     wget https://github.com/KenT2/tboplayer/tarball/master -O - | tar xz

There should now be a directory 'KenT2-tboplayer-xxxx' in your home directory. Rename the directory to tboplayer

Open the tboplayer directory and from a terminal opened in THIS directory:

    python tboplayer.py

TBOPlayer is developed on Raspbian Wheezy with python 2.7
<<<<

install mp3 player
video
//Raspbmc//

  1. Uncompress downloaded file
  2. Identify SD card device (i.e /dev/mmblkxx) (1)
  3. Format/remove partition from SD card. Disks or Fdisk (2)
  4. Applying image to SD
    •  sudo dd if=/path/sd.img of=/dev/mmcblk0 (3)
    •  /path/ mounter folder where image is placed
  5. Boot Raspberry with SD
    • (Raspbmc will do some actions over SD, Sucha as partition resizing etc)
  6. (optional) From PC, resize/create partitions
    • (i.e with gparted) (4)
    • Create a fat32 partition
    • Copy multimedia to SD

(1) use Disks, dmesg, ...
(2) if there is problem try with a different card reader, usb to SD adaptor,..
(3) Use dd command or restore image from Disks on GUI, wait because it can take sometime and there is not a progress bar
(4) gparted recommended, but other software could done this action

OS
Username: pi. Password: raspberry

login via ssh
raspbmc
 username: root
 password: root
openelec
  username: root
  password: openelec


Some useful links:
technical articles:  http://raspi.tv/