SSブログ

再度cubieanインストール [cubieboard]

cubieez,cubian(desktop),cubian(text mode),lububtuと入れてみたけれど,asteriskは全てのヴァージョンで動くのだけれどcubian(desktop)しかmobileが満足に動いていない。またこのcubian(desktop)もX関係をいろいろいじってdesktopが満足に動いていないので再インストールすることにする。

最終的の設置場所はモニタの無いところなのでcubian(text mode)をインストールすることにする
(携帯電話とのペアリングはdesktopでペアリングした方が簡単なのですがまあ何とかなるでしょう)

mobileコマンドが動くのと動かないのとのdpkg--listの差がほとんど無いことからapt-getする順番にも関係するかもしれないのでapt-getした順番も記録しておくことにする。またコンパイルする前にパッチを当てていますが、パッチを当てずにコンパイルして様子を見ることにします。

http://download.cubian.org/release/Cubian-base-r5-a20.img.7zをダウンロードして解凍したimgデータをSDに書き込む 

初期状態は
ログインID、パスワード cubie/cubie
SSHポート番号36000

 パスワード変更
cubie@Cubian:~$ passwd
Changing password for cubie.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
cubie@Cubian:~$

IPアドレス固定
cubie@Cubian:~$ sudo pico /etc/network/interfaces
# the loopback interface
auto lo
iface lo inet loopback
#
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.126
netmask 255.255.255.0
gateway 192.168.1.1

cubianは必要ないと文句を言うけれどrootをイネーブルする
cubie@Cubian:~$ sudo passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
cubie@Cubian:~$

root@Cubian:~# apt-get update
root@Cubian:~# apt-get upgrade
root@Cubian:~# apt-get install cubie-update 

root@Cubian:~# uname -r
3.4.75-sun7i
root@Cubian:~#
 
タイムゾーン設定
root@Cubian:~# dpkg-reconfigure tzdata
(画面からasia.tokyo選択)
 Current default time zone: 'Asia/Tokyo'
Local time is now:      Mon Jun 16 12:06:37 JST 2014.
Universal Time is now:  Mon Jun 16 03:06:37 UTC 2014.

 カーネルアップデート
 root@Cubian:~# cubian-update
*** Performing self-update
*** Cubian updater v1.2.9 http://cubian.org
*** Downloading Firmware/Updates (this may take a while)
*** Updating firmware
*** Updating kernel
*** Updating modules
*** Depmod 3.4.79-sun7i
*** Updating fs
*** Checking updates from server
*** Your firmware is up to date
root@Cubian:~#
root@Cubian:~# uname -r
3.4.79-sun7i
root@Cubian:~#

asteriskコンパイルに必要なパッケージをインストール
apt-get install uuid uuid-dev
apt-get install libncurses5-dev
apt-get install g++
apt-get install libssl1.0.0 libssl-dev
apt-get install libxml2-dev
apt-get install subversion
apt-get install make
apt-get install makedev
apt-get install patch
apt-get install sqlite3 libsqlite3-dev
bluetooth関係
apt-get install bluetooth libbluetooth-dev
apt-get install blueman(デスクトップ無いのだから必要ないかもしれないが念のため入れておく)

 

ユーザー追加
root@Cubian:~# groupadd -g 5060 asterisk
root@Cubian:~#  useradd -g 5060 -u 5060 -d /var/lib/asterisk -s /sbin/nologin asterisk 

以後はasteriskのインストールですが手順は「rapsberrypiでasteriskを試す」に詳しく書かれています。ただし、chan_mobileを有効にするため、makeするまえにmake menuselectを実行しています。
また日本語パッチを当てていますが最初にパッチを当てずにコンパイルしてchan_mobileが動くか調べることにします。
root@Cubian:~# cd /usr/local/src/
root@Cubian:/usr/local/src#  wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
root@Cubian:/usr/local/src# tar zxvf asterisk-11-current.tar.gz
root@Cubian:/usr/local/src# cd asterisk-11.10.2
root@Cubian:/usr/local/src/asterisk-11.10.2#./contrib/scripts/get_mp3_source.sh
A    addons/mp3
A    addons/mp3/Makefile
A    addons/mp3/README
A    addons/mp3/decode_i386.c
A    addons/mp3/dct64_i386.c
A    addons/mp3/MPGLIB_TODO
A    addons/mp3/mpg123.h
A    addons/mp3/layer3.c
A    addons/mp3/mpglib.h
A    addons/mp3/decode_ntom.c
A    addons/mp3/interface.c
A    addons/mp3/MPGLIB_README
A    addons/mp3/common.c
A    addons/mp3/huffman.h
A    addons/mp3/tabinit.c
Exported revision 201.
root@Cubian:/usr/local/src/asterisk-11.10.2#

root@Cubian:/usr/local/src# ./configureでエラーの出ないことを確かめます
               .$$$$$$$$$$$$$$$=..
            .$7$7..          .7$$7:.
          .$$:.                 ,$7.7
        .$7.     7$$$$           .$$77
     ..$$.       $$$$$            .$$$7
    ..7$   .?.   $$$$$   .?.       7$$$.
   $.$.   .$$$7. $$$$7 .7$$$.      .$$$.
 .777.   .$$$$$$77$$$77$$$$$7.      $$$,
 $$$~      .7$$$$$$$$$$$$$7.       .$$$.
