PIONEERS Beaglebone Black Fixes

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Just received my BBB and already installing Incredible PBX from these instructions.

I saw this error coming by, although the installations is still continuing:
Finishing RasPBX upgrades installation, installed version is now: 16
* Stopping web server apache2 ... waiting [ OK ]
mysql stop/waiting
Please wait...
/usr/local/sbin/amportal: line 46: [FATAL]: command not found
/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to but the directory
does not exists. Attempting to create it with: 'mkdir -p '
mkdir: missing operand
Try 'mkdir --help' for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
There is a quirk that we are having a hard time pinning down. May have been caused by recent FreePBX core update which we automatically load as part of the install?? Like I said, we still don't know what's causing it.

After boot, if Asterisk is not running when you log in, we think we have it fixed in the latest Travelin' Man 3 update for BBB. You don't have to enable IPtables if you don't want to. Just install the stuff and reboot to test it.
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Another installation issue:
After ./resize-partition (from the /tools folder) a reboot was required and I could not SSH anymore into the BBB.
GUI access was possible.
I then unplugged the BBB :)() and booted it up with an HDMI display attached (boy, was I glad to have the right HDMI cable).

It appeared that the BBB still needed to finish the resize operation, but could only do that AFTER I logged in from an attached keyboard.
It then stopped and restarted amportal. I could then SSH in again.
I am not sure what went wrong here.

1) One thing that is different from RPI is the network settings which I have copied from the Pi. There is a network option, now unused.
iface eth0 inet static
address 192.168.30.XX
netmask 255.255.255.0
# network 192.168.30.0
gateway 192.168.30.1
dns-nameservers 8.8.8.8
2) Another thing to note is the status screen after the resize:
it shows multiple private ip addresses (USB, ETH) and it shows no size for the resized Disk (I use a 16Gb Sandisk type 4)
I have a screenshot attached.
 

Attachments

  • BBB Status Capture.JPG
    BBB Status Capture.JPG
    56.4 KB · Views: 11

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
OK, since the ./resize-partition I am in trouble. Asterisk down and status screen shows no Disk.

1) I ran the initial steps to activate IPtables with Travelin' Man 3 but did not continue with configuration. I just rebooted using shutdown -r now, but for some reason the BBB does not switch off and on, it just continues to show heartbeat. I pulled the plug after 5 minutes and put it back in.

2) Again I could not enter with SSH, pulled the plug and connected the BBB with keyboard and display, then plugged in.
(I think the reason I cannot SSH its because the
Asterisk is still down, like you can see on the previous screenshot.
I have access with SSH.
I tried running ./resize-partition again but it showed correctly This SD card already has been resized.
I tried shutdown -h now from keyboard and again it just continues to show heartbeat. The display did not turn black, but the BBB stops responding to the keyboard.
The SSH client gets an announcement shutting down, but can continue to work by pressing enter and will get a prompt.
So the system is not shutting down at all.

ward Do you have another suggestion before I start from scratch?
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Tried -P and failed. I started from scratch and used the RPI resize as described here under Expanding root partition.
While going through the motions again I found that I did NOT remove as it is way up in the file instead of the last entry like in the Raspberry, my mistake.

Also, someone else made a small mistake or is having a laugh here by asking to set a password for 700 and instead creating a password for extension 701.
A default extension (700) has been created with Incredible PBX.
Anyone with your extension password can make calls on your nickel.
Enter new password for extension 700 on BeagleBone: xxx
Extension 700 password: xxx

Enter email address for delivery of ext. 700 voicemails: e[email protected]
Extension 700 email delivery address: e[email protected]

Enter NUMERIC password for ext. 700 voicemail access: yyy
Extension 700 voicemail password: yyy

So right after installing Incredible PBX, the status screen shows Asterisk up, Disk (no info) and two Private IP addresses, one for the eth0 and one for the usb0, so far so good. Immediately, I ran the install for Travelin' Man 3, without further configuring.
Then I did a reboot with shutdown -r now and its working properly.
All seems good, thanks for your help. I will write if otherwise.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Yeah. Already fixed the 700 boo-boo. It did what it was supposed to do, just used the wrong name for the extension. Thanks.

There's a resize-partition script in /root on the BBB. It needs to be run from the console, not SSH.
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Question:
I have some dialplan scripts used before in the Raspberry Pi, but that was with the MySQL DB plugin.
Now I believe I need to rewrite those for ODBC.
I found this article, which parts of it should I apply in the current BBB version?
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
:oops: again the BBB does not want to shut down.

1) After installing Incredible PBX and Travelin' Man 3 I rebooted.
2) I continued to install some additional modules with Module Admin, tried to import with Bulk DID and Bulk Extensions (which fail as usual), then decided to call it a day....and gave the command shutdown -h now and shutdown -P now
3) BBB still showing heartbeat.

