WWW.DUMAIS.IO
ARTICLES
OVERLAY NETWORKS WITH MY SDN CONTROLLERSIMPLE LEARNING SWITCH WITH OPENFLOWINSTALLING KUBERNETES MANUALLYWRITING A HYPERVISOR WITH INTEL VT-X CREATING YOUR OWN LINUX CONTAINERSVIRTIO DRIVER IMPLEMENTATIONNETWORKING IN MY OSESP8266 BASED IRRIGATION CONTROLLERLED STRIP CONTROLLER USING ESP8266.OPENVSWITCH ON SLACKWARESHA256 ASSEMBLY IMPLEMENTATIONPROCESS CONTEXT ID AND THE TLBTHREAD MANAGEMENT IN MY HOBBY OSENABLING MULTI-PROCESSORS IN MY HOBBY OSNEW HOME AUTOMATION SYSTEMINSTALLING AND USING DOCKER ON SLACKWARESYSTEM ON A CHIP EMULATORUSING JSSIP AND ASTERISK TO MAKE A WEBPHONEC++ WEBSOCKET SERVERSIP ATTACK BANNINGBLOCK CACHING AND WRITEBACKBEAGLEBONE BLACK BARE METAL DEVELOPEMENTARM BARE METAL DEVELOPMENTUSING EPOLLMEMORY PAGINGIMPLEMENTING HTTP DIGEST AUTHENTICATIONSTACK FRAME AND THE RED ZONE (X86_64)AVX/SSE AND CONTEXT SWITCHINGHOW TO ANSWER A QUESTION THE SMART WAY.REALTEK 8139 NETWORK CARD DRIVERREST INTERFACE ENGINECISCO 1760 AS AN FXS GATEWAYHOME AUTOMATION SYSTEMEZFLORA IRRIGATION SYSTEMSUMP PUMP MONITORINGBUILDING A HOSTED MAILSERVER SERVICEI AM NOW HOSTING MY OWN DNS AND MAIL SERVERS ON AMAZON EC2DEPLOYING A LAYER3 SWITCH ON MY NETWORKACD SERVER WITH RESIPROCATEC++ JSON LIBRARYIMPLEMENTING YOUR OWN MUTEX WITH CMPXCHGWAKEUPCALL SERVER USING RESIPROCATEFFT ON AMD64CLONING A HARD DRIVECONFIGURING AND USING KVM-QEMUUSING COUCHDBINSTALLING COUCHDB ON SLACKWARENGW100 MY OS AND EDXS/LSENGW100 - MY OSASTERISK FILTER APPLICATIONCISCO ROUTER CONFIGURATIONAASTRA 411 XML APPLICATIONSPA941 PHONEBOOKSPEEDTOUCH 780 DOCUMENTATIONAASTRA CONTACT LIST XML APPLICATIONAVR32 OS FOR NGW100ASTERISK SOUND INJECTION APPLICATIONNGW100 - DIFFERENT PROBLEMS AND SOLUTIONSAASTRA PRIME RATE XML APPLICATIONSPEEDTOUCH 780 CONFIGURATIONUSING COUCHDB WITH PHPAVR32 ASSEMBLY TIPAP7000 AND NGW100 ARCHITECTUREAASTRA WEATHER XML APPLICATIONNGW100 - GETTING STARTEDAASTRA ALI XML APPLICATION

AASTRA CONTACT LIST XML APPLICATION

2012-02-25

Contact directory

The Aastra 571 does not provide a phonebook button. This is not a problem since this can be done with the assignment of an XML application on a soft button. My contacts are all stored in a MYSQL database. This contact list is maintained on a page on my intranet website. You can see how usefull it would be to have that list accessible on all IP phones in the house. This application will do the trick.

Download

aastraphonebook.tar

AVR32 OS FOR NGW100

2012-02-25

These pages are meant to describe the AVR32 architecture and how to do standalone development. This is basically a collection of notes that I am writting to help myself. Ususally I would do that in a text file on my computer but this time I said to myself "Why not share it with everyone?". It is hard to find information about this as everyone is talking about linux development everywhere. If you search on google, chances are that you will land on a forum where a guy asked the exact same question you were asking yourself and someone will have answered "Look on the internet" so you will be back to square one. So I decided to write my own web page as I learn to get my project going. Basically what I want to do is to build an OS for the NGW100 board.

Development is done in assembly language. It is easier to know what you are actually doing and it is more fun. You won't find a lot of resources on how to get you started with ASM for this CPU. Again, everyone is talking about Linux and C/C++, which is fine, but not usefull for what I am doing.

