1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Basic-Talk initial testing

Discussion in 'Fred's House of Pancakes' started by bwilson4web, Jun 1, 2013.

  1. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,661
    15,662
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus


    My wife has not really taken to cellphones and was never a fan of wireless phones. She prefers a POTS instrument. So I picked up a Basic-Talk from WalMart.
    [​IMG]
    Registration was straight forward. So the next problem was connecting a copper ethernet.

    At home, we're using a T-Mobile "hotspot", G4 cell-to-WiFi unit:
    [​IMG]
    No copper ethernet interface.

    My first attempt was to use our MacBook sharing the WiFi with the copper ethernet port. No luck, so I switched to an IBM ThinkPad running Debian Linux:
    • NAT - already had it working
    • DHCP - had to add it as the Basic-Talk insists on using bootp/DHCP to get an IP address and address of the DNS interface (i.e., the hot-spot IP)
    • enable ip_forward - the last step, it connected and we're up
    It rides on our broadband and operates a POTS instrument, ring and call. I don't have a caller-ID POTS phone in the house but this is a claimed capability. Too early to call it one way or the other. However, our last phone bill was $30/month and this unit claims less than $10/month. I may have to tweak the DHCP setup and verify a cold start brings everything up. But so far, it looks to be a practical solution.

    For our purposes, a POTS like, cell-phone would meet my wife's expectations. Just transfer the SIM card and have a happy. But 'she who must be obeyed' gave me an ultimatum so the problem has been solved . . . good enough.

    I will get a small UPS unit and organize a wireless setup with a single wall plug. The laptop and T-Mobile hot-spot both have batteries but the 12V powered, Basic-Talk does not. . . . More toys.

    Bob Wilson
     
    xs650 likes this.
  2. Red09

    Red09 Junior Member

    Joined:
    Jan 14, 2012
    57
    26
    1
    Location:
    Creston, BC
    Vehicle:
    2013 Prius Plug-in
    Model:
    Technology
    I went this route Welcome | Straight Talk from Wallmart.

    With a little inverter she can put it in the van and have her POTS on the road. Works good so far. It has a built in battery but we have not tested how long it will last.
     
  3. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,661
    15,662
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    I think it is great to have so many options. In effect AT&T (formerly Bell South) is one of the best advocates for their competition . . . T-Mobile being our choice. So this morning, I've been fixing everything to come up after a reboot:
    1. WiFi to come up after reboot without having to login
    2. Find the WiFi device and the DNS IP address
    3. Configure a static network on the copper, eth0 interface
    4. DHCP to efficiently manage the copper ethernet
    5. NAT required iptable setup
    6. enable ip_forward part of reboot
    Using GNOME, System->Preferences->Network Connections->Wireless, select the ESSID and 'edit' find the WiFi and enable "Available to all users" and hit 'Apply'. This sets the WiFi interface to come up automatically upon reboot without having to login. The IBM ThinkPad has a WiFi antenna icon and if this works, it will light by itself after a reboot.

    First, find the WiFi interface and what it is using for the DNS server:
    [pre]#
    root@bwilson:~# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    192.168.254.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
    # cat /etc/resolv.conf
    # Generated by NetworkManager
    nameserver 192.168.0.1[/pre]
    So we find the WiFi is using device "eth1" and the DNS server address is the same as the WiFi routing interface. They can be different so check as these are needed later.

    In /etc/network, edit 'interfaces' to make it a static network:
    [pre]#
    auto eth0
    iface eth0 inet static
    address 192.168.254.254
    netmask 255.255.255.0
    #[/pre]

    For DHCP, edit /etc/dhcp/dhcpd.conf so the Basic-Talk can get an IP address and name server IP, the default gateway on the WiFi network:
    [pre]#
    option domain-name-servers 192.168.0.1; # Found ad-hoc after connecting to WiFi
    option routers 192.168.254.254; # The gateway of the eth0 interface
    default-lease-time 36000; # A 10hr interval
    subnet 192.168.254.0 netmask 255.255.255.0 {
    range 192.168.254.240 192.168.254.253; # Just the upper region
    }
    #[/pre]

    There is only one iptable entry needed to make NAT work correctly:
    [pre]#
    cd /etc/network/if-pre-up.d
    ls -alh iptables
    -rwxr-xr-x 1 root root 119 Jun 2 08:28 iptables
    cat iptables
    #!/bin/bash
    #
    # Created to make iptables entry for Talk-Basic
    #
    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
    #[/pre]
    We know from ad hoc observations that the WiFi interface is generated on eth1. This statement enables NAT to use the eth1 address as the 'alias' for all other network devices.

    The last key is making sure IP forwarding (routing) is enabled:
    [pre]#
    egrep ip_forward /etc/sysctl.conf
    net.ipv4.ip_forward=1[/pre]

    Like most things Linux, the descriptions found on the net frequently try to cover every option leaving one more confused than when starting. I wanted a minimalist approach even if specific to an IBM ThinkPad running Debian Linux. No need to 'go nuts' with a lot of wasted conditionals.

    Bob Wilson
     
  4. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,661
    15,662
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    We are starting to see some abnormal network saturation events. I'm just starting the debug but for now, the ThinkPad is turned off until I can diagnose and come up with a fix.

    There are network failure modes that can involve run-away error handling. The Voice-over-IP should be using UDP packets and there may be pathological modes involved. Regardless, it looks to be a 'learning experience.

    Bob Wilson
     
  5. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,661
    15,662
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Turns out the problem was the HotSpot location and the recently 'leafed' trees. Relocating it and service looks pretty good!

    But in the meanwhile, found this puppy:
    [​IMG]
    (Bestek Wireless Phone)

    GSM compatible, it works great on T-Mobile. Just transfer the SIM card and voila, a desktop-style, cellphone. Just the thing for folks who want larger digits and 'no cords.' Got mine from Ebay for ~$35 and it looks to be a keeper.

    Bob Wilson
     
  6. SageBrush

    SageBrush Senior Member

    Joined:
    Jun 4, 2008
    11,627
    2,531
    8
    Location:
    Southwest Colorado
    Vehicle:
    2012 Prius v wagon
    Model:
    Two
    That is a lot of work just to stay in the 1970s.
    If my wife had the same aspirations I would wish her all the best in her networking endeavors, and head out to PriusChat to play.
     
  7. bwilson4web

    bwilson4web BMW i3 and Model 3

    Joined:
    Nov 25, 2005
    27,661
    15,662
    0
    Location:
    Huntsville AL
    Vehicle:
    2018 Tesla Model 3
    Model:
    Prime Plus
    Well I did meet her in 1977.

    Bob Wilson