User Tools

Site Tools


mobile-video

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mobile-video [2009/03/04 13:35]
hytham
mobile-video [2009/08/25 14:40] (current)
hytham
Line 1: Line 1:
-**Goals for Spring 2009**+**Goals for Spring/​Summer ​2009**
  
 - Develop a GUI to allow for easy demo of videostreaming between two N800s. - Develop a GUI to allow for easy demo of videostreaming between two N800s.
-dyndns will be used to update IP of device +  * dyndns will be used to update IP of device 
-splitsockets kernel will be loaded +  ​* ​splitsockets kernel will be loaded 
-motion jpeg (for video) and raw pcm (for audio) will be the base codecs; allow user to select alternative codecs in the future +  ​* ​motion jpeg (for video) and raw pcm (for audio) will be the base codecs; allow user to select alternative codecs in the future 
-powertop or equivalent tool will be enabled to measure power usage (and provide estimated usage time) when video conferencing is used +  ​* ​powertop or equivalent tool will be enabled to measure power usage (and provide estimated usage time) when video conferencing is used 
-simulate power measurements with splitsockets and compare to measurements of basic streaming+  ​* ​simulate power measurements with splitsockets and compare to measurements of basic streaming 
 +- Setup Wifi/​Bluetooth bridging/​tethering support.
  
 **Completed Tasks** **Completed Tasks**
 +
 - Tested ddclient using development environment;​ updated uw-wings dyndns account - Tested ddclient using development environment;​ updated uw-wings dyndns account
 +
 +- Started writing SplitSockets streaming application for N800 to redirect packets from localhost UDP to a remote client over SplitSockets.
 +  * Debugged SplitSockets on N800 kernel. Packets are being detected by the SplitSockets proxy sporadically;​ turns out N800 802.11 driver is tuned to use 802.3 v1 headers, which require the length field to be populated correctly. N800 802.11 driver (and low-level kernel network driver) must be forced to accept v2 headers to continue with the current SplitSockets implementation. **Issue Resolved: By setting the minimum SplitSockets ID to be 1536, the N800 kernel interprets the packets to be jumbo frames / v2 headers and forwards them without any issues.**
 +
 +- CVS Repository setup on personal CS account (hytham). ​ Equivalent linux kernel from Maemo'​s site was imported as the initial version, and the SplitSockets code modifications were added to the repository. ​ See below for CVS module and tag information.
  
 **Steps to Initialize Nokia N800 for Video Streaming / SplitSockets** **Steps to Initialize Nokia N800 for Video Streaming / SplitSockets**