So I hope this information can be usefull to someone else. And if you see something wrong with what I am doing please tell me. I want this information to be accurate, and I want my OS to work.

ASTERISK SOUND INJECTION APPLICATION

2012-02-25

Sound injection Application

This application, while not very usefull, is quite funny. I use it to inject sounds on an arbitrary channel, part of an active call, and will not be heard by the other peer. This will act a bit like ChanSpy, except that when pressing on a digit on your keypad, a sound file will be played on the specified channel. For example, let's say that ipphone1 is currently talking talking to ipphone2. With ipphone3, you call an extention that executes Inject(SIP/ipphone2). This will allow you to hear the conversation between ipphone1 and ipphone2. Now you would like to inject a sample that says "What is your name?" (a sound file recorded with the voice of the user using ipphone1). This can now be done by pressing a digit on your keypad. Not only they will not hear you on the other end, but the sound file that you have just injected will be heard by ipphone2 only. This could create a lot of confusion for both users.

Compiling and Installing

First, get a copy of the source code. Untar in any folder you like. With this one, the source code doesn't need to reside in the asterisk source tree, but you will need the asterisk sources on your computer. You might need to change the Makefile since the folders in there are good for my installation, but might not be good for yours. It's a one-line change anyway. Next, just type "make" to build the app, or "make load" to automatically build,install and load the module into asterisk. so basically:

wget http://www.dumaisnet.ca/files/app_inject.tar tar -xf app_inject.tar # you might need to modify the ASTMODULES and INCLUDES paths in Makefile make load

Configuration

No configuration files are needed. The only thing you need to setup is the dialplan. You only need to call Inject(CHANNEL). No need to answer first, the application will take care of it.

exten => *7,1,Inject(SIP/ipphone) exten => *7,2,Hangup()

You will need to provide sound files for when you will press digits to play the different sounds that you need. You need to copy 10 sound files in your sound folder (usualy /var/lib/asterisk/sounds). They MUST follow the name scheme "injection0.gsm", "injection1.gsm", ... "injection9.gsm". Of course, you could use .wav or .gsm. As you guessed it, pressing on "5" will play injection5.gsm. It is not necessary to provide all sound files.

Download

app_inject.tar

NGW100 - DIFFERENT PROBLEMS AND SOLUTIONS

2012-02-25

AVR32 troubleshooting

In this section, I will describe different problems I ran into. Everytime I spend a lot of time trying to figure why something did not work, I will post the found solutions here.

Illegal opcode with conditional instructions

Everytime I was using "addhi" I got an illegal opcode exception. The worse thing was that I was using addhi inside and exception handler. This is because it seems that my CPU uses architecture revision 1. when looking at the isntruction set reference, you can see that these instructions are meant to be used on revision 2 architecture. It is a shame because I couldn't wait to use those.... oh well.

Unrecoverable exception on scall

Everytime I was using "scall", the "unrecoverable exception" was issued instead of EVBA+0x100. I found out that this is because EVBA was not alligned on a 8kb oundary

Copying to parallel flash using u-boot

The address ranges in the AT49BV642D datasheet are 16bit words! So when they say that the sector 23 resides from 0x80000 up to 0x87FFF, it really means from 0x100000 to 0x107FFF.

ASID field in page table

I could understand from the architecture document that the ASID field in a page table entry (from the TLB) is used by the MMU to match the current process ID. What I could not understand was that the ASID field is matched... against what? Yes it is matched against the processID but where is the current proces ID stored? It is in the TLBEHI register. so the TLBEHI[ASID] field should not only be filled before loading a page in the TLB, it should be loaded ALL the time since it will be used for the comparison as well.

Locking entries in TLB

When setting DLA or ILA in MMUCR, make sure you change DRP or IRP accordingly. If you lock the first entry and leave DRP (or IRP) to 0, you will never be able to write anything in the TLB

INTC not working properly, values written to IPR are read back as zero

Make sure that INTC is enabled in PBBMASK (See power manager)

Comparing a page with buffer on the dataflash always says that the page matches even though it is different

When I was reading a page (using 0x87) , then writting something else to buffer1. A buffer comparison always returned that the pages matched. To fix this, I am now using buffer2 to write and compare. It solves the problem but it doesn't make any sense.

MACB: RBQP increases when receiving frames but descriptor's ownership flag does not change

It is important to load RBQP with a physical address (not virtual address). Descriptors must also be loaded with physical addresses. Also, even if reading descriptors from the P2 segment (uncached memory), it is important to invalidate the cache ("cache r0[0],0b1011").