Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #548794

Re: New Raspberry Pi 4 presented today

From Jan Panteltje <pNaOnStPeAlMtje@yahoo.com>
Newsgroups sci.electronics.design
Subject Re: New Raspberry Pi 4 presented today
Date 2019-06-25 17:17 +0000
Organization A noiseless patient Spider
Message-ID <qetkvq$e4e$1@dont-email.me> (permalink)
References <qeq4ta$ie9$1@dont-email.me> <qer7ba$7ff$1@gioia.aioe.org> <qesrnt$pqe$1@dont-email.me> <qethng$kkc$1@gioia.aioe.org>

Show all headers | View raw


On a sunny day (Tue, 25 Jun 2019 17:22:10 +0100) it happened Chris
<xxx.syseng.yyy@gfsys.co.uk> wrote in <qethng$kkc$1@gioia.aioe.org>:

>On 06/25/19 11:06, Jan Panteltje wrote:
>> On a sunny day (Mon, 24 Jun 2019 20:12:44 +0100) it happened Chris
>> <xxx.syseng.yyy@gfsys.co.uk>  wrote in<qer7ba$7ff$1@gioia.aioe.org>:
>>
>>> On 06/24/19 10:24, Jan Panteltje wrote:
>>>> New Raspberry Pi 4 quadcore presented today:
>>>>    https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
>>>>
>>>> USB3, gigabit ethernet, micro HDMI dual display 4K, WiFi, bluetooth
>>>> H264 and H265 hardware decode, 40 pin GPIO,
>>>> 1, 2, or 4 GB RAM,.
>>>> 5V 3 A supply.
>>>>
>>>>
>>>> Only minus I see is that the power consumption goes up and up with each model,
>>>> my old 1 core raspi only needs 300 mA :-(
>>>>
>>>
>>> Seems a bit meh to me, loads of other boards out there now, but what it
>>> really needed was a a second ethernet, or means to add one.
>>>
>>> A good use for this would be low power firewall, opnsense or similar
>>> software, but useless with only a single ethernet...
>>>
>>> Chris
>>
>> I am using a Pi 2 model as router, has a 4G stick in it,
>> and runs iptables for routing and firewall.
>> It is my internet connection.
>>
>
>
>I guess with a single interface, you are defining virtual interfaces ?.
>Prefer separate hardware interfaces for firewall duty for added
>isolation. Virtual interfaces always seemed a bit of a hack to me...
>
>Chris

Not sure what you mean, here is my connect script for the Huawei 4G stick I bought from ebay:

root@raspberrypi:/usr/local/sbin# cat start_4g
#! /bin/sh

echo "using usb_modeswitch"
usb_modeswitch -s 15 -I -H -c /etc/usb_modeswitch.conf
sleep 2

ls -rtl /dev/ttyUSB*

echo "setting PIN"
huaweic  -d /dev/ttyUSB1  -b 9600  -p 1234

sleep 2

killall -KILL pppd

echo "starting pppd"
sleep 1
/usr/sbin/pppd /dev/ttyUSB1 call pct-hsdpa-3g-huawei-e220-kpn
sleep 10

echo "ifconfig"
ifconfig

echo "setting IP forwarding"
iptables -F
route add -net 192.168.0.0/16 dev eth0
echo 1 >/proc/sys/net/ipv4/ip_forward
ip_address=`ifconfig | awk '/P-t-P/{print $2}' | cut -d':' -f2`
iptables -t nat -A POSTROUTING ! -d 192.168.0.0/16 -o ppp0 -j SNAT --to-source $ip_address

echo ""
vnstat -i ppp0 -s

echo ""
/opt/vc/bin/vcgencmd measure_temp



I wrote 'huaweic', only using it here to set the PIN for the 4G USB stick,
but it can do SMS and some more things, it is on my website (at least the old version).
 http://panteltje.com/panteltje/newsflex/download.html#huaweic
For usb_modeswitch goolge for it for raspberry (apt-get IIRC)

This raspi is at 192.168.178.1
from there it goes to a 8 port switch, then and other 8 port switch and again an other 8 port switch.
Lots of computahs and other gadgets hang on it in the LAN, some with POE.
Each of those uses a huge number of entries iptables firewall.

vnstat shows usage, so Mbytes used....
All puters have gateway 192.168.178.1 specified.

The 'pct-hsdpa-3g-huawei-e220-kpn' script used by pppd is in fact modified for 4G and connects to the telco.

When I am not home I can take that 4G stick and simply insert it in my laptop
and then run an other script to connect.

Its simple, (once you figured it all out that is) and so far extremely reliable.

To start it all I just ssh -Y to 192.168.178.1 and type
start4g
leave the ssh connection on in terminal,
and check the network connectivity and speed:
 root@raspberrypi:~# ping -c 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=54 time=38.8 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 38.824/38.824/38.824/0.000 ms

To get my usage an other script, 'vnstat -i ppp0 -s'
root@raspberrypi:~# used

                      rx      /      tx      /     total    /   estimated
 ppp0:
       May '19      3.61 GiB  /  287.18 MiB  /    3.89 GiB
       Jun '19      2.45 GiB  /  199.62 MiB  /    2.64 GiB  /    3.20 GiB
     yesterday    132.50 MiB  /    8.15 MiB  /  140.66 MiB
         today    156.21 MiB  /    9.77 MiB  /  165.98 MiB  /     208 MiB

its easy.


 

Maybe 2 ports would help if you only had 2 computahs, but a switch is much easier.
I can switch of the modem / route raspi (go offline) and things will just keep working on the LAN,
because after a short while an ARP request will ask for the MAC addresses for a given IP,
and reroute any traffic via the switches.

That router raspi also knows the exact time...

?

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-24 09:24 +0000
  Re: New Raspberry Pi 4 presented today Winfield Hill <winfieldhill@yahoo.com> - 2019-06-24 03:01 -0700
    Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-24 10:21 +0000
      Re: New Raspberry Pi 4 presented today Don Kuenz <g@crcomp.net> - 2019-06-24 14:11 +0000
        Re: New Raspberry Pi 4 presented today The Natural Philosopher <tnp@invalid.invalid> - 2019-06-24 19:59 +0100
        Re: New Raspberry Pi 4 presented today Don Kuenz <g@crcomp.net> - 2019-06-25 21:17 +0000
          Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-26 04:58 +0000
      Re: New Raspberry Pi 4 presented today olaf <olaf@criseis.ruhr.de> - 2019-06-24 16:24 +0200
        Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-24 15:42 +0000
          Re: New Raspberry Pi 4 presented today Jeff Liebermann <jeffl@cruzio.com> - 2019-06-24 10:13 -0700
            Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-25 02:44 +0000
              Re: New Raspberry Pi 4 presented today Jeff Liebermann <jeffl@cruzio.com> - 2019-06-24 22:49 -0700
                Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-25 06:28 +0000
    Re: New Raspberry Pi 4 presented today olaf <olaf@criseis.ruhr.de> - 2019-06-24 16:21 +0200
  Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-24 14:31 +0000
    Re: New Raspberry Pi 4 presented today Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-24 08:44 -0700
      Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-25 02:35 +0000
  Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-24 20:12 +0100
    Re: New Raspberry Pi 4 presented today boB <boB@K7IQ.com> - 2019-06-24 19:14 -0700
      Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-25 17:40 +0100
        Re: New Raspberry Pi 4 presented today Rick C <gnuarm.deletethisbit@gmail.com> - 2019-06-25 10:22 -0700
          Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-25 19:46 +0100
    Re: New Raspberry Pi 4 presented today Jasen Betts <jasen@xnet.co.nz> - 2019-06-25 08:55 +0000
      Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-25 12:40 +0000
      Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-25 17:18 +0100
    Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-25 10:06 +0000
      Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-25 17:22 +0100
        Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-25 17:17 +0000
          Re: New Raspberry Pi 4 presented today Chris <xxx.syseng.yyy@gfsys.co.uk> - 2019-06-25 19:39 +0100
  Re: New Raspberry Pi 4 presented today bitrex <user@example.net> - 2019-06-24 22:28 -0400
    Re: New Raspberry Pi 4 presented today bitrex <user@example.net> - 2019-06-24 22:29 -0400
      Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-25 10:06 +0000
  Re: New Raspberry Pi 4 presented today Clifford Heath <no.spam@please.net> - 2019-06-25 14:03 +1000
    Re: New Raspberry Pi 4 presented today DecadentLinuxUserNumeroUno@decadence.org - 2019-06-25 05:48 +0000
    Re: New Raspberry Pi 4 presented today bitrex <user@example.net> - 2019-06-25 03:09 -0400
      Re: New Raspberry Pi 4 presented today Clifford Heath <no.spam@please.net> - 2019-06-25 17:38 +1000
        Re: New Raspberry Pi 4 presented today bitrex <user@example.net> - 2019-06-25 14:37 -0400
    Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-25 10:08 +0000
  Re: New Raspberry Pi 4 presented today Joerg <news@analogconsultants.com> - 2019-06-25 11:03 -0700
    Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-25 19:10 +0000
      Re: New Raspberry Pi 4 presented today Joerg <news@analogconsultants.com> - 2019-06-26 08:09 -0700
        Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-26 17:16 +0000
          Re: New Raspberry Pi 4 presented today Joerg <news@analogconsultants.com> - 2019-06-26 15:13 -0700
            Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-27 07:39 +0000
              Re: New Raspberry Pi 4 presented today Joerg <news@analogconsultants.com> - 2019-06-27 09:22 -0700
                Re: New Raspberry Pi 4 presented today Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-27 19:37 +0000

csiph-web