• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  General Category / General Discussion / Re: How can i connect a CCTV camera to guru plug...??? on: July 15, 2011, 09:40:04 AM
It's pretty easy to connect a USB Webcam to the Plug and grab images from it.  You don't need a capture card.

A while back I wrote a little article about how to capture images and how to view them over the web using http://sensr.net.  Maybe you'll find this useful.

http://www.plugcomputer.org/plugforum/index.php?topic=2198.msg12654#msg12654


-T
2  General Category / General Discussion / Want to buy a Plug. Ionics failed to ship. Other ideas? on: March 15, 2011, 09:35:08 AM
I wanted to buy a PlugComputer that had WiFi built-in.  The Ionics Stratus is one such model and I have used that one happily in the past.

Attempted to order online with Ionics and ran into all sorts of complications with the payments.  The order never shipped and was eventually cancelled.

Does anyone have a good recomendation for making a moderate (5 units) order of PlugComputers that have WiFi built-in?

I'm in the US.

Thanks,
T
3  General Category / General Discussion / Re: Bluetooth support, Ionics Stratus, /usr/bin/mute-agent? on: November 15, 2010, 08:38:43 AM

# hciconfig -a
hci0:   Type: SDIO
        BD Address: 00:21:19:EA:61:03 ACL MTU: 1021:7 SCO MTU: 240:3
        UP RUNNING PSCAN ISCAN
        RX bytes:1415 acl:0 sco:0 events:34 errors:0
        TX bytes:1008 acl:0 sco:0 commands:34 errors:0
        Features: 0xff 0xef 0x8d 0xfe 0x9b 0xff 0x79 0x83
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 2.1 (0x4) HCI Rev: 0x8300 LMP Ver: 2.1 (0x4) LMP Subver: 0x501
        Manufacturer: Marvell Technology Group Ltd. (72)

4  Hardware and U-Boot firmware / Hardware / I want to make a BEEP sound on: October 23, 2010, 08:02:31 AM
I'm building a consumer-oriented internet appliance.  A beep sound would be useful for error notifications.  I don't want any audio other than this.

I know how to flash the LEDs.  How can I make a beep sound.

Any ideas?

-T
5  General Category / General Discussion / Re: [guruplug] Wifi client - Blonde moment? on: October 05, 2010, 02:39:27 PM
I don't see anything obviously wrong in your config, but you can try running wpa_supplicant in the foreground with debugging on to see if you get any helpful messages.


wpa_supplicant -i wlan0 -c my.conf -d
6  General Category / General Discussion / Re: wpa_supplicant and WEP on: October 05, 2010, 02:22:54 PM
The issue discussed in this thread was whether wpa_supplicant could be used to attach to a WEP network.

To date, I have been unsuccessful connecting to a WEP network using wpa_supplicant, but have been just fine using iwconfig commands.

After googling around for a while, I found at least a few reports of the same problem on various systems and configurations.  Here is one that I found.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594894
7  General Category / General Discussion / Re: wireless setup on Ionics PlugComputer Plus on: September 14, 2010, 11:46:43 AM
On my Ionics, I need to run

  /usr/bin/wlan.sh

to create eth2.  From there I can run the iwconfig commands.
8  General Category / General Discussion / Re: wpa_supplicant and WEP on: September 09, 2010, 03:48:39 PM
Thanks for the response and pointers - i've learned something about /etc/network/interfaces.

The reason I want to use wpa_supplicant with WEP networks ... is because I've seen examples showing it :-)
9  General Category / General Discussion / wpa_supplicant and WEP on: September 07, 2010, 07:54:43 PM
Question: should wpa_supplicant be able to connect to a WEP network?

I've had success connecting my Plug to both a WPA and WEP network.  For the WPA network,
I use wpa_supplicant.  For the WEP network is use iwconfig commands.  I've read that wpa_supplicant should be able to support the WEP network too, but it doesn't seem to work.

For your information, here is how I connect the Plug to the WEP network.  (Note: the keys in the below examples are not real.)


# /usr/bin/wlan.sh
# ifconfig eth2 up
# iwconfig eth2 mode managed key D5773385BB
# iwconfig eth2 essid linksys044
# dhclient


This successfully gets my plug on a network that uses WEP.

For using a WPA network, I've done the following.

# /usr/bin/wlan.sh
# ifconfig eth2 up
# wpa_passphrase "My Network" 09116154321 > wpa.conf
# cat wpa.conf
network={
        ssid="My Network"
        #psk="09116154321"
        psk=00f33af9c7a7106804a15e287b9fffff51c8e463a886e31811ffff4db00c0bf7
}
# wpa_supplicant -i eth2 -c wpa.conf -B
# dhclient eth2


This worked in getting my Plug on a WPA network.

I've read that I should be able to make a conf file for a WEP network that looks like this:

network={
        ssid="linksys044"
        key_mgmt=NONE
        wep_key0=D5773385BB
}