The console display which I left on this time, shows:
tilcdc timeout waiting for framedone

I hope this means something to someone. :banghead:
 

phonebuff

Guru
Joined
Feb 7, 2008
Messages
1,115
Reaction score
129
It means that shutdown will not complete ---

As it's waiting for the driver to timeout as issue a framedone. But I have no idea what you are interfacing with this driver in this hardware or why it does not shutdown..

Did you try halt instead of shutdown
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
"halt" works and "reboot" works as well. But I get the impression this gives a sort of powercut to the BBB.:ack2:

I have connected nothing else, just intended to have a standalone pbx.
(now testing with HDMI display and MSFT USB keyboard with mouse)

Correction:
1) halt and reboot (sometimes) work from an SSH but never from the directly connected keyboard.

Asterisk is not coming up, at least not in every boot.
I will try tomorrow again with another SD card, any suggestions? I used Sandisk 16Gb type 4.

I will also use a USB hub with separate power tomorrow to connect the keyboard, but the BBB should not have that problem. I am using a 5V2A power supply.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Rrrr: Did you try this for Asterisk DOWN problem?

Halt and reboot seem to always work from SSH if you issue them twice. Recommend amportal stop BEFORE you do either! Ubuntu is a different beast. :taz:
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Yes I immediately installed Travelin' Man 3 after Incredible PBX.
Problem is that sometimes after a boot, I cannot even SSH into it. I thought I had fixed that by properly hashing out the dhcp entry. (Perhaps the USB network entry needs to be on the same network?)
Another thing that bothers me is that pressing enter after typing root at the login prompt, it takes a few seconds before asking for password.
And yes, a double halt worked for me, see below.

I just now had to do another power cut as I could not SSH in, I did a boot and this time SSH with Putty worked, but amportal did not start, which I did manually.
SSH amportal start : ok
SSH amportal stop: ok.
SSH shutdown -r now does not work (anymore since installing Incredible PBX I believe, but if I need to start from scratch I will verify), tried 3x
SSH reboot led to an immediate cut in the heartbeat...: ok
after the reboot
SSH worked, asterisk down.
SSH amportal start : ok
SSH amportal stop: ok.
Code:
nano /etc/network/interfaces
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface usb0 inet static
    address 192.168.30.38
    netmask 255.255.255.0
    network 192.168.30.0
    gateway 192.168.30.1
#
iface eth0 inet static
    address 192.168.30.28
    netmask 255.255.255.0
    gateway 192.168.30.1
    dns-nameservers 8.8.8.8
service networking restart
I changed the USB entries to a different ip address in the same network.
The service networking restart resulting in a halted SSH session...power cut was again necessary.
Next time up, I could SSH in again.
SSH amportal start : ok
SSH amportal stop: ok.
SSH halt: not working
SSH halt: ok.
Next time up, I could SSH in again, but asterisk does not comes up in a boot anymore.
What to do, start from scratch?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Start over. Don't improve anything. Then report the results.

To repeat... THE PROPER SHUTDOWN PROCEDURE presently is

amportal stop
halt or reboot
 

Rrrr

Tink
Joined
May 28, 2009
Messages
343
Reaction score
25
Ok, started from scratch again.
Bear with me here for documenting exactly what I did, its the third time now...:conehead:

1. Installed RasPBX image on SD card and booted.
SSH: ok
shutdown -r now: ok
amportal was running.

2. Changed eth0 IP address to static
service networking restart: leads to SSH not responding, login on keyboard/display works, ifconfig shows new ip address, SSH not accessible on new address.
shutdown -r now (from display/keyboard): ok
Suggestion: next time after changing eth0 ip address to static, use shutdown -r now instead of service networking restart

