Networking

From BUGwiki

Revision as of 20:23, 31 May 2011 by Aturley (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Overview

NOTE: Make sure the AC adapter is plugged into your BUGbase when trying to use the Ethernet port on the BUGstinger

Your BUGbase has a variety of ways to connect to a network. By default, the bug will connect to the strongest open wireless access point. It will get a dhcp address automatically when connected to any router (both wireless or wired).

By the end of this section, you will be able to connect to the bug via the serial terminal, SSH, VNC, or the Dragonfly SDK. If you would like to set up a manual connection, follow the instructions below, then choose one of the pages above.

As of R2.1.0 (June 1, 2011), we are using connman as the underlying network controller. Andy Turley has done a great job wrapping the dbus calls in a java api, and writing an application on top of it. Below explains how to use his networking application.

Also as of R2.1.0, connman is not handling wireless modem networking. See the Networking#Wireless Modems section on how to get your modem connected.

Using the Networking Application

If you have a LCD module, you can use the Network app to configure basic networking. Click the Network icon in the task launcher.

NetApp01.jpg

Ethernet

Note: Make sure the AC adapter is plugged into your BUGbase when trying to use the Ethernet port on the BUGstinger

Launch the Network app and click on the Config tab. Ethernet will be selected by default. Change Auto to Manual and enter the appropriate values

NetApp10.jpg

Wireless

Launch the Network App and select an access point from the list.

NetApp03.jpg

Hit the Show button so you can see the passphrase being entered. Tap into the passphrase field and the keyboard will be brought up. The keyboard will cover the passphrase field, scroll down so the field is visible (arrow points at the scroll bar)

NetApp04.jpg

Enter in the passphrase and tap Connect

NetApp05.jpg

The app will show if you've made the connection successfully.

NetApp08.jpg

To see the Bug's IP address , click on the config tab and change the device selection from Ethernet to Wifi

NetApp11.jpg

Using connman at the Command Line

Connman has various utilities in /usr/lib/connman/test. The most useful ones are outlined below (running any utility with no arguments will display that utility's help):

See more connman documentation for other ways to connect.

Restarting

Many common issues can be solved by restarting the BUGbase network by running

/etc/init.d/connman stop
/etc/init.d/connman start

Wifi Troubleshooting

Cannot Connect to Wifi Access Point

Open a console connection to the BUG. Run the following command:

/usr/lib/connman/test/test-connman services

You should see a list of access points, along with the access point ID used by connman. Using the access point ID, run the following command:

/usr/lib/connman/test/test-connman connect <ID>

If you see a message about an "Input/Output Error" then continue with these instructions. Otherwise, please make sure you are using the correct network and password. Using the access point ID, run the following commmands:

/etc/init.d/felix stop
cd /usr/lib/connman/test
./test-connman remove <ID>
./test-connman passphrase <ID> <PASSPAPHRASE>
./test-connman connect <ID>
/etc/init.d/felix start

You should now be connected to the network.

Wireless Modems

Below assumes you're using a modem that's already been provisioned by your carrier (which is required for CDMA [Verizon, Sprint]).

Command Line tools

You may use pppd to establish a networking link using your modem. Your bug ships with this program, and there are scripts in /etc/ppp/peers/ the allow pppd to customize the connection for your carrier (which is required for most GSM carriers using APNs).

Example for AT&T

From the command line, type:

pon att &

If you look at the log for pppd (/var/log/pppd.log) you should see some information about the status of the connection's initiation.

Example for Verizon

From the command line, type:

pon cdma &

Note that it is cdma and not verizon. The script is also usable with other cdma carriers like Sprint.

GUI/Watcher tool

John Connolly has written an OSGi bundle called GSMConf, whose sole function it is to:

  1. Allow users to select from peers to connect to, graphically
  2. Choose whether to use this connection by default, if a modem is attached
  3. Watch the pppd linux process, so if it dies, it will be respaned using the peer selected.

Despite its name, GSMconf is technology agnostic, so it will work with cdma and GSM. It just parses /etc/ppp/peers/ for peers for users to select from.

If you've used the command line tools, you'll notice that sometimes you'll get modem hangups, or the modem itself drops off the network. Use the SDK to download the application, then send it to your BUG.

Select the icon for GSMConf, holding it down for the menu. Select "configure" to be prompted for the peers and whether to autoconnect. Upon subsequent reboots, GSMConf will automatically initiate the connection for you.

Further Reading

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Print/export