Network Client

The information here relates only to using the RPi as a network client. For more advanced settings (Access Point and routing) see the Access Point page.

Ethernet LAN

Using a simple network cable between the PC and RPi is enough to get them connected. Modern network cards will automatically switch mode and allow traffic with non-crossover cables.

Both devices will automatically assign an IP from the 169.254.x.x range. You still need need to find which one it is in order to connect.

Wi-Fi

Wi-Fi connection is on by default.

Use raspi-config to set up the SSID and password of the AP to which to connect. No reboot is necessary and the network is available straight away. Check the IP address with "ifconfig".

Disable

To disable Wi-Fi,

"sudo nano /boot/config.txt"

dtoverlay=pi3-disable-bt

dtoverlay=pi3-disable-wifi

BlueTooth

I have not found a way to reliably establish network over Bluetooth.

bluetoothctl

"sudo bluetoothctl" allows easy BT configuration. The following are commands inside bluetoothctl.

"power on" starts BT. "show" displays the adapter information.

To allow connections, turn discoverable and agent on. Connect, pair, and trust a device when initiating a connection from RPi.

The devices that are listed when starting bluetoothctl are already paired.

Other

"hciconfig" lists BT adapters on RPi. "hcitool scan" lists discoverable BT devices nearby. "hciconfig hci0 up" powers up the device.

Reference: BT commands,

SSH over Bluetooth

This is convenient for several reasors - security, leaving Wi-Fi adapter free for AP purpose. Create a PAN on RPi. From Windows, select Join Personal Area Network after right-clicking the Bluetooth icon. The devices need to be paired.

bt-pan script (link). Prerequisites: install `sudo apt-get install python-pip`, `pip install dbus`.

3G

Access to mobile networks is possible by using a USB dongle.

Huawei 1750

Running "lsusb" lists all connected USB devices. This should display the modem with vendor and product identifiers.

Instal "ppp" package. If using sakis3g, run the magic command:

sudo ./sakis3g connect USBMODEM="12d1:1001" APN="web.one.at"

or

sudo ./sakis3g --interactive connect
sudo ./sakis3g info
sudo ./sakis3g disconnect

Keep connection up

Options:

UMTSkeeper

umtskeeper is fairly easy to configure. As rc.local is said to be deprecated, systemd is recommended as the replacement.

Using systemd

As /etc/rc.local is being deprecated in favour of systemd, umtskeeper can be configured as a service. Create either "/etc/systemd/system/umtskeeper.service" or "/lib/systemd/system/umtskeeper.service". In the second case the service needs to be enabled first, while the services in /etc are auto-enabled. The second option might be preferable if you want to be able to disable the service.

Restart systemd with

sudo systemctl daemon-reload

to reload files and then start the umtskeeper service with

sudo systemctl start umtskeeper.service

Check the status with

sudo systemctl status umtskeeper

and also check "cat /var/log/umtskeeper.log" file.

Links:

    • Cell connection on RPi, full auto (link)
    • systemd rc.local replacement (link)

Using rc.local

I set all the options in a config file and add the following line to /etc/rc.local:

/home/me/umtskeeper/umtskeeper --conf /home/me/modem/umtskeeper.conf &>> /home/me/modem/umts-error.log &

umtskeeper will try the set DNS address (google.com) every 10 minutes to see if the connection is up. It will use sakis3g to establish the connection. It will also keep track of the IP address assigned and update the DDNS.

Wvdial

As the connection drops too often with umtskeeper, I also tried wvdial.

"wvdialconf" will create a configuration file for the modem and/or update if with the actual configuration.

    • Wvdial keep alive (link)

Links: