USB Hotplug Parameters and A Simple Linux USB Hotplug Script

USB Hotplug allows your system to detect a USB device has been inserted or removed and perform certain actions upon the USB device detection. The article below is largely inspired by http://linux-hotplug.sourceforge.net/?selected=hotplug which does not seem to work anymore. USB hotplugging involves: MODULE_DEVICE_TABLE support in the USB Device Driver API, so that a driver’s probe() routine is called only when it’s very likely to want to bind to a particular interface. USB always uses this. Support for invoking the hotplug helper (/sbin/hotplug by default) when devices are added or removed. This functionality is enabled only by CONFIG_HOTPLUG. That hotplug helper usually contacts a policy agent which handles the USB-level configuration or activation tasks appropriate to this device and the current system configuration. Boot-time configuration (“cold-plugging”) can be managed by the /etc/rc.d/init.d/hotplug startup script, if the “usbmodules” command line utility is available. (There is also a “diet hotplug” tool for use […]

Digital Signage Standard: Open Pluggable Specification (OPS)

A while ago, we discussed about Popai Digital Signage Standards, mainly focused on software and client/server interoperability. Intel has just released a new standard for Digital Signage: Open Pluggable Specification (OPS). Here’s the description of the specification on Intel website. The Open Pluggable Specification (OPS) helps standardize the design and development of digital signage devices and pluggable media players. Intel created the OPS to address digital signage market fragmentation and simplify device installation, usage, maintenance and upgrades. The OPS enables digital signage manufacturers to deploy interchangeable systems faster and in higher volumes, while lowering costs for development and implementation. Installing digital signage equipment based on Intel® architecture helps you implement scalable digital signage applications that can network easily with other equipment. This simplifies interoperability and application upgrades designed to meet the digital signage requirements of individual customers, while helping to future-proof technology investments. You’ll need to fill a form to […]

XIBO: An Open Source Digital Signage Server/Client

Today’s post will deal with Xibo (pronounced eX-E-bO), an open source, multi-display, multi-zone, fully scheduled digital signage solution. I’ll firstly give an overview and explain how to install the client and server in Windows XP. In another post, I’ll demo the system. The server can run on Windows or Linux and requires a web server (Apache / IIS), php5 and a MySQL database. The client can only runs on Windows 2000/Xp/Vista/7 and requires .NET Framework v3.5, Internet Explorer 7 or 8, Flash Player Version 9 or later, Windows Media Player 11 or later, Microsoft Powerpoint 2003 or later. As you can see from the client description, it won’t be able to run on Linux embedded systems, but it is still interesting to study this solution to see the content management flow, what this solution has to offer and how we get development idea from this solution.  An embedded client based […]

Finding a device IP Address

If you are developing software for an Ethernet (or Wifi) device, you’ll need to access the board for debugging and/or testing purpose. If your board does not have user interface or the serial port is not available, you’ll have to find the IP address (assuming it is using DHCP) before accessing the board thru telnet or ssh. A simple way to do that is to ping the broadcast address and check the arp table. > ping -b 192.168.0.255 WARNING: pinging broadcast address PING 192.168.0.255 (192.168.0.255) 56(84) bytes of data. 64 bytes from 192.168.0.246: icmp_seq=0 ttl=64 time=0.018 ms 64 bytes from 192.168.0.101: icmp_seq=0 ttl=64 time=0.217 ms (DUP!) 64 bytes from 192.168.0.246: icmp_seq=1 ttl=64 time=0.023 ms > arp -i eth0 arp -i eth1 Address                  HWtype  HWaddress           Flags Mask            Iface 192.168.0.103            ether   00:50:FC:00:00:01   C                     eth1 192.168.0.109            ether   00:13:20:01:01:01   C                     eth1 If you cannot find your device, it may be configured to […]

How to check open files for a process

While debugging your program, you may encounter the message “Too many open files”. One way to fix the issue could be to review your code and check open, fopen, socket and pipe calls are matched with close and fclose calls, but with large projects this may be cumbersome. A better way is to list the open files using the proc filesystem. I’ll use VirtualBox program as an example since this is running in our server. First, locate the process ID (PID): pgrep VirtualBox 3901 3950 Then list the file descriptor opened for process 3901 sudo ls -l /proc/3901/fd total 0 lrwx—— 1 root root 64 2010-10-05 14:52 0 -> /dev/pts/1 lrwx—— 1 root root 64 2010-10-05 14:52 1 -> /dev/pts/1 lr-x—— 1 root root 64 2010-10-05 14:52 10 -> pipe:[15825] l-wx—— 1 root root 64 2010-10-05 14:52 11 -> pipe:[15825] lr-x—— 1 root root 64 2010-10-05 14:52 12 -> pipe:[15829] […]

Quick guide to install Samba/CIFS in Linux

You may want to install Samba/CIFS in a Linux host to share files with other Windows computer or to use as a media server with a networked media player. If samba is missing, install it in the host machine (foomachine):

Create a new smb user:

Start / check status / restart samba service:

To make samba service run automatically at startup:

Type \\foomachine\foouser  in Windows Explorer and type the username foouser and the password to access your Linux files. To add other directories to share with samba, edit /etc/samba/smb.conf Resource: http://www.cpqlinux.com/samba.html Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

Script to convert Twitter RSS feeds into text

[Update Nov 2012: URLs such as http://twitter.com/statuses/user_timeline/759251.rss do not work anymore, but you can get a Twitter timeline RSS feed by using http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=xxxxx, where xxxxx is the screen name such as cnxsoft] We needed to convert Twitter RSS feeds to UTF-16 text for displaying them into a digital signage (That did not support RSS feed directly).  This digital signage supports regular http download, .e.g every 5 minutes. Here’s the script (called with crontab) we used for CNN News Twitter RSS feed. #!/bin/sh # CNN Twitter wget http://twitter.com/statuses/user_timeline/759251.rss sleep 10 cat 759251.rss | grep title | sed s/\<title\>// | sed s/\<\\/title\>// > cnn.txt rm 759251.rss iconv -f utf-8 -t UCS-2LE cnn.txt > cnn-utf16.txt cp cnn-utf16.txt /var/www/html/livepics/cnn.txt The resulting text file looks like: Twitter / CNN CNN: BREAKING NEWS: Military: Last U.S. brigade combat team leaves Iraq; 56,000 troops remain. Fifty-thousand set to stay past August 31. CNN: NY Gov. David Paterson […]

Exit mobile version