Linux Scripts to find Public IP Address

In some cases, you may need to know your public IP or the public IP of a server behind a NAT (e.g. for remote SSH login) if the IP is assigned dynamically as is the case for PPPoE connections. Here are several ways to find your public IP in Linux using the shell. 1. Using curl (almost too simple) curl -s http://www.whatismyip.org 2. Using wget wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’ 3. Using lynx lynx -dump checkip.dyndns.org If you have access to a web browser, you can simply use http://www.whatismyip.org, http://checkip.dyndns.org or http://www.moanmyip.com. 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

Linaro: Embedded Linux for ARM

Linaro is a Not For Profit (NFP) engineering organisation that works on Linux based open source software and tools. The organisation focuses on the ARM platform, mainly ARM v7A architecture, for example ARM Cortex-A8 or dual-core Cortex-A9 processors and is sponsored by ARM, Freescale, IBM, Samsung, ST-Ericsson, and Texas Instruments. The purpose of Linaro is to reduce the number of different Linux kernel for the ARM platform. They plan on releasing tools and Linux kernel every 6 months. And after about 6 months of existence, with around  80 engineering staff, they managed to release their first public version:  Linaro-10.11 on the 10th of November for TI OMAP4 Panda Board, IGEPv2, Freescale iMX51 and ST-E U8500 platforms. This release is based on Linux 2.6.35 kernel, GCC 4.4 toolchain and uBoot 2010.09. They released Linux 10.11 source code and tools, the hardware packs and the build instructions. Linaro also planned several technical […]

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 […]

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 […]

Netgem Set-top-box N5000 – Toshiba Places

Mid-september, Netgem showcased their new set-top box at IBC 2010: the Netbox N5000 Internet/TV Adaptor. A modified version of this Set-top box will be used by Toshiba (Toshiba places) and be available for purchase for 99 Euros starting in October 2010 in France and later in 2011 in some other Europeans countries. [ad#Google Adsense – Wide Banner] First let’s have a look at the casing (Not the one used by Toshiba places). The front panel has the Power LED, a USB port and the remote sensor. They’ll either provide Infrared or RF remotes depending on the end customer requirements. The back of the set-top box features TV In/Out, Digital Audio (S/PDIF) output, HDMI output, an Ethernet port and the power jack (+12V). Their product brief also mentions a USB port on the rear as an option and Wifi support (802.11n). The Netbox N5000 hardware is based on Sigma Designs SMP8655 […]

Resources for Telechips TCC890x: TCC8900 & TCC8902

Telechips TCC 890x is now widely used in low cost Android Tablets among other applications (automotive, portable media player..). Here’s the description provided by Telechips: The TCC890x is a system LSI for digital multimedia applications based on ARM1176JZF-S, an ARM’s proprietary RISC CPU core. It is designed for high-end multimedia entertainment devices such as car AVN, portable multimedia player and home entertainment. The TCC890x supports decoding and encoding various types of video and audio standards with software and dedicated hardware codecs including JPEG / MPEG1 / MPEG2 / MPEG4 / H.264 / VC-1 up to Full HD (1080p) and MP3 / WMA / EAAC+ / AC3, etc. In addition, TCC890x offers a hardwired 3D graphic accelerator to enrich next generation GUI and other graphical applications. Although, Telechips claims to support WinCE, Embedded Linux and Android, they now fully focus on Android development giving other OSes a lower priority. However, the development board […]

D-link Boxee Box available for pre-order

D-link Boxee set-top-box is available for  pre-order on amazon for 199 USD. It can only be pre-ordered to addresses in the US for now and shipments should start in November. D-Link disclosed that its device is based on an Intel Atom processor CE4100 (Sodaville), not an ARM or MIPS processor as many other STBs do. It is running on embedded Linux. Key features listed by D-Link for the device (beside its weird shape) are basically those of the Boxee media-streaming software on which it’s based: Enjoy thousands of shows available for free from your favorite networks, ready to watch at any time Check-out free movies from the web & watch new releases in stunning HD from premium movie services Play videos, songs, or pictures from your computer or home network Plays any non-DRM video, music, and photos and media from anywhere on the Internet The device features the following input/output and […]

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

EmbeddedTS embedded systems design