Home Forum Developers IP0x [SVN 245] Asterisk doesn't load

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


Gilles
useravatar
User Info

[SVN 245] Asterisk doesn't load

Hello

After reflashing the IP01 with Switchfin, I notice another issue: Even though Asterisk is listed in /bin...

1. It's not loaded at boot time ("ps aux" shows nothing)

2. "/etc/init.d/asterisk enable" does create a symlink in /etc/rc.d/, but "/etc/init.d/asterisk start" displays no error message but still no trace of Asterisk in "ps aux", nothing in /var/log/message, and /var/log/asterisk/event_log is empty.

FWIW, Dahdi is up and running:

Code:


> lsmod

wcfxs 20692 0 - Live 0x00550000
dahdi 177644 1 wcfxs, Live 0x005c0000
crc_ccitt 1136 1 dahdi, Live 0x028d0800
bfsi 4568 1 wcfxs, Live 0x00524000
root@ip0x:~>

And running it manually...

Code:


root@ip0x:~> asterisk -f
ILL
root@ip0x:~> asterisk   
ILL
root@ip0x:~> /bin/asterisk
ILL

Any idea why Asterisk doesn't start as expected?

Thank you.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

I have no better luck when using maximum output:

Code:


root@ip0x:~> /etc/init.d/dahdi stop
wcfxs_init_ok = 1
Freed a Wildcard
dahdi: Telephony Interface Unloaded

root@ip0x:~> /etc/init.d/dahdi start
dahdi: Telephony Interface Registered on major 196
dahdi: Version: 2.3.0.1
bfsi_sport_init res: 1
After DASIY
port: 1 port_type: O
Module 0: Installed -- AUTO FXO (FRANCE mode)
Found: Blackfin IP0x (1 modules)
wcfxs_init_ok = 1
dahdi: Registered tone zone 2 (France)

root@ip0x:~> /etc/init.d/asterisk start

root@ip0x:~> tail /var/log/messages
Jun 21 21:37:08 IP01 user.info kernel: dahdi: Telephony Interface Unloaded
Jun 21 21:37:11 IP01 user.info kernel: dahdi: Telephony Interface Registered on major 196
Jun 21 21:37:11 IP01 user.info kernel: dahdi: Version: 2.3.0.1
Jun 21 21:37:11 IP01 user.warn kernel: bfsi_sport_init res: 1
Jun 21 21:37:11 IP01 user.warn kernel: After DASIY
Jun 21 21:37:11 IP01 user.warn kernel: port: 1 port_type: O
Jun 21 21:37:11 IP01 user.warn kernel: Module 0: Installed -- AUTO FXO (FRANCE mode)
Jun 21 21:37:11 IP01 user.warn kernel: Found: Blackfin IP0x (1 modules)
Jun 21 21:37:11 IP01 user.warn kernel: wcfxs_init_ok = 1
Jun 21 21:37:11 IP01 user.info kernel: dahdi: Registered tone zone 2 (France)

root@ip0x:~> tail /var/log/asterisk/event_log

root@ip0x:~> tail /var/log/asterisk/queue_log
1167609612|NONE|NONE|NONE|QUEUESTART|
1167609612|NONE|NONE|NONE|QUEUESTART|
1277125751|NONE|NONE|NONE|QUEUESTART|
1277125993|NONE|NONE|NONE|QUEUESTART|
1277126013|NONE|NONE|NONE|QUEUESTART|
1277126017|NONE|NONE|NONE|QUEUESTART|
1277126028|NONE|NONE|NONE|QUEUESTART|
1277156165|NONE|NONE|NONE|QUEUESTART|
1277156182|NONE|NONE|NONE|QUEUESTART|
1277156238|NONE|NONE|NONE|QUEUESTART|

root@ip0x:~> ps aux
  PID USER       VSZ STAT COMMAND
    1 root       576 S    /sbin/init
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 RW<  [events/0]
    5 root         0 SW<  [khelper]
   30 root         0 SW<  [kblockd/0]
   50 root         0 SW   [pdflush]
   51 root         0 SW   [pdflush]
   52 root         0 SW<  [kswapd0]
  145 root         0 SW<  [mtdblockd]
  184 root         0 SW<  [ubi_bgt0d]
  191 root         0 SW<  [ubifs_bgt0_0]
  253 root       524 S    dhcpcd -p
  264 root       820 S    ntpd -4 -c /etc/ntp.conf -g -n
  268 root       492 S    /bin/cron
  293 root       492 S    inetd
  303 root       492 S    /sbin/inetd
  304 root       716 S    /sbin/syslogd -n
  305 root       712 S    /sbin/klogd -n
  310 root       736 S    -sh
  673 root       716 R    ps aux

root@ip0x:~> /sbin/asterisk -vvvvvvvvvvvgc
Asterisk 1.4.32, Copyright (C) 1999 - 2010 Digium, Inc. and others.
[...]
  == Parsing '/etc/asterisk/users.conf': Found
Asterisk Management interface listening on port 5038
  == Parsing '/etc/asterisk/cdr.conf': Found
ILL
root@ip0x:~>

Has someone compiled and ran Asterisk successfully using a recent version of the source code? Any idea what could be causing Asterisk to crash?

Thank you.


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Gilles

Looks like something has gone belly up on your uImage, your best option is to remove your build_ip01 dir, and if your using the GUI 4.0 do an svn up in the dl/asterisk-gui-4.0 dir and in your main switchfin dir aswell

then make and make image

this should remake your uImage from scratch.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Thanks for the tip, I can see a bunch of "asterisk -f" now when typing "ps aux". No idea what went wrong :-/

Maybe I wrongly typed a command to upgrade the NAND, or maybe I used uImage instead of uImage-md5 when reflashing through the GUI.

BTW, I noticed that the Atcom guide IP0X-Upgrade-Guide-V100409-EN.pdf provides more commands than the FAQ. I don't know if that means anything.


Administrator has disabled public posting
admin
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Gilles,

Yes the Atcom Guide is more complete.
They describe setting up the tftp server and teh console connection.

It is a good idea to expand our FAQ a bit.
Thank you!
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

I think it'd be important to go through each line of the instructions in the Atcom PDF and check that they are actually needed to test and then burn a uImage in NAND.

Here's my take:
---------------
#Disables autostart to prevent image to be launched right after download from TFTP sever
ip04>setenv autostart

#Set IP configuration for Atcom
ip04>setenv ipaddr 192.168.1.100
ip04>setenv netmask 255.255.255.0
ip04>setenv gatewayip 192.168.1.1

#Set IP address of remote TFTP server from which to download uImage
ip04>setenv serverip 192.168.1.200

#Save settings to NAND
ip04>save

#Download image from TFTP server into RAM at address 1000000
ip04>tftp 0x1000000 uImage

#Empty NAND memory
ip04>nand erase clean
ip04>nand erase

#Write image from RAM (ie. at address 1000000) into NAND
#CHECK Don't know what "0x0 0x700000" do
ip04>nand write 0x1000000 0x0 0x700000

#CHECK Configure uBoot?
#CHECK We didn't set ethaddr through setenv above
ip04>setenv bootargs ethaddr=$(ethaddr) console=ttyBF0,115200 root=/dev/mtdblock0 rw

#Enable autoloading of uImage
ip04>setenv autostart yes

#CHECK What does this do?
ip04>setenv nandboot 'nboot 0x2000000 0x0'
ip04>setenv bootcmd run nandboot

ip04>save

#Reboot unit. Alternative to unplugging-replugging unit
ip04>reset

When you see the uClinux prompt, you can log on as root/uClinux, and type "reboot" to restart the unit.

Once back in uClinux, you can check the IP configuration with "ifconfig". If the IP address is wrong and you need to connect to the Atcom unit through the network eg. for its web GUI or SSH server, you can change it with eg. "ifconfig eth0 192.168.0.9".
---------------


Administrator has disabled public posting
admin
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Gilles,

It sounds very good. Probably you can update the FAQ?
Also feel free to put this information in Switchfin SVN README.
Please let me know your Sourceforge account so i enable write access for you.


Thank you!
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Dimitar,

Once I get everything working, I'll upload what I wrote. I'm still a bit in the dark about a number of things.


Administrator has disabled public posting
admin
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

No issue just ask and we will help

Cheers
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

I think it'd be important to explain precisely how to add Linux applications to the Switchfin buildroot.

But then, porting Linux x86 applications to the Blackfin + uClinux platform is a lot more involved than just writing a Makefile :-/

At this point, I'm just curious to know how developers rewrite x86 Linux applications so they run on the B + uCl platform, and how they write the Makefile.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

I'm having a problem loading Asterisk again after succesfully compiling it :-/

But this time, the error message is not "ILL" but "BUS":

Code:


root@ip0x:~> asterisk -vvvvvvvvvvvcg
BUS

FYI, in /usr/src/switchfin, I made sure to run "make clean ; svn update" (upgraded to 274).

I can think two things:

1. Are we positive it's build_ip01/image_ip01/uImage that must be copied into /tftpboot and not uImage.ext2?

2. What about /persistent on the Atcom? Should I remove this before downloading a new image?

Thank you.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

It's working now, but I can't reproduce the error: Regardless of how I got the compiling started (sanitizing with "make clean" or wiping off the whole thing with "rm -Rf /usr/src/switchfin"), Asterisk is running OK once uImage is downloaded on the Atcom. Go figure.


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

I would like to know this too, for example I would love to be able to add some kind of GUI for voicemail playbacks to switchfin.  I know there are several such packages available, although I have not researched enough to know which one is best.


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Gilles

Do you always flash your IP0X using tftp and uBoot?

Why not just copy the uImage-md5 file into the /persistent/imageupdate dir and rename it to uImage.

On the next restart your IP0X will re-flash itself, this method is allot safer!!


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Hi Jason

No, at this point, since I'm just getting familiar with embedded devices, how to compile Switchfin, and ultimately, how to add a package to Switchfin's buildroot, I don't reflash the NAND. I just download the image and boot it up with bootm.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

Thanks for the tip about downloading uImage-MD5 into /persisten/imageupdate/. I didn't know that.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: [SVN 245] Asterisk doesn't load

luckman212 wrote:

I would like to know this too, for example I would love to be able to add some kind of GUI for voicemail playbacks to switchfin.  I know there are several such packages available, although I have not researched enough to know which one is best.
I'm also interested, although it was one of the scripts I wanted to write so that the user can see a list of all VM's in a browser page, and play them that way as an alternative into calling Asterisk and playing VM's over the phone.

Maybe you want to create a new topic for this.


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 243
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked