This is an old revision of the document!
Project owner: | Overdrive |
Interested: | peterbay, Overdrive |
Related: | |
License: | Uveďte původ-Zachovejte licenci; CC BY-SA |
Howto for different single-boards
- install Rabsbian on SD cards : http://elinux.org/RPi_Easy_SD_Card_Setup
- Banana Linux Home Page: https://www.bananian.org/
- howto connect to Picka and forward X server on Mac : https://www.youtube.com/watch?v=MXi-Tk1Wbpc
PI Specific tools
- rpi-update - update firmware
- rpi-config - system config
MacOSX install of Banana PI
- Banana Pi: http://www.bananapi.org/p/product.html
SemioTex:pavouk$ mount | grep -i picka1 /dev/disk3s1 on /Volumes/PICKA1 (msdos, local, nodev, nosuid, noowners) SemioTex: pavouk$ cd ~/Desktop/ SemioTex:Desktop pavouk$ ls -la *.img -rw-r--r-- 1 pavouk staff 3932160000 5 srp 2015 Raspbian_For_BPI_M1_V4.0.img SemioTex:Desktop pavouk$ sudo diskutil unmount /Volumes/PICKA1 Volume PICKA1 on disk3s1 unmounted SemioTex:Desktop pavouk$ sudo dd bs=1m if=~/Desktop/Raspbian_For_BPI_M1_V4.0.img of=/dev/disk3
- u can check progress with CTRL+T [SIGINFO]
Configure Mac to be able to directly conenct to Picka over ETH through trunderbolt
- connect thunderbolt and Picka by straight cable
- system preferences on mac → Network → Thunderbolt: use DHCP
- system preference on mac → Sharing → check ON Internet sharing
- ifconfig: find bridge*
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=3<RXCSUM,TXCSUM> ether 2a:37:37:c1:c0:64 inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255 inet6 fe80::2837:37ff:fec1:c064%bridge100 prefixlen 64 scopeid 0xa Configuration: id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 ipfilter disabled flags 0x2 member: en5 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 9 priority 0 path cost 0 nd6 options=1<PERFORMNUD> media: autoselect status: active
- use nmap to find where you have Picka [or you can try to find it as next to bridge ip]
SemioTex:Picka pavouk$ nmap 192.168.2.* Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-13 14:47 CET Nmap scan report for 192.168.2.2 Host is up (0.0017s latency). Not shown: 999 closed ports PORT STATE SERVICE 22/tcp open ssh
https://wiki.archlinux.org/index.php/Banana_Pi#Network
- ssh root@IP
- password is bananapi
remove password to ssh
mkdir ~/.ssh chmod 700 ~/.ssh touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys nano ~/.ssh/authorized_keys <--- copy there public key generated somewhere
this is what you should have:
drwx—— 2 root root 4096 Mar 13 13:23 .ssh
-rw——- 1 root root 209 Mar 13 13:21 authorized_keys
nano /etc/ssh/sshd_config -> PasswordAuthentication no sudo service ssh restart
test by:
ssh root@localhost
if it is asking for key, everything is ok !!! do not disconnect from session before test from outside !!! try from outside:
ssh root@IP_of_pi
when able to connect by key, everything is fine
Change colour of shell
nano ~/.bashrc
edit to something like this 31m is red:
PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '
Resize SD card
raspi-config –expand-rootfs
Timezone
tzselect
Install basic tools
aptitude install lsof
Run Banana PI from SATA
SDR
Pulseaudio
sudo apt-get install pulseaudio pulseaudio-module-zeroconf alsa-utils avahi-daemon pulseaudio-module-zeroconf pulseaudio-utils
The following is what I did just to get it working in per-session mode (not system mode). System mode may work as well, I haven't attempted it. Setting up server will require some more work. I found this information in various places, hopefully gathering it here will help someone.
Install pulseaudio and make sure user (e.g. over) is part of the audio group:
sudo adduser over audio
Change /etc/asound.conf look like the following. This sets up pulseaudio to be used as an alsa device by default so applications use it without any additional configuration. The first two declarations (including the commented one) was in the original file.
pcm.mmap0 { type mmap_emul; slave { pcm "hw:0,0"; } } pcm.pulse { type pulse } ctl.pulse { type pulse } pcm.!default { type pulse } ctl.!default { type pulse }
Add the following lines to /etc/pulse/daemon.conf:
default-sample-rate = 48000 resample-method = trivial
OVERDRIVE'S CONFIG TO MAKE IT RUN
sudo nano /etc/pulse/default.pa
.nofail .fail load-module module-device-restore load-module module-stream-restore load-module module-card-restore load-module module-augment-properties load-module module-switch-on-port-available load-module module-pipe-sink .ifexists module-udev-detect.so load-module module-udev-detect .else load-module module-detect .endif .ifexists module-jackdbus-detect.so .nofail load-module module-jackdbus-detect channels=2 .fail .endif .ifexists module-bluetooth-policy.so load-module module-bluetooth-policy .endif .ifexists module-bluetooth-discover.so load-module module-bluetooth-discover .endif .ifexists module-esound-protocol-unix.so load-module module-esound-protocol-unix .endif load-module module-native-protocol-unix .ifexists module-gconf.so .nofail load-module module-gconf .fail .endif load-module module-default-device-restore load-module module-rescue-streams load-module module-always-sink load-module module-intended-roles load-module module-suspend-on-idle .ifexists module-console-kit.so load-module module-console-kit .endif .ifexists module-systemd-login.so load-module module-systemd-login .endif load-module module-position-event-sounds load-module module-role-cork load-module module-filter-heuristics load-module module-filter-apply .ifexists module-x11-publish.so .nofail load-module module-x11-publish .fail .endif set-default-sink output set-default-source input
To start the pulseaudio server, use:
pulseaudio -k; pulseaudio -D
You might be also be able to set up in system-wide mode with:
sudo pulseaudio --system
To debug, run:
pulseaudio --log-level=debug
To test alsa, run:
amixer -Dpulse
GnuRadio on BannanaPI
edit like this
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
patch whole system
apt-get update apt-get upgrade
apt gnuRadio
apt-get install gnuradio
DSD : Digital Speech Decoder
not tested:
sudo apt-get install cmake cd ~ mkdir dsd-src cd dsd-src wget -O mbelib.zip https://github.com/szechyjs/mbelib/archive/master.zip wget -O dsd.zip https://github.com/szechyjs/dsd/archive/master.zip unzip mbelib.zip unzip dsd.zip rm *.zip cd mbelib-master mkdir build cd build cmake .. make sudo make install sudo ldconfig /usr/local/lib cd ~/dsd-src/dsd-master mkdir build cd build cmake .. make sudo make install add snd-pcm-oss to /etc/modules amixer cset numid=3 1 <reboot>
testme:
dsd -i /dev/dsp -n -v 1
showme what you can do:
over@picka ~/digital_speech/dsd/build $ dsd -a Digital Speech Decoder 1.7.0-dev (build:v1.6.0-86-g7ee04e5) mbelib version 1.3.0 xcb_connection_has_error() returned true ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline xcb_connection_has_error() returned true xcb_connection_has_error() returned true xcb_connection_has_error() returned true xcb_connection_has_error() returned true Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Feb 21 2014 06:46:01)' Number of devices = 7 --------------------------------------- device #0 Name = sunxi-CODEC: PCM (hw:0,0) Host API = ALSA Max inputs = 2, Max outputs = 2 Default sample rate = 44100.00 --------------------------------------- device #1 Name = sysdefault Host API = ALSA Max inputs = 128, Max outputs = 128 Default sample rate = 44100.00 --------------------------------------- device #2 Name = pulse Host API = ALSA Max inputs = 32, Max outputs = 32 Default sample rate = 44100.00 --------------------------------------- device #3 Name = mmap0 Host API = ALSA Max inputs = 2, Max outputs = 2 Default sample rate = 44100.00 --------------------------------------- device #4 Name = dmix Host API = ALSA Max inputs = 0, Max outputs = 2 Default sample rate = 48000.00 --------------------------------------- device #5 [ Default Input, Default Output ] Name = default Host API = ALSA Max inputs = 32, Max outputs = 32 Default sample rate = 44100.00 --------------------------------------- device #6 [ Default OSS Input, Default OSS Output ] Name = /dev/dsp Host API = OSS Max inputs = 16, Max outputs = 16 Default sample rate = 44100.00 ----------------------------------------------
- so in case we want to use default device, lets tak its #5
dsd -i pa:5 -o pa:5
- manipulate soudn outputs/inputs by
pavucontrol
- pipe I/O to fucntional device
padsp dssocat UDP-RECV:7355 - | padsp dsd -i /dev/dsp -o /dev/dsp
RTL-SDR
- http://forum.autoforum.cz/viewtopic.php?f=14&t=1063 ←- zajimave frekvence
- https://www.youtube.com/watch?v=qPWD4imXXsc - RTL-SDR: GQRX and DSD decoding in GNU/Linux command line.
- http://marcinkowski.ca/blog/2014/02/19/decoding-dmr-radio-using-rtlsdr-gqrx-and-pulseaudio — howto pro predchozi radek
aptitude install rtl-sdr rtl-sdr gr-osmosdr gqrx-sdr cmake libsndfile1-dev pavucontrol libitpp-dev XXXX: aptitude install python3-pip
RADIO-TEORIE
- Evidence stanic bezdrátového místního informačního systému (BMIS) | Český telekomunikační úřad:
- ANTENNA MAGUS - List of Antennas | Explore | Features | The leading Antenna Design Software tool. | Antenna Design. Simplified:
NOTES
22:16:03 < Over23> bry vecer, prosba prosbouci 22:16:13 < Over23> je tu nekdo kdo si hraje s dsd? 22:16:31 < Over23> konkretne tenhle problem: 22:16:34 < Over23> over@picka ~ $ socat UDP-RECV:7355 - | dsd -i /dev/stdout 22:16:34 < Over23> Digital Speech Decoder 1.7.0-dev (build:v1.6.0-86-g7ee04e5) 22:16:34 < Over23> mbelib version 1.3.0 22:16:34 < Over23> Error, couldn't open /dev/audio 22:16:36 < Over23> 2016/03/19 23:15:52 socat[8975] E write(1, 0x7d5438, 256): Broken pipe 22:17:56 < Jenda`> Over23: vždy jsem dekodoval jen wav, musí být 1ch 48kHz S16_LE 22:18:49 < Over23> muzu videt nejaky priklad? 22:20:07 < Over23> respektive cesta tedy ma byt bud z gqrx > wav > dsd chalu li dobre [resp sdr_fm > file] 22:20:18 < Over23> respektive cesta tedy ma byt bud z gqrx > wav > dsd chalu li dobre [resp sdr_fm > file > dsd] 22:20:50 < Jenda`> ffmpeg -i foo.wav -ac 1 -ar 48000 -y ble.wav; dsd -i ble.wav -w out.wav 22:21:03 < Jenda`> foo.wav je z gqrx 22:21:18 < Jenda`> nahrané jako nbfm s šířkou alespoň 13 kHz