Cradlepoint Escape Spécifications Page 52

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 100
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 51
I’ve shown my review unit to my wife and every other nerd
I know, and the response has been the same each time. At
first they don’t know what it is. After I explain what it is and
what it can do, they simply can’t believe it. Typically, they leave
saying, “that is just too cool!” And it is.
As I mentioned earlier, the BUG exposes all of its function-
ality via a Java API. I have to confess that I’m not a big fan of
Java, but I understand that Java is a language many people
already know and almost anyone can learn. Java also is an
open standard, and Bug Labs, thankfully, is all about open
standards, as I discuss later in this article.
Once connected and configured, the BUG integrates seam-
lessly with the Eclipse IDE. After following a few simple
instructions, I was able to get Eclipse to recognize my BUG
and all of the installed modules. Eclipse then presented me
with a programming and hardware integration environment
that even I could work with, and I’m not a Java programmer.
There are lots of free source code examples available from the
Bug Labs support site. I was able to download and install a
calculator application, as well as a digital camera application
within minutes. The example code is well written, and the API
seems to be intuitive. The Bug Labs Web site has a lot of doc-
umentation for the API. I’ve never had a compelling reason to
become proficient in Java—until now. A nerd like me could
have a lot of fun with this device.
Bug Labs even provides a virtual BUG environment avail-
able from within Eclipse. The virtual environment allows you to
plug modules in to a simulated BUG and run Java-based appli-
cations directly on the virtual device. The virtual BUG behaves
almost exactly like a real BUG. Obviously, the GPS module, for
example, provides bogus data, but it’s still usable for software
development and testing. You don’t even have to own a BUG
in order to develop software for it.
As I’m not a Java programmer and I don’t use Eclipse, I was
very interested in other ways to interact with the BUG. Getting it
connected to my network wasn’t hard at all. The device’s base
unit doesn’t have Ethernet or Wi-Fi capability; it connects to the
network via USB. This meant that I had to upgrade the kernel
on my workstation to enable USB networking, which presents
itself as usb0 and acts just like any other network device. Note
that, like most USB devices, the usb0 device won’t be available
until the BUG is connected and has finished booting up.
Once the BUG is booted, it runs the TWM window manager.
Configuring my workstation to communicate with it was
trivial, though the documentation on Bug Labs Web site made
it a bit more complicated than necessary. The Web site indicated
that you needed to install ifplugd, which I think is a neat
program, but it’s not needed in this case. All you have to
do is configure the usb0 device with the right IP address
and netmask. What I did was:
ifconfig usb0 10.10.10.1 netmask 255.255.255.0
The BUG has 10.10.10.10 as its IP address and expects to
find its default gateway at 10.10.10.1. My workstation had to
be configured to forward network traffic:
echo 1 > /proc/sys/net/ipv4/ip_forward
After that, I was able to ssh into the device:
Use root as the default password and change it to some-
thing more secure. You also should configure /etc/resolv.conf
on the BUG so that DNS works properly.
Once you’ve logged in, you will be presented with a
BusyBox prompt. You should feel free to take a look around.
Much of what you see will be familiar to you. The fun begins
when you start interacting with the application manager:
telnet localhost 8090
Typing
help
gives a list of commands that you can send to
the application manager. To spare you the suspense, I’ll tell
you that you can use the install command to download an
application from the Internet. For example:
install http://www.buglabs.net/application/download/43
This installs the BasicCalculator application, which is avail-
able from the Bug Labs Web site. By using the bundles com-
mand, you can determine which ID has been assigned to this
application. In my case, the application was given the ID of 30.
Then, you start the application using:
start 30
Shortly after issuing this command at the prompt, you will
see a four-function calculator on the touchscreen—assuming
you have the touchscreen module installed. I’ve found that
using my fingers to interact with the touchscreen isn’t extremely
accurate. Once I dug up a stylus from one of my PDAs, I was
able to use the BUG touchscreen with little or no effort.
Several applications are available from the Bug Labs Web
50 | august 2008 www.linuxjournal.com
FEATURE The BUG
Vue de la page 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 99 100

Commentaires sur ces manuels

Pas de commentaire