SSH on new static ip address
username: root [ENTER]
password now appears to take much more time to appear than before, this must be something related to this UBUNTU implementation.

3. Expand root partition (RPI version)
I used SSH to do this, but I forgot this remark so I should have waited till after installing Incredible Pi and work from console:

There's a resize-partition script in /root on the BBB. It needs to be run from the console, not SSH.
Nevertheless here is my log:

Code:
cd /tmp
wget http://repo.raspbx.org/download/raspi-config_20121028_all.deb
dpkg -i raspi-config_20121028_all.deb
apt-get -f install
raspi-config

Somehow, when apt-get -f install asked to confirm, I pressed Y or y followed by enter or just enter, and the script took that as an abort. o_O

Do you want to continue [Y/n]?

Abort.

Luckely, I found a trick after three times. I pressed y, then backspace, then Y followed by enter. For some reason that was ok and the script continued to install.
Next time, I need to do this from Console.
I verified the install with:

root@raspbx:/tmp# apt-get -f install

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@raspbx:/tmp#

I continued with raspi-config, here some of the output I found in the CLI after returning from the menu:


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
update-rc.d: warning: resize2fs_once start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (2 3 4 5 S)
update-rc.d: warning: resize2fs_once stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)
Adding system startup for /etc/init.d/resize2fs_once ...
/etc/rc0.d/K20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc1.d/K20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc6.d/K20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc2.d/S20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc3.d/S20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc4.d/S20resize2fs_once -> ../init.d/resize2fs_once
/etc/rc5.d/S20resize2fs_once -> ../init.d/resize2fs_once

shutdown -r now: ok

When system came back up, I verified SD card space to be 16Gb:

root@raspbx:~# fdisk /dev/mmcblk0


Command (m for help): p

Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes
4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d41b7

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 133119 65536 e W95 FAT16 (LBA)
/dev/mmcblk0p2 133120 31116287 15491584 83 Linux

4. Basic configuration and Email setup
configure-timezone: ok (not really needed here, is also done inside Incredible Pi installation)
dpkg-reconfigure keyboard-configuration: ok (Generic 105 key Intl PC) and English US, etc and keep defaults.
dpkg-reconfigure exim4-config: ok as per described in BBB documentation
nano /etc/exim4/passwd.client: ok as per described.
update-exim4.conf: ok

shutdown -r now: ok

5. Install Incredible PBX using this, below some key information:

Run "raspbx-upgrade --help" for additional options
Base version: 09-09-2013
Installed upgrade: 15
Local upgrade available: 15
Online upgrade available: 16
...
54 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 59.6 MB of archives.
After this operation, 1486 kB disk space will be freed.
Do you want to continue [Y/n]?

After the installation finished:
shutdown -r now: ok
After booting up:
Retrieving... lastupdate-raspbx
Updates available as of Wed Dec 18 15:04:40 CET 2013: 0
Updates completed. Your system is now current.

No mail for root
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
wlan0: error fetching interface information: Device not found
cat: /sys/class/thermal/thermal_zone0/temp: No such file or directory
(standard_in) 1: syntax error
(standard_in) 1: syntax error
then STATUS screen shows up, asterisk is running, DISK shows nothing.
shutdown -r now: NOT WORKING
shutdown -r now (2nd time): NOT WORKING
amportal stop: ok
shutdown -r now: NOT WORKING
reboot: ok


6. Install Travelin' Man 3 update
After boot, STATUS screen shows up, asterisk is DOWN, not running, DISK shows nothing.
Noted this
After boot, if Asterisk is not running when you log in, we think we have it fixed in the latest Travelin' Man 3 update for BBB
Execute the steps mentioned, no configuration.

shutdown -r now: NOT WORKING
amportal start: ok
amportal stop: ok
reboot: ok
After boot, STATUS screen shows up, asterisk is UP and running, DISK shows nothing.
amportal stop: ok
halt ENTER, halt ENTER: ok

