TIPS Raspberry Pi Network Issues

Jay Deal

Phhhhhhhhttttttt :)
Joined
Dec 26, 2013
Messages
267
Reaction score
85
How 'bout a step-by-step :confused5:

Example from linked site, the instructions in bold (for the keyboard) also worked to add my phone. You need of course to update the MAC ID for your specific device:


pi@raspberrypi ~ $ sudo hciconfig hci0 down
pi@raspberrypi ~ $ sudo hciconfig hci0 up
pi@raspberrypi ~ $ bluetoothctl
[NEW] Controller 00:15:83:15:A3:10 raspberrypi [default]
[NEW] Device 7C:1E:52:0B:0D:97 Microsoft Wedge Mobile Keyboard
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:83:15:A3:10 Discovering: yes
[CHG] Device 7C:1E:52:0B:0D:97 LegacyPairing: yes
[CHG] Device 7C:1E:52:0B:0D:97 Class: 0x002540
[CHG] Device 7C:1E:52:0B:0D:97 Icon: input-keyboard
[bluetooth]# pair 7C:1E:52:0B:0D:97
Attempting to pair with 7C:1E:52:0B:0D:97
[CHG] Device 7C:1E:52:0B:0D:97 Connected: yes
[agent] PIN code: 953853
[CHG] Device 7C:1E:52:0B:0D:97 Paired: yes
Pairing successful
[CHG] Device 7C:1E:52:0B:0D:97 Connected: no
[bluetooth]# connect 7C:1E:52:0B:0D:97
Attempting to connect to 7C:1E:52:0B:0D:97
[CHG] Device 7C:1E:52:0B:0D:97 Connected: yes
Connection successful
[bluetooth]# quit
Agent unregistered
[DEL] Controller 00:15:83:15:A3:10 raspberrypi [default]
pi@raspberrypi ~ $
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
Thanks, @Jay Deal. That helped. Let me just document what we did to get our Bluetooth Proximity Detection Utility working.

For those that weren't around four years ago, this utility lets you pair your cellphone with your Raspberry Pi. Once you've gone through the setup procedure, the utility will detect when you arrive in your home/office and when you leave AND forward/unforward calls to extension 701 automatically.

WARNING: Run pbxstatus first. If the top line shows Raspberry Pi 3 or if you're using the latest Incredible PBX for XiVO image (2016-08-28 or later), skip steps #1-5 below. It's already installed.

1. To get Bluetooth working on the RasPi 3, here's what worked for us:
Code:
apt-get install pi-bluetooth
systemctl status bluetooth
systemctl restart bluetooth
reboot

2. Decipher the MAC address of your RasPi's Bluetooth adapter: hcitool dev

3. Turn on Bluetooth and enable discovery on your smartphone.

4. Search for your smartphone's MAC address from the RasPi CLI: hcitool scan

5. Install the Bluetooth Proximity Detection Utility on your RasPi:

Code:
cd /root
wget http://nerdvittles.com/trixbox123/proximity.zip
unzip proximity.zip
chmod +x proximity

6. Edit the proximity script and fill in the blanks using the extension you want to forward when you're not "at home" and the 10-digit number of the smartphone to forward the calls to:
Code:
deviceuser=YourName
devicemac=Mac:Address:Of:Your:Smartphone (with the colons from step #4, above)
myextension=701
mycellphone=8435551212

7. Add a cron job to /etc/crontab to check for the presence of your cellphone every minute between 6 am and 9 pm:
Code:
* 6-21 * * * root /root/proximity > /dev/null

When you're home, your cellphone obviously must be within range of your Raspberry Pi and you need a working outbound trunk for this to work when you're away. :idea:
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
@Jay Deal: Wanted to experiment with chan_mobile a bit. Haven't had great success in the past, but maybe things are better now.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
WARNING: Run pbxstatus first. If the top line shows Raspberry Pi 3, the WiFi patch is already installed.

 
Last edited:

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
@wardmundy :

Consider either the patch or freepbx.conf fix for PHP Deprecation log spam mentioned here, here, and here.

It's not a complete fix, warnings still post to the apache error log with active UI use, but it at least removes the once every minute messages from freepbx_debug.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
To optimize the zipped image file, consider an "apt-get clean" to free up 250mb+ or so space. Since the cached packages are already compressed, it should be almost a 1:1 reduction in the zip size.

A "make distclean" in the src folders might also be a reasonable compromise to reduce the zipped image size, but leave the convenience and flexibility of having the src on disk.

Wipe free disk space before imaging to realize the gains and increase compression:
cat /dev/zero > wipe.it ; rm wipe.it

Realizing 3/1 is not a final release and these tweaks may be planned.
FYI: Backed up my configured image using these tricks and the zipped image size was cut down to 950MB.
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
@wardmundy:

Noticed there was a 3/5 image uploaded. I know things are still in flux, but would really appreciate a even a minimal changelog in the first post to help determine if downloading again is warranted.
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
@wardmundy:

Noticed there was a 3/5 image uploaded. I know things are still in flux, but would really appreciate a even a minimal changelog in the first post to help determine if downloading again is warranted.

My apologies. We've been wrestling with the fax module. What a nightmare. Anyway, the 3/5 image adds working support for Bluetooth and WiFi. It also cleans up some of the IPv6 stuff so that IPv4 can coexist on IPv6-enabled networks. Luckily, we now have one on which to do some testing. If you want to completely disable IPv6, we've added a commented out last line in /etc/sysctl.conf to make it easy.

I'm going to wrestle with HylaFax/AvantFax one more day and then post what we have. Everything seems to be working except for the dreaded "Please wait" in AvantFax. It's probably something simple, but I haven't found it yet.
 

Jay Deal

Phhhhhhhhttttttt :)
Joined
Dec 26, 2013
Messages
267
Reaction score
85
I'm going to wrestle with HylaFax/AvantFax one more day and then post what we have. Everything seems to be working except for the dreaded "Please wait" in AvantFax. It's probably something simple, but I haven't found it yet.