and that I should be able to use it with wpa_supplicant

# wpa_supplicant -i eth2 -c wep.conf -B
# dhclient eth2


This last variation doesn't work for me.  Anyone have any ideas or experience?

I'm using Debian.


# uname -a
Linux debian 2.6.31.8 #1 PREEMPT Wed Apr 21 11:23:23 PHT 2010 armv5tel GNU/Linux
10  General Category / General Discussion / Re: Success: webcam/IP-cam with image upload on: September 02, 2010, 02:39:15 PM
A good idea!  I edited it out.
11  General Category / General Discussion / Success: webcam/IP-cam with image upload on: September 02, 2010, 12:12:01 PM
I wrote a little script that grabs images from a USB webcam and continuously uploads them to an image archiving site via FTP.  This turns the Plug into a little IP Surveillance camera connected to a cloud-based surveillance site.  I've also found this technique useful debugging as it allows me to view JPGs produced by Plug v4l software without needing to install GUI tools on the Plug.

About the script and my system.  Here is my system:

Linux debian 2.6.31.8 #1 PREEMPT Wed Apr 21 11:23:23 PHT 2010 armv5tel GNU/Linux

It already had ffmpeg and ftp installed.  I needed to install "dov4l" to control the video parameters.

apt-get install dov4l


About the camera.  I think only UVC (USB Video Class) cameras will work this way.  Here is the information printed in the console when I plug in my camera:

usb 1-1.2: new high speed USB device using orion-ehci and address 4
usb 1-1.2: configuration #1 chosen from 1 choice
uvcvideo: Found UVC 1.00 device VF0610 Live! Cam Socialize HD (041e:4080)
input: VF0610 Live! Cam Socialize HD as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input1
4:3:1: cannot get freq at ep 0x82


A note about Sensr: Sensr is an image upload service.  It is a pure cloud-based solution for the storage and viewing of image streams.  You should probably go to Sensr and get your own account and allocate a new camera with your own FTP settings.  Once created, you can view the images from your camera on http://sensr.net.


Here is my script.  I think it is mostly self-explanatory.  I'm just learning about v4l, but I thought this was interesting and useful.


#!/bin/bash
#
# Prerequisites:
#   apt-get install dov4l
#   a UVC (USB Video Class) webcam

set -x

# Sensr FTP information
# View at http://sensr.net/
HOST=XX.sensr.net
USER=camXXX
PASS=XXXXXXXXXX

# Exit by hitting ^C
trap 'echo EXIT WEBCAM; exit 0'  SIGINT SIGTERM

# Get latest added video device
DEV=`ls /dev/video* | tail -1`

# Set image size
W=640
H=480

# Set size, framerate
dov4l -d ${DEV} -s ${W},${H}
dov4l -d ${DEV} -f 25

for (( ; ; ))
do

    # Get two frames.  First frame is usually dirty.
    ffmpeg -f video4linux2 -s ${W}x${H} -y -r 1 -t 2 -i ${DEV}  -f image2 "x%02d.jpg"

    if [ -f x02.jpg ]; then

        # Upload to Sensr via FTP method
   ftp -d -v -n ${HOST} <<EOF
quote user ${USER}
quote pass ${PASS}
binary
put x02.jpg
quit
EOF

   rm x02.jpg

    else
   sleep 1
    fi
done

exit 0


12  General Category / General Discussion / Ionics Stratus, Mac OSX 10.5 - Serial port console success on: August 31, 2010, 08:00:55 AM
I had previously had my serial port on my Mac OSX 10.5 (Leopard) machine working properly with a GlobalScale SheevaPlug.  I recently got an Ionics Stratus, the serial port didn't work properly.  Both are FTDI, but I needed to upgrade the driver and edit the VendorId and ProductId.  Perhaps these notes will help someone with a similar setup.

- I downloaded The "Oct 21 2009" driver from here: http://www.ftdichip.com/Drivers/VCP.htm.  Then I installed it.

- I plugged in the plugcomputer serial cable and used the system profiler to see what was on the USB bus.  From there I could see the VendorID and ProductID.

- I edited /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist to set the VendorID and ProductID to what I had.  Here is what mine looks like now.


      <key>SheevaPlug JTAGKey FT2232D A</key>
      <dict>
        <key>CFBundleIdentifier</key>
        <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
        <key>IOClass</key>
        <string>FTDIUSBSerialDriver</string>
        <key>IOProviderClass</key>
        <string>IOUSBInterface</string>
        <key>bConfigurationValue</key>
        <integer>1</integer>
        <key>bInterfaceNumber</key>
        <integer>0</integer>
        <key>idProduct</key>
        <integer>258</integer>
        <key>idVendor</key>
        <integer>7180</integer>
      </dict>
      <key>SheevaPlug JTAGKey FT2232D B</key>
      <dict>
        <key>CFBundleIdentifier</key>
        <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
        <key>IOClass</key>
        <string>FTDIUSBSerialDriver</string>
        <key>IOProviderClass</key>
        <string>IOUSBInterface</string>
        <key>bConfigurationValue</key>
        <integer>1</integer>
        <key>bInterfaceNumber</key>
        <integer>1</integer>
        <key>idProduct</key>
        <integer>258</integer>
        <key>idVendor</key>
        <integer>7180</integer>
      </dict>