Line 31: Line 38:
   - Install the following packages for video and audio streaming support (//italic// = optional):   - Install the following packages for video and audio streaming support (//italic// = optional):
     * apt-get install gstreamer-tools     * apt-get install gstreamer-tools
 +    * apt-get install gstreamer0.10-plugins-extra
     * //apt-get install gstreamer0.10-plugins-base-ogg//​     * //apt-get install gstreamer0.10-plugins-base-ogg//​
-    * //apt-get install gstreamer0.10-plugins-extra//​ 
   - For basic video streaming (transmit, no audio), use the following command (insert destination ip address in $1 and port number in $2):   - For basic video streaming (transmit, no audio), use the following command (insert destination ip address in $1 and port number in $2):
     * gst-launch v4l2src ! video/​x-raw-yuv,​framerate=8/​1,​width=320,​height=240 ! ffmpegcolorspace ! jpegenc ! udpsink host=$1 port=$2     * gst-launch v4l2src ! video/​x-raw-yuv,​framerate=8/​1,​width=320,​height=240 ! ffmpegcolorspace ! jpegenc ! udpsink host=$1 port=$2
   - To receive video (no audio), use the following command (insert port number in $1):   - To receive video (no audio), use the following command (insert port number in $1):
     * gst-launch udpsrc port=$1 ! jpegdec ! xvimagesink     * gst-launch udpsrc port=$1 ! jpegdec ! xvimagesink
 +  - The first time the camera activated, a basic streaming app may appear. ​ Just go to the settings and uncheck the box to prevent it from opening when the camera is activated.
 +  - To use Splitsockets,​ the following initial config steps are required (use appropriate interface name and Splitsockets server mac address):
 +    * echo "​wlan0"​ > /​proc/​sys/​net/​splitsockets/​interface_name
 +    * echo "​00:​12:​17:​63:​1D:​4E"​ > /​proc/​sys/​net/​splitsockets/​serv_mac_addr
  
 +**Testing SplitSockets**
 +  - Checkout modified kernel per instructions below. ​ Type '​make'​ within scratchbox to compile the kernel, and use the above instructions for flashing it into the device.
 +  - <fill in with link to Josh's splitsockets stuff>
 +
 +**Bluetooth PAN Support**
 +  - Go to the Application Manager and search for maemo-pan, bluez-utils,​ and bluez-utils-test. ​ Install these packages.
 +  - Go to the Control Panel, select Bluetooth under Connectivity,​ and check the boxes "​Bluetooth on:", "​Visible:",​ and fill in a unique name under "My device'​s name:"​.
 +  - Open a terminal and ssh to root.
 +    * Use '​hciconfig'​ to list available Bluetooth adapters.
 +    * Use '​hcitool scan' to scan for Bluetooth devices in your local vicinity.
 +  - To configure the PAN between two or more devices, designate one of the devices as the Gateway Node (GN) and have the rest of the devices connect to the AP using the MAC address (retrieved using hciconfig or hcitool scan).
 +    * pand --listen --mode GN
 +    * pand --connect 00:​00:​00:​00:​00:​00
 +    * After a few seconds, bnep0 will show up in '​ifconfig -a' of both devices. ​ Assign static IPs to each interface and you should be able to ping!
 +  - Note: the Linksys USBBT100 v2 has a Broadcom chipset and as such requires proprietary firmware (which as of now is hard to find or unavailable) for compatibility with bluez v4.0.  As a result, downgrade bluez-utils to v3.0 (which seems to function with the USBBT100 reasonably well). ​ As of now, I am also having issues setting the USBBT100 as the GN, so setup the N800 as the GN and the Ubuntu VM as a connecting node.  If you notice that the USBBT100 isn't showing up when doing a scan from another device, type '​hciconfig hci0 iscan'​.
 +
 +**Ad-Hoc Wifi Network on N800**
 +  - Disconnect from any wifi network.
 +  - Go to a root terminal and type the following commands.
 +    * ifconfig wlan0 192.168.1.1 255.255.255.0
 +    * iwconfig wlan0 mode Ad-Hoc essid N800Gateway key off
 +
 +**SOCKS Proxy**
 +  - Setup one N800 as a GN and connect the second N800 to the GN (see above for Bluetooth PAN support).
 +  - Assign static IPs to both N800s (i.e. 10.0.0.1 and 10.0.0.2).
 +  - Connect the second N800 to a valid wifi network, and setup the first N800 as an Ad-Hoc wifi network.
 +  - Establish a SOCKS ssh session from the first N800 to the second N800.
 +    * ssh -D 8080 10.0.0.2
 +  - To browse the web on the first N800, open Web and browse to about:​config. ​ Type the following into the Name and Value fields at the top of the page.
 +    * network.proxy.socks localhost
 +    * network.proxy.socks_port 8080
 +    * network.proxy.socks_remote_dns true
 +    * network.proxy.type 1
 +  - Note: network.proxy.type must be set to 1 for every new window of the browser. ​ Bookmark the page after setting it to allow quick access.
 +  - To browse the web on a wifi client connected to N800Gateway,​ setup Firefox with the above proxy settings and establish an ssh port forwarding session using the following command. ​ Note: you may have to set a static IP on the client.
 +    * ssh -f root@192.168.1.1 -L 8080:​127.0.0.1:​8080 -N
 +
 +**CVS Module / Tag Information**
 +
 +Use the following environment parameters to setup CVS repository access:
 +  * CVS_RSH=ssh
 +  * CVSROOT=:​ext:<​username>​@best-emperor.cs.wisc.edu:/​u/​h/​y/​hytham/​public/​cvs
 +
 +__kernel-image-2_6_21__
 +  * initial-revision : initial import of maemo kernel 2.6.21
 +  * splitsockets_0_0_1:​ SplitSockets addition taken from Josh's tarball
 +  * splitsockets_0_0_2:​ Fixed bugs and forced Ethernet v2 header (using minimum SplitSockets ID of 1536)
 +  * splitsockets_0_0_3:​ Modified SplitSockets to not wait for ACK after sendmsg. ​ This feature is to make UDP transmissions more efficient.
  
 **Links** **Links**
  
 http://​cs707.pbwiki.com/​Videoconferencing%20and%20Power%20Management%20on%20Mobile%20Devices http://​cs707.pbwiki.com/​Videoconferencing%20and%20Power%20Management%20on%20Mobile%20Devices
 +
 +http://​wiki.maemo.org/​Bluetooth_PAN
 +
 +http://​wiki.maemo.org/​Bluetooth_networking
mobile-video.1236195314.txt.gz · Last modified: 2009/03/04 13:35 by hytham