Показаны сообщения с ярлыком raspberry pi. Показать все сообщения
Показаны сообщения с ярлыком raspberry pi. Показать все сообщения

суббота, 13 июля 2013 г.

install mysql on raspberry pi and connect from laptop

$ sudo apt-get update
$ sudo apt-get install apache2 php5 mysql-server
$ sudo apt-get install phpmyadmin

to enable remote connection replace 127.0.0.1 in /etc/mysql/my.conf to real ip

the working application is at http://your_rpi_host/phpmyadmin
or download any application and look at db from it

to add user
$ mysql -u root -p mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO  'dbuser'@'%'  IDENTIFIED  BY  'dbpassword';
mysql> FLUSH PRIVILEGES;

mysql> CREATE DATABASE foo;
mysql> GRANT ALL ON foo.* TO 'foouser'@'%' IDENTIFIED BY 'PASSWORD';

вторник, 11 июня 2013 г.

GoogleReader replacement with RaspberryPi + rss2email + cron + GMail


1. Install rss2email
sudo apt-get install rss2email

2. Configure rss2email
#It stores things in ~/.rss2email
r2e new email-example@gmail.com
cat <<EOF >~/.rss2email/config.py
HTML_MAIL = 1
DATE_HEADER = 1
DEFAULT_FROM = "email-example@gmail.com"
FORCE_FROM = 1
SMTP_SERVER=  "smtp.gmail.com"
AUTHREQUIRED=1
SMTP_SEND = 1
SMTP_USER = "email-example@gmail.com"
SMTP_PASS = 123456
SMTP_SSL = 1
TRUST_GUID=1
EOF

3. Import subscriptions
Use Google Takeaway to get a copy of your Reader subscription data.

#import to rss2email
r2e opmlimport subsciptions.xml
#get list of subsciptions
r2e list

4. Fetch data
#fetch rss data but don't send. we are already had read them
r2e run --no-send
#some time later fetch to get new ones
r2e run

5. Automate
#the better way is to use cron to automaticaly fetch each 2 time in hour
sudo crontab -u user1 -e
#add this line and save
*/30 * * * * r2e run

6. Some useful rss2email commands
r2e add http://www.example.com/feed/
r2e opmlexport > subscriptions.xml
r2e list
r2e delete 123

7. In gmail create filters for you feeds.

пятница, 7 декабря 2012 г.

RaspberryPi && SDR


1. prepare
    #prepare os (there was an old raspbian)
    sudo apt-get update
    sudo apt-get upgrade
    sudo rpi-update
    sudo raspi-config
    #overclock to medium
    #don't load DM on start
    #minimize video memory
    #without this step there were gaps in sound for a half a second every second

    #prepare soft
    sudo apt-get install git libusb-dev libusb-1.0 libtool cmake pkg-config
    git clone git://git.osmocom.org/rtl-sdr.git

2. compile rtl-sdr
    cd rtl-sdr/
    mkdir build
    cd build
    cmake ../ -DINSTALL_UDEV_RULES=ON
    make
    sudo make install
    sudo ldconfig
    sudo make install-udev-rules
3. run
    rtl_tcp -a 192.168.1.3
4. listen to music
    #i've used sdr# (http://sdrsharp.com/) from my laptop
    #but it is possible to use rtl_fm and aplay directly from raspi
    rtl_fm -f 103700000 -s 48000 -g 9 -l 10 - | aplay -t raw -r 48000 -c 1 -f S16_LE

понедельник, 2 июля 2012 г.

Getting started with Raspberry Pi...


Hardware:
1. Raspberry Pi Model B (+ delivery from element14.com) - 2000RUR
2. Hama кабель HDMI M-M - 310RUR
3. Transcend SDHC Class 10 32GB - 1275RUR
4. Onext universal charger 1000mA - 300RUR
5. HDMI-DVI-D VC-004G - 270RUR
6. USB 2.0 А - microUSB B - 75RUR
---
Total: 4230RUR

Software:
http://distribution.hexxeh.net/raspbian/raspbian-r3.zip

Doesn't work yet. The red pwr lights on, green ok lights then flashes some times then again lights. But no any output on the monitor (Samsung SyncMaster 930BF).

--
UP:
To make the monitor works change confix.txt to

hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=35
config_hdmi_boost=1
test_mode=1

--
For no-monitor configuration:

Set config.txt to empty

Find r-pi with Advanced Port Scanner v1.3
connect to ssh with putty
to login use root:hexxeh
If there is no DNS resolvings (fixed in later distribution versions):
the default dns records in /etc/resolv.conf  is 8.8.8.4 (google)
I use akado internet provider, 
so i need to add DNS-servers of akado:
ns01.comcor-tv.ru (217.10.32.5)
ns02.comcor-tv.ru (217.10.35.5)
dns01.catv.ext.ru (217.10.44.35)
dns02.catv.ext.ru (217.10.36.5)
dns03.catv.ext.ru (217.10.32.4)
dns04.catv.ext.ru (217.10.39.4)

then install some software for development with apt-get
sudo apt-get install mc