.$$7          .7$$$$$$$7:          ?$$$.
$$$          ?7$$$$$$$$$$I        .$$$7
$$$       .7$$$$$$$$$$$$$$$$      :$$$.
$$$       $$$$$$7$$$$$$$$$$$$    .$$$.
$$$        $$$   7$$$7  .$$$    .$$$.
$$$$             $$$$7         .$$$.
7$$$7            7$$$$        7$$$
 $$$$$                        $$$
  $$$$7.                       $$  (TM)
   $$$$$$$.           .7$$$$$$  $$
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
       $$$$$$$$$$$$$$$$.
大きなアスタリスクが出ればまあコンパイルできるでしょう

chan_mobile.cを修正します。
root@Cubian:/usr/local/src/asterisk-11.10.2# cd addons 
root@Cubian:/usr/local/src/asterisk-11.10.2/addons# pico chan_mobile.c
addr.rc_channel = (uint8_t) 0;になっていること確認
uint8_t rfcomm_channel = 1をuint8_t rfcomm_channel = 0に変更

menuselectでchan_mobileを有効にします。
menuselect → Add-ons選択 → chan_mobileにチェックを入れる
root@Cubian:/usr/local/src/asterisk-11.10.2#make manuselect
                                 **************************************************
                                        Asterisk Module and Build Option Selection
                                    **************************************************

                                                    Press 'h' for help.
                                            --->  Add-ons (See README-addons.txt)
                                                    Applications
                                                    Bridging Modules
                                                    Call Detail Recording
                                                    Channel Event Logging
                                                    Channel Drivers
                                                    Codec Translators
                                                    Format Interpreters
                                                    Dialplan Functions
                                                    PBX Modules
                                                    Resource Modules
                                                    Test Modules
                                                    Compiler Flags
                                                    Voicemail Build Options
                                                    Utilities
                                                    AGI Samples
                                                    Module Embedding
                                                    Core Sound Packages
                                                    Music On Hold File Packages
                                                    Extras Sound Packages

                                    **************************************************
                                        Asterisk Module and Build Option Selection
                                    **************************************************

                                                    Press 'h' for help.
                                                       --- extended ---
                                                   [*] chan_mobile
                                                   [ ] chan_ooh323
                                                   [ ] format_mp3
                                                   XXX res_config_mysql

                                                      --- deprecated ---
                                                   XXX app_mysql
                                                   [ ] app_saycountpl
                                                   XXX cdr_mysql
                                             Bluetooth Mobile Device Channel Driver
                                             Depends on: bluetooth(E)
                                             Support Level: extended

 [ ] chan_mobileを[*] chan_mobileにしてから保存してmake menuselectを終了します。

root@Cubian:/usr/local/src/asterisk-11.10.2#make
root@Cubian:/usr/local/src/asterisk-11.10.2#make install
root@Cubian:/usr/local/src/asterisk-11.10.2#make samples
root@Cubian:/usr/local/src/asterisk-11.10.2#make config

サンプルファイルの作成
何度も繰り返しているので保存してある*.confを/etc/asterisk/にコピー

アスタリスクのパミッション設定
# chown -R asterisk. /var/run/asterisk
# chown -R asterisk. /var/lib/asterisk
# chown -R asterisk. /var/log/asterisk
# chown -R asterisk. /var/spool/asterisk
# chown -R asterisk. /usr/lib/asterisk
# chown -R asterisk. /etc/asterisk

# chmod -R u=rwX,g=rX,o= /var/run/asterisk
# chmod -R u=rwX,g=rX,o= /var/lib/asterisk
# chmod -R u=rwX,g=rX,o= /var/log/asterisk
# chmod -R u=rwX,g=rX,o= /var/spool/asterisk
# chmod -R u=rwX,g=rX,o= /usr/lib/asterisk
# chmod -R u=rwX,g=rX,o= /etc/asterisk

root@Cubian:~# asterisk -vvvvcr
Asterisk 11.10.2, Copyright (C) 1999 - 2013 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 11.10.2 currently running on Cubian (pid = 2238)
Cubian*CLI>

Cubian*CLI> core show help mobile
                   mobile cusd Send CUSD commands to the mobile
                 mobile rfcomm Send commands to the rfcomm port for debugging
                 mobile search Search for Bluetooth Cell / Mobile devices
           mobile show devices Show Bluetooth Cell / Mobile devices
Cubian*CLI> 

おお chan_mobile動いた
MOBILEコマンドは
Asterisk 11.10.2になったから?
パッチを当てずにmakeしたから?
blumanをapt-getしたから?

日本語パッチを当ててみるか 

 

 


nice!(0)  コメント(0)  トラックバック(0) 
共通テーマ:パソコン・インターネット

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

Facebook コメント

トラックバック 0

lubuntuインストールchan_mobile.conf設定 ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。