Have you tried compiling iaxmodem from source? I found that was the only way to get it working with Hylafax on the ARM processor of the Pogoplug.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
Cc86kT4WIAIU6Lg.jpg

Paydirt, I think. Now all we need is a few pioneers. Worked using standard iaxmodem package without compiling, @Jay Deal.

Tutorial has been updated as well.

Code:
cd /root
wget http://incrediblepbx.com/incrediblefax13-raspbian8.tar.gz
tar zxvf incrediblefax13-raspbian8.tar.gz
rm incrediblefax13-raspbian8.tar.gz
./incrediblefax*

Press the ENTER key several times during the 5-minute install procedure. Reboot.

Login to AvantFax from Admin GUI using browser. Default login credentials are admin:password.

Cc8-dGYWwAAYW3q.jpg


p.s. There's lots of really bad information on the web about "Please Wait" condition with AvantFax. A telltale sign that there's a problem is if you get prompted for a password running faxstat while logged into your server. Lots of really bad information about that, too. More often than not, both are caused by a missing entry for localhost and 127.0.0.1 in /var/spool/hylafax/etc/hosts.hfaxd. Once those are added and /etc/init.d/hylafax restart, AvantFax returns to the living, as does faxstat. I'm putting this here for the next time I forget it. :confused5:

For those using Incredible PBX 13-13 with Incredible Fax, add the following lines to /etc/asterisk/iax_general_custom.conf and restart Asterisk to eliminate registration nag messages from logging every minute:
Code:
minregexpire=60
maxregexpire=600
defaultexpire=300
 
Last edited:

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
My apologies. We've been wrestling with the fax module. What a nightmare. Anyway, the 3/5 image adds working support for Bluetooth and WiFi. It also cleans up some of the IPv6 stuff so that IPv4 can coexist on IPv6-enabled networks. Luckily, we now have one on which to do some testing. If you want to completely disable IPv6, we've added a commented out last line in /etc/sysctl.conf to make it easy.

I'm going to wrestle with HylaFax/AvantFax one more day and then post what we have. Everything seems to be working except for the dreaded "Please wait" in AvantFax. It's probably something simple, but I haven't found it yet.
No apologies needed. I'm just a demanding SOB.

Curuous about the IPv6 issues, please write them up for the uber-geeks among us.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
I don't know enough about IPv6 to speak about it yet. What I learned was the default Raspbian 8 settings left you with only an IPv6 address if you happened to connect to an IPv6-aware DHCP server. That obviously wasn't too desirable for those of us that still do most of our work with IPv4. So... I've fixed it now in such a way that you will get BOTH an IPv4 and IPv6 address. Keep in mind that we haven't even started with IPtables for IPv6. At present, it only whitelists localhost which is required by some of the FreePBX stuff. Other than that, you'll have to build your own IPv6 IPtables setup.if you intend to connect to your RasPi using IPv6.
 

Jay Deal

Phhhhhhhhttttttt :)
Joined
Dec 26, 2013
Messages
267
Reaction score
85
@wardmundy I'de like to try this on a Pogoplug running Jessie. Any chance you can post the build script (pioneers only understood)? I realize it might take a while to run it but I would be fun to try.
 

Jay Deal

Phhhhhhhhttttttt :)
Joined
Dec 26, 2013
Messages
267
Reaction score
85
The download instructions for the script are in my post above.

Not for just fax, I wanted to build the whole enchilada, that is, IPBX GUI 12 with Asterisk 13 on a Pogoplug running Jessie. Is there no script because it was it built, tuned and tweaked manually? If so, I can understand.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
Oh, sorry. There have been a million tweaks, but I'm going to try to recreate it once I catch my breath. :willy nilly:
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
It may be the Ugly American in me, but if the download traffic supports it, changing locale/keyboard to US may be warranted.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,224
It may be the Ugly American in me, but if the download traffic supports it, changing locale/keyboard to US may be warranted.

Yeah. I keep forgetting to do that, but anyone can do it by resetting it during the raspi-config step (where SD card is resized), or they can run raspi-config at any time change it as well.
 

Members online

Forum statistics

Threads
25,819
Messages
167,800
Members
19,247
Latest member
abuhyder
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