[Klug-general] Raspberry Pi Serial terminal server

Mike Giles mike.giles at gmx.com
Fri Jan 10 16:10:14 UTC 2014


Hi,
I’m not overclocking and I'm using a Pihut 7 port USB hub which is 
advertised as providing "no backpower".
I measured the voltage between TP1 and TP2 at 4.99V, this was with the 3g 
Up, the wi-fi up and a USB to serial adapter connected.
A day or two before I sent my mail to the mailing list I re-connected all 
the cables( USB and power) to the Rpi and hub (swapped positions of 
adapters).
The RPi is reporting an uptime of 5 days now
14:54:40 up 5 days,  2:49,  1 user,  load average: 0.03, 0.07, 0.06

So there hasn't been any crashes or freezes, the only thing that happened is 
wlan0 went down and didn't come up again.

Jan  7 08:38:17 raspberrypi ifplugd(wlan0)[1727]: Link beat lost.
Jan  7 08:38:19 raspberrypi wpa_supplicant[1743]: wlan0: 
CTRL-EVENT-DISCONNECTED bssid=00:fe:f4:0a:5b:38 reason=0
Jan  7 08:38:27 raspberrypi ifplugd(wlan0)[1727]: Executing 
'/etc/ifplugd/ifplugd.action wlan0 down'.
Jan  7 08:38:27 raspberrypi wpa_supplicant[1743]: wlan0: 
CTRL-EVENT-TERMINATING - signal 15 received
Jan  7 08:38:27 raspberrypi ifplugd(wlan0)[1727]: Program executed 
successfully.
Jan  7 08:38:31 raspberrypi ntpd[2182]: Deleting interface #2 wlan0, 
192.168.1.1#123, interface stats: received=34, sent=35, dropped=0, 
active_time=160431 secs
Jan  7 08:38:31 raspberrypi ntpd[2182]: peers refreshed

Thanks again,


From: Michael Miller
Sent: Thursday, January 09, 2014 11:14 AM
To: Kent Linux User Group - General Topics
Subject: Re: [Klug-general] Raspberry Pi Serial terminal server

Hello,

You could check raspberrypi.org:- http://www.raspberrypi.org/
Click on Forum, and in the search box 'stakis3g', lots of hits.
As you are getting random crashes and have a 2A power supply, its still 
possible the voltage is down, under load.
Check the voltage on the Pi, TP1 to TP2, try it with nothing plugged in 
except the power supply, plug things
in one at a time, check the voltage. Are you overclocking? Check the voltage 
under heavy CPU load.
Does your powered hub backfeed power to the Pi?
I'm using a 5.25V - 2A power supply, after it gets to the Pi through the 
cables and connectors. it drops to
5.1V and under load to 5.06V (I'm overclocking to 1Ghz) and a 7 port hub 
with a 3A power supply.
About 4.85V TPI to TP2 is a working minimum under load.

Regards

From: Mike Giles
Sent: Thursday, January 09, 2014 8:28 AM
To: Kent Linux User Group - General Topics
Subject: Re: [Klug-general] Raspberry Pi Serial terminal server

Hi Michael,
Thanks very much for the info, I will give this a go.
I guess I can leave ser2net in rc.local ?

Best Regards,
Mike





----- Original Message -----

From: Michael Miller

Sent: 01/08/14 11:58 PM

To: Kent Linux User Group - General Topics

Subject: Re: [Klug-general] Raspberry Pi Serial terminal server


Hello,

To setup sakis3g
http://lawrencematthew.wordpress.com/2013/08/07/connect-raspberry-pi-to-a-3g-network-automatically-during-its-boot/
There is a note about stopping and starting the service without a reboot.

Regards
Michael

From: Mike Giles
Sent: Tuesday, January 07, 2014 1:41 PM
To: kent at mailman.lug.org.uk
Subject: [Klug-general] Raspberry Pi Serial terminal server

Good Afternoon,
I'm working on an HNC assignment using a Raspberry Pi model B running
wheezy-raspian.
I'm a Linux Novice.
The Kernel is:
pi at raspberrypi /usr/bin/modem3g $ cat /proc/version
Linux version 3.6.11+ (dc4 at dc4-arm-01) (gcc version 4.7.2 20120731
(prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) )
#538 PREEMPT Fri Aug 30 20:42:08 BST 2013

I have been using sakis3g and ser2net to connect the RPi to the cellular
network and act as a serial terminal server. (based on various posts and
blogs)
I have added the following to rc.local in an attempt to connect to the
mobile network and configure the serial terminal server.
****
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

(sleep 2;sudo /usr/local/sbin/ser2net -c /etc/ser2net.conf -n) &
#sudo /usr/bin/modem3g/sakis3g connect
(sleep 5;sudo /home/pi/connect.sh) &
exit 0

****
connect.sh
****
#!/bin/bash
# script to connect to mobile network
echo "Running Sakis3g"
sleep 10
sudo /usr/bin/modem3g/sakis3g connect --console APN=CUSTOM_APN
CUSTOM_APN='apn' APN_USER='user' APN_PASS='password' USBDRIVER=option
USBMODEM=12d1:1003 OTHER=USBMODEM MODEM=OTHER
****
This normally works from a power on but often doesn't from a reboot.
I would like to debug the boot sequence to try and make this more reliable
however I'm not sure how to enable/capture the debug output, I can't see
anything in /var/logs.
Is there any debug I can enable or re-direct the console output to a file ?

I have found that the 3g modem is not always listed in lsusb.

I also experience random hangs/crashes and a power cycle is required to
recover. I'm not sure if this is hardware related. I have a 2A power adapter
and a powered USB hub that has the 3g modem, wifi adapter, mouse and
keyboard connected to it. The RPi will run for varying lengths of time.
Any debug help would be much appreciated.
Best Regards,
Mike


_______________________________________________
Kent mailing list
Kent at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/kent






_______________________________________________
Kent mailing list
Kent at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/kent

_______________________________________________
Kent mailing list
Kent at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/kent 




More information about the Kent mailing list