- I restarted the system.

- I can access the Plug console with % screen /dev/tty.usbserial-00001004B 115200.

T
13  General Category / General Discussion / Re: Bluetooth support, Ionics Stratus, /usr/bin/mute-agent? on: August 31, 2010, 07:39:58 AM
I posted this question and since it didn't receive any replies, I had to figure it out for myself.  Here is what I learned: I'll describe both what "mute-agent.py" does and an *error* in the default Bluetooth configuration that prevents it from working properly.

BlueZ is the preferred Bluetooth stack implementation included in Linux 2.6. (http://www.bluez.org/).  To "pair" with a bluetooth computer, a little program that prompts the user for permission is required.  This program is a bluetooth pincode "agent."  In many Linux distributions this program is called /usr/bin/simple-agent.py. (Here's a pretty good explanation of it: http://wiki.openmoko.org/wiki/Manually_using_Bluetooth).

The Plug doesn't have a default window environment, so there isn't a standard way to prompt a user for permission.  Instead, the development Plug has a simplified agent that accepts pairing with anyone and offers a fixed pincode of "0000."  This type of bluetooth agent has been described here: http://it-result.me/bluetooth-network-on-linux/

Summary: in most Linux distributions the Bluetooth agent is called "simple-agent.py"  Our Plug distribution with fixed pincode and no prompting for permission is called "mute-agent.py."

These two articles helped me to understand what the agent was supposed to do.  However, once understanding this I was still unable to "pair" with the Plug.  If I initiated pairing from a Mac I observed the following error in /var/log/syslog.

Aug 31 16:26:24 debian hcid[1609]: Agent replied with an error: org.freedesktop.DBus.Error.AccessDenied, Rejected send message, 1 matched rules; type="method_call", sender=":1.0" (uid=0 pid=1609 comm="/usr/sbin/hcid -x -s ") interface="org.bluez.Agent" member="RequestPinCode" error name="(unset)" requested_reply=0 destination=":1.1" (uid=0 pid=1768 comm="/usr/bin/python /usr/bin/mute-agent "))

For some reason, the mute-agent was not given permission by dbus.

Upon more reading, I found some information about configuring permissions for dbus.  The file /etc/dbus-1/system.d/bluetooth.conf grants permissions for specific interfaces.  Our mute-agent is using the interface "org.bluez.Agent" and it was not granted permission in the distributed bluetooth.conf.  (I'm guessing that in other versions of BlueZ utilities, the agent is named "PasskeyAgent" or "AuthorizationAgent".  Ours is named "Agent" and is not granted.)  I added the line below marked with !!!!.  The I restarted the Plug.

/etc/dbus-1/system.d/bluetooth.conf


  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>

    <!-- allow root to send to agents -->
    <allow send_interface="org.bluez.PasskeyAgent"/>
    <allow send_interface="org.bluez.Agent"/>    !!!!
    <allow send_interface="org.bluez.AuthorizationAgent"/>
  </policy>


Hope this helps someone else new to working with Bluetooth on Linux.

-T

14  General Category / General Discussion / Bluetooth support, Ionics Stratus, /usr/bin/mute-agent? on: August 27, 2010, 06:45:16 PM
I recently received an Ionics Stratus - it has Bluetooth built-in.  I'm interested in learning how to program with Bluetooth.  Ideally I'd like to figure out how to pair with the Plug on another Linux machine and send some character strings over a bluetooth serial port.  I'm hoping this can be the beginning of learning about using Bluetooth.

Right now I am investigating what software is available on the Plug.  I've found hciconfig, hcitool, sdptool and rfcomm.  /usr/bin/hcid is running.

There is a Python program, started up by script "/init_setup.sh" that is called mute-agent.py.  This Python program listens for DBUS commands related to Bluetooth and does ... something.  I don't really know what it does and am looking for some information.

Anyone know what it does?

Best regards,
Tom


 
15  Linux Stuff / Kernel / Re: Build Module on: June 14, 2009, 06:32:49 AM
Another success story:

I had a USB device that has a SiliconLabs cp210x UART in it and I wanted to get the /dev/ttyUSB* serial device going.  I had the default 2.6.22.18 kernel.  After many false starts trying "modprobe" I found this note here and got http://sheeva.with-linux.com/sheeva/README-2.6.22.19.  Upon rebooting, the device "/dev/ttyUSB0" showed up and I could use it.

Note: I had to "apt-get install wget" before using the upgrade/flash script.

-T
Pages: [1]