Giter Site home page Giter Site logo

lixinswitchpi / oak8x Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 5.0 2.73 MB

A fully open source Asterisk FXO/S module which supports up to 8 channels and based on Raspberry Pi

Makefile 0.58% Shell 0.66% C 94.24% PHP 0.02% C++ 2.85% Objective-C 0.13% Perl 1.52%

oak8x's Introduction

oak8x

A fully open source Asterisk FXO/S module which supports up to 8 channels and based on Raspberry Pi

OAK8X Manual

Compile the new Kernel dtbs files to support tdm bus

Follow this link to download Raspberry Pi Kernel https://www.raspberrypi.org/documentation/linux/kernel/building.md

cd ~/linux/arch/arm/boot/dts
vim bcm283x.dtsi

Go to the section for DMA and follow below to remove interrupts 25, 26 and DMA 9, 10.

                dma: dma@7e007000 {
                        compatible = "brcm,bcm2835-dma";
                        reg = <0x7e007000 0xf00>;
                        interrupts = <1 16>,
                                     <1 17>,
                                     <1 18>,
                                     <1 19>,
                                     <1 20>,
                                     <1 21>,
                                     <1 22>,
                                     <1 23>,
                                     <1 24>,
                                     <1 25>, //remove
                                     <1 26>, //remove
                                     /* dma channel 11-14 share one irq */
                      
			  interrupt-names = "dma0",
                                          "dma1",
                                          "dma2",
                                          "dma3",
                                          "dma4",
                                          "dma5",
                                          "dma6",
                                          "dma7",
                                          "dma8",
                                          "dma9”,  //remove
                                          "dma10”, //remove
                                          "dma11",
                                          "dma12",
                                          "dma13",

Then add below tdm bus definition after the i2s section:

                i2s: i2s@7e203000 {
                        compatible = "brcm,bcm2835-i2s";
                        reg = <0x7e203000 0x24>;
                        clocks = <&clocks BCM2835_CLOCK_PCM>;

                        dmas = <&dma 2>,
                               <&dma 3>;
                        dma-names = "tx", "rx";
                        status = "disabled";
                };

                // new section to add for oak8x:
                tdm: tdm@7e203000 {
                        compatible = "brcm,pi-tdm";
                        reg = <0x7e203000 0x20>,
                              <0x7e101098 0x02>;

                        dmas = <&dma 2>,
                               <&dma 3>;
                        dma-names = "tx", "rx";
                        interrupts = <1 25>, <1 26>;
                        interrupt-names = "dma9", "dma10";
                        status = "okay";
                };
cd ~/linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs

when done

mkdir pidtbs
cp arch/arm/boot/dts/*.dtb pidtbs/

Then copy the new dtb files to the RaspberryPi /boot folder, make sure you have a backup before you overwrite them.

Disable the spi and i2s bus in /boot/config.txt file like below shows

dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

Compile the dahdi

Get the source code from https://github.com/lixinswitchpi/oak.git

cd /usr/src/dahdi-linux
make
make install

Compile the dahdi-tools

Recompile the Asterisk to add dahdi supports

install required packages

apt install libncurses5-dev uuid-dev libjansson-dev libxml2-dev libsqlite3-dev openssl libssl-dev build-essential

Download the asterisk-13.20.0 and recompile it, remember to check up the chan-dahdi

The detailed manual

Please check out the detailed manual in https://switchpi.com/2018/08/29/manual-of-install-oak8x-module/

oak8x's People

Contributors

hharte avatar lixinswitchpi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.