Thanks for that, Ward.
Working as advertised.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Raspi-config was designed for a Raspberry Pi. Using it is a crap shoot at best. It'd be much easier to follow the Nerd Vittles tutorial but... whatever works.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Just a quick update on the BeagleBone Black problem with GoogleTTS and 'The Squeal.' Lefteris Zafiris, Developer Uno, has traced the problem to the Ubuntu implementation of mpg123:
the generated wav from mpg123
is distorted and has this high pitch sound.
mpg123 version is the same across raspi and beagle (1.14.4-1 armhf) but I'm not sure if
there are any patches that raspi version contains and missing from the beagle version,
build flags or options that differ etc.
Also the C compiler is different between the two boards:
gcc version 4.7.2 (Debian 4.7.2-5+rpi1) in raspi and
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) in beagle
That might also be an issue.
I will try to find some more time to check the source of both packages and see if there
is any obvious difference.
We'll keep you posted on any progress.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
We think the shutdown issue has been resolved using halt, reboot, and shutdown commands. Here's the patch:

Code:
cd /
wget http://incrediblepbx.com/shutdown.tar.gz
tar zxvf shutdown.tar.gz
rm shutdown.*

In case you ever want to remove the fixes, you'll find the new versions of the three commands in /usr/local/sbin.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
RELEASED! Thanks to the efforts of Lefteris Zafiris and discovery of more than a few Ubuntu bugs & quirks, we think the Google text-to-speech engine and IPtables with Travelin' Man 3 now are functioning properly. Two examples using GoogleTTS instead of Flite are included in the Yahoo New Feed (951) and the Weather Feed (949) applications. We could use a couple of pioneers before we turn this loose in the wild.

Use a fresh microSD card!!! Here are the steps from a blank card.

1. On any PIAF server with an SD card slot, insert your microSD card into an SD card adapter and then plug it into your server.
2. Wait for Linux to discover the SD card or reboot the server. You can test for presence of SD card with: fdisk -l
3. Once the SD card is recognized, write down its device name. Be very careful. You don't want to accidentally reformat your hard drive.
4. Download the BBB image from beaglebone-asterisk.org: wget http://www.beaglebone-asterisk.org/download/raspbx-bbb-09-09-2013.img.xz
5. Issue the following command using the device name of your SD card instead of sdb: xz -dc raspbx-bbb-*.img.xz > /dev/sdb (This takes about 8 minutes!)
6. Remove the SD card from your PIAF server and insert the microSD card into your BeagleBone Black.
7. While holding down the Boot button (on the top of the card above the microSD slot), plug in the power adapter. When the first light appears, let go of the Boot button.
8. After RasPBX has booted, login as root with password: beaglebone
9. Download and run the experimental Incredible PBX 11.3 installer:

Code:
cd /
wget http://incrediblepbx.com/incrediblepbx11-raspbx.gz
gunzip inc*
chmod +x inc*
./inc*
10. Set your timezone and then hang around long enough to answer the RasPBX update prompt with a Y. Then go have lunch.
11. At the conclusion of the installation process, you'll be prompted to change your passwords. Please do!
12. Reboot your server when the installer finishes (about 40-60 minutes depending upon your Internet connection).
13. Login as root with password beaglebone.
14a. If you're on a private LAN behind a secure firewall and need no Internet access except for your SIP, IAX, and Google Voice trunks, you can lock down your server to the private network with these commands instead of running secure-iptables in step 14.b:

Code:
cd /root
cp iptables.lanonly /etc/network/iptables
iptables-restart

14b. Otherwise, read the Travelin' Man 3 tutorial. Do NOT install it! The software is already in place. Run /root/secure-iptables at a minimum.
15. Check to be sure IPtables has been activated: iptables -nL and status
16. From the BBB console only... expand your image to fill your bigger-than-2GB (we hope) microSD card: /root/resize-partition

17. Log back in as root on the BBB console only after the reboot to complete the resize operation.
18. Configure a SIP phone with extension 701.
19. Dial 951 to try out the News app.
20. Dial 949 to try out the Weather app.

BcGsHTHCQAARott.jpg:large
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,159
Reaction score
5,192
Pre-4.11.3 BUG: Misc Destination for Weather by City points to incorrect extension

FIX: In FreePBX, choose Applications -> Misc Destinations -> Weather by City. Change Dial to: 949. Click: Submit Changes then Apply Config.
 

Members online

No members online now.

Forum statistics

Threads
25,770
Messages
167,441
Members
19,181
Latest member
ejrubin
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top