Embedded software development and testing
Monday, 8 September 2014
Fedora 20-Wireshark install by yum but not working
Thursday, 4 September 2014
How to configure PPPoE client on Linux
Assuming you have pppoe package installed in PC
Steps:
1) Run "pppoe-setup"script with default configuration and proper user name and password
2) Verify the user name and password given above is copied into /etc/ppp/pap-secrets
3) run "pppoe-connect"
If server is configured properly the pppoe link should come up.
Sample pppoe.conf file
#***********************************************************************
#
# pppoe.conf
#
# Configuration file for rp-pppoe. Edit as appropriate and install in
# /etc/ppp/pppoe.conf
#
# NOTE: This file is used by the pppoe-start, pppoe-stop, pppoe-connect and
# pppoe-status shell scripts. It is *not* used in any way by the
# "pppoe" executable.
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# LIC: GPL
# $Id$
#***********************************************************************
# When you configure a variable, DO NOT leave spaces around the "=" sign.
# Ethernet card connected to DSL modem
ETH='eth2'
# PPPoE user name. You may have to supply "@provider.com" Sympatico
# users in Canada do need to include "@sympatico.ca"
# Sympatico uses PAP authentication. Make sure /etc/ppp/pap-secrets
# contains the right username/password combination.
# For Magma, use xxyyzz@magma.ca
USER='magma'
# Bring link up on demand? Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND=no
#DEMAND=300
# DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;
# NOCHANGE=do not adjust.
DNSTYPE=SPECIFY
# Obtain DNS server addresses from the peer (recent versions of pppd only)
# In old config files, this used to be called USEPEERDNS. Changed to
# PEERDNS for better Red Hat compatibility
PEERDNS=no
DNS1=
DNS2=
# Make the PPPoE connection your default route. Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes
### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT
# How long pppoe-start waits for a new PPP interface to appear before
# concluding something went wrong. If you use 0, then pppoe-start
# exits immediately with a successful status and does not wait for the
# link to come up. Time is in seconds.
#
# WARNING WARNING WARNING:
#
# If you are using rp-pppoe on a physically-inaccessible host, set
# CONNECT_TIMEOUT to 0. This makes SURE that the machine keeps trying
# to connect forever after pppoe-start is called. Otherwise, it will
# give out after CONNECT_TIMEOUT seconds and will not attempt to
# connect again, making it impossible to reach.
CONNECT_TIMEOUT=30
# How often in seconds pppoe-start polls to check if link is up
CONNECT_POLL=2
# Specific desired AC Name
ACNAME=
# Specific desired service name
SERVICENAME=
# Character to echo at each poll. Use PING="" if you don't want
# anything echoed
PING="."
# File where the pppoe-connect script writes its process-ID.
# Three files are actually used:
# $PIDFILE contains PID of pppoe-connect script
# $PIDFILE.pppoe contains PID of pppoe process
# $PIDFILE.pppd contains PID of pppd process
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-pppoe.pid"
# Do you want to use synchronous PPP? "yes" or "no". "yes" is much
# easier on CPU usage, but may not work for you. It is safer to use
# "no", but you may want to experiment with "yes". "yes" is generally
# safe on Linux machines with the n_hdlc line discipline; unsafe on others.
SYNCHRONOUS=no
# Do you want to clamp the MSS? Here's how to decide:
# - If you have only a SINGLE computer connected to the DSL modem, choose
# "no".
# - If you have a computer acting as a gateway for a LAN, choose "1412".
# The setting of 1412 is safe for either setup, but uses slightly more
# CPU power.
CLAMPMSS=1412
#CLAMPMSS=no
# LCP echo interval and failure count.
LCP_INTERVAL=20
LCP_FAILURE=3
# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=80
# Firewalling: One of NONE, STANDALONE or MASQUERADE
FIREWALL=NONE
# Linux kernel-mode plugin for pppd. If you want to try the kernel-mode
# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
LINUX_PLUGIN=
# Any extra arguments to pass to pppoe. Normally, use a blank string
# like this:
PPPOE_EXTRA=""
# Rumour has it that "Citizen's Communications" with a 3Com
# HomeConnect DSL Modem DualLink requires these extra options:
# PPPOE_EXTRA="-f 3c12:3c13 -S ISP"
# Any extra arguments to pass to pppd. Normally, use a blank string
# like this:
PPPD_EXTRA=" noauth "
########## DON'T CHANGE BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
# If you wish to COMPLETELY overrride the pppd invocation:
# Example:
# OVERRIDE_PPPD_COMMAND="pppd call dsl"
# If you want pppoe-connect to exit when connection drops:
# RETRY_ON_FAILURE=no
Wireless client mode , can it work in bridge with Ethernet ?
PC1----Eth0-- (Linux-1)----Wifi client ~~~~~~~Wifi AP------(Linux-2)---Eth0--PC2
Setup details:
1) Linux-1 and Linux-2 are two devices with each having wireless interface and an ethernet interface.
2) Linux-1 wireless interface is defined as client and Linux-2 wireless interface as AP
3) Create bridge in Linux devices and add both the interface to the bridge. For L-1 it is Client and eth0 and L-2 its AP interface and eth0.
4) Ping from PC1 to PC2 -> will it be successful , all ip address are in same subnet.
Note : Wifi client and Wifi AP are just wireless interfaces on which mode is configured as Client and AP with proper Bandwidth, channel etc to make wireless link between the two interfaces.
Refer below links and see if you can find any answer for this question.
http://wiki.openwrt.org/doc/howto/clientmode
http://wiki.mikrotik.com/wiki/Manual:Wireless_Station_Modes
Answer:
Explanation-1 :
The 802.11 standard only uses three MAC addresses for frames transmitted between the Access Point and the Station. Frames transmitted from the Station to the AP don't include the ethernet source MAC of the requesting host and response frames are missing the destination ethernet MAC to address the target host behind the client bridge.
- Bridged Host sends a packet to the Target host
- Frame is relayed via the W-LAN Client and the MAC address of the transmitting wireless adapter is used as source MAC, the sending ethernet MAC is discarded
- W-LAN AP receives the frame and redirects it to the Target
- Target receives the frame and generates a response
- Target responds to the received frame using the (wrong) source MAC as destination
- W-LAN AP relays the frame to the W-LAN Client with the given destination MAC
- W-LAN Client receives the frame and assumes it is the final destination since it's wireless MAC is used in the frame, the packet is not forwarded
- Bridged Host never sees a response frame since the W-LAN Client became the destination, no connection is possible
Historically 802.11 AP devices were supposed to be able to bridge frames between wired network segment and wireless, but station device was not supposed to do L2 bridging.
Consider the following network:
[X]---[AP]-( )-[STA]---[Y]
where X-to-AP and STA-to-Y are Ethernet links, but AP-to-STA are connected using wireless. According to 802.11, AP can transparently bridge traffic between X and STA, but it is not possible to bridge traffic between AP and Y, or X and Y.
802.11 standard specifies that frames between station and AP device must be transmitted in so called 3 address frame format, meaning that header of frame contains 3 MAC addresses. Frame transmitted from AP to station has the following addresses:
- destination address - address of station device, also radio receiver address
- radio transmitter address - address of AP
- source address - address of originator of particular frame
- radio receiver address - address of AP
- source address - address of station device, also radio transmitter address
- destination address
Analysis:
As per above explanation it is clear that we cannot bridge the station device.
Solution:
For this to work, both the client and the AP need to transmit 4-address frames, containing both source and destination MAC addresses.
"iwpriv ath0 wds 1"
From Madwifi Documentation
# create and configure AP interface
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0 essid "my_ap_essid" channel <X>
# create first WDS interface, tell about WDS partner, enable WDS mode
wlanconfig wdsath10 create wlandev wifi0 wlanmode wds
iwpriv wdsath10 wds_add <mac_address_of_wds_partner_1>
iwpriv wdsath10 wds 1
# create second WDS interface, tell about WDS partner, enable WDS mode
wlanconfig wdsath11 create wlandev wifi0 wlanmode wds
iwpriv wdsath11 wds_add <mac_address_of_wds_partner_2>
iwpriv wdsath11 wds 1
# bring all interfaces up
# NOTE: Bringing up the AP interface first is important at this time
ifconfig ath0 up
ifconfig wdsath10 up
ifconfig wdsath11 up
# create the bridge and enslave all needed interfaces
brctl addbr br0
brctl addif br0 ath0
brctl addif br0 wdsath10
brctl addif br0 wdsath11
# bring up the bridge
ifconfig br0 up
}}}
Monday, 25 August 2014
How to compile iperf3 for Windows
============================================
Making all in src
make[1]: Entering directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
make all-am
make[2]: Entering directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c -o cjson.lo cjson.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c -DDLL_EXPORT -DPIC -o .libs/cjson.o
cjson.c: In function 'cJSON_strcasecmp':
cjson.c:58:2: warning: array subscript has type 'char' [-Wchar-subscripts]
for ( ; tolower(*s1) == tolower(*s2); ++s1, ++s2)
^
cjson.c:58:2: warning: array subscript has type 'char' [-Wchar-subscripts]
libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT cjson.lo -MD -MP -MF .deps/cjson.Tpo -c cjson.c -o cjson.o >/dev/null 2>&1
mv -f .deps/cjson.Tpo .deps/cjson.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c -o iperf_api.lo iperf_api.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -MT iperf_api.lo -MD -MP -MF .deps/iperf_api.Tpo -c iperf_api.c -DDLL_EXPORT -DPIC -o .libs/iperf_api.o
In file included from iperf_api.c:40:0:
iperf_api.h:227:5: error: conflicting types for 'iprintf'
int iprintf(struct iperf_test *test, const char *format, ...) __attribute__ ((format(printf,2,3)));
^
In file included from /usr/include/stdio.h:29:0,
from iperf_api.c:13:
/usr/include/stdio.h:259:5: note: previous declaration of 'iprintf' was here
int _EXFUN(iprintf, (const char *, ...)
^
iperf_api.c:2583:1: error: conflicting types for 'iprintf'
iprintf(struct iperf_test *test, const char* format, ...)
^
In file included from /usr/include/stdio.h:29:0,
from iperf_api.c:13:
/usr/include/stdio.h:259:5: note: previous declaration of 'iprintf' was here
int _EXFUN(iprintf, (const char *, ...)
^
Makefile:838: recipe for target 'iperf_api.lo' failed
make[2]: *** [iperf_api.lo] Error 1
make[2]: Leaving directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
Makefile:615: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/cygdrive/c/cygwin/iperf-3.0.6/iperf-3.0.6/src'
Makefile:369: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
cd ./src
find ./ -iname "*.[ch]" |xargs -n1 sed -i s'#iprintf#newprintf#g'- cygwin1.dll
- cyggcc_s-1.dll
- cygstdc++-6.dll
iperf3: error - unable to start listener for connections: Protocol not available
iperf3: error - unable to create a new stream: No such file or directory
Updated : Sept 15, 2015
As per suggestions from Daniel in comments I did below changes and compiled the code again. Now it is working fine.
"C:\cygwin\iperf-3.0.7\src\iperf_api.c"(2264,24):
char template[] = "/tmp/iperf3.XXXXXX";
to
char template[] = "./iperf3.XXXXXX";
Thanks Daniel and Rion for your comments.
Free IEEE 802.11 WLAN Simulator -Pamvotis
Pamvotis is a Wireless LAN Simulator for all the current physical layer extentions of the IEEE 802.11 (IEEE 802.11 a/b/g) standard and for the IEEE 802.11e Draft for Quality of Service in WLANs.
http://www.pamvotis.org/
- Throughput (bits/sec): The number of bits that a node successfully transmitted in a specific time interval.
- Throughput (packets/sec): The number of packets that a node successfully transmitted in a specific time interval.
- Utilization: The percentage of the channel capacity the node occupied. The utilization is the node's throughput in bits per second divided by the node's data rate.
- Retransmission Attempts: The mean number of retransmission attempts (collisions) until the packet is successfully transmitted.
- Media access delay: The delay of a packet from the time it is picked up from the transmitter until it is successfully received from the receiver. This statistic contains the delay due to retransmission attempts and the transmission delay. Note: The statistic is relative to the packet length. Moreover, it does not depend on the node's packet generation rate, but only on the network load.
- Queuing delay: The delay from the birth of a packet until the transmitter picks it up for transmission. It only contains the time a packet waits in the packet queue. It is relative to the packet generation rate and to the media access delay.
- Total packet delay: The sum of the media access delay and the queuing delay. It is the total delay from the birth of a packet until its reception from the receiver.
- Delay Jitter: The total delay jitter of each node. The delay jitter is the standard deviation of the total packet delay of each node.
- Packet Queue Length: The mean number of packets that wait to be transmitted in the packet queue
Saturday, 23 August 2014
ISO/IEC/IEEE 29119 Software Testing -The International Software Testing Standard
The standard's description can be found at below site, as its "Standard" it will be paid, so after paying fees only you will be able to get the actual standard.
http://softwaretestingstandard.org/
========================================================
ISO/IEC/IEEE 29119 Software Testing is an internationally agreed set of standards for software testing that can be used within any software development life cycle or organisation. By implementing these standards, you will be adopting the only internationally-recognised and agreed standards for software testing, which will provide your organisation with a high-quality approach to testing that can be communicated throughout the world. There are currently five standards:
ISO/IEC 29119-1: Concepts & Definitions (published September 2013)
ISO/IEC 29119-2: Test Processes (published September 2013)
ISO/IEC 29119-3: Test Documentation (published September 2013)
ISO/IEC 29119-4: Test Techniques (at DIS stage, anticipating publiation in late 2014)
ISO/IEC 29119-5: Keyword Driven Testing (at CD stage, anticipating publication in 2015)
Plus, based on the processes defined in ISO/IEC/IEEE 29119-2:
ISO/IEC 33063: Process Assessment Model (at DIS stage)
The ISO/IEC/IEEE 29119 standards replace a number of existing software testing standards:
IEEE 829 Test Documentation
IEEE 1008 Unit Testing
BS 7925-1 Vocabulary of Terms in Software Testing
BS 7925-2 Software Component Testing Standard
===========================================================
2) Will be seen as mandatory skill for testers (may harm individuality and freedom)
http://www.ipetitions.com/petition/stop29119
http://solavirtusinvicta.wordpress.com/
http://www.kalyr.com/weblog/computing/testing/stop-iso-29119/
http://clarotesting.wordpress.com/2012/06/06/iso-29119-the-new-software-testing-standard-what-about-it/
http://thesocialtester.co.uk/standard-or-not/
OSI/ISO network management model- FCAPS
http://www.itu.int/rec/T-REC-M.3400-200002-I/en
Fault management— Detect, isolate, notify, and correct faults encountered in the network.
Configuration management— Configure aspects of network devices, such as configuration file management, inventory management, and software management.
Accounting management— Collect usage information of network resources.
Performance management— Monitor and measure various aspects of performance so that overall performance can be maintained at a defined level.
Security management— Secure access to network devices, network resources, and services to authorized individuals.
Wednesday, 23 July 2014
Sunday, 20 July 2014
How to enable DHCP RELAY option 82 on Cisco DHCP Server ?
Option 82 is defined in RFC : 3046 (https://tools.ietf.org/rfc/rfc3046.txt) . It is DHCP Relay Agent Information Option, which includes sub-options "Agent Circuit ID Sub-option" and "Agent Remote ID Sub-option" .
How DHCP Relay works
DHCP Server -----DHCP Relay -------DHCP Client
1) DHCP Client send DHCPOFFER as broadcast packet to DHCP Relay.
2) DHCP Relay knows DHCP Server Ip address, it increments HOP=1, and add DHCP Relay agent address ( its own LAN side IP) and send Unicast packet to DHCP Server
3) DHCP Server understands that its a packet from Relay , sends DHCPOFFER back to Relay agent as unicast packet.
4) DHCP OFFER is forwarded to DHCP Client by Relay.
5) DHCPREQUEST from Client and DHCP-ACK from Server follows the same path as above.
6) DHCP Client is not aware of any DHCP-RELAY in between and the relay acts as if it is DHCP Server.
7) DHCP-Relay is in routing mode , so the interfaces ip address are different.
Option 82
Option 82 is required if there are multiple DHCP Relay in between and each relay is to be assigned from a different pool of IP address. The IP address will be assigned based on Agent id and Circuit id which is to be defined properly in Server.
How to enable option 82 in Cisco DHCP Server
192.168.7.1 192.168.7.2 10.0.0.1
Cisco DHCP Server -----Fedora 11 Linux DHCP Relay -----Windows XP DHCP Client
In this setup we will see how we can enable option 82 in both Linux DHCP Relay agent and CISCO DHCP Server.
Linux DHCP Relay Configuration
1) Download and install latest dhcrelay rpm, I have used isc-dhcrelay-4.2.2rc1
2) Start dhcrelay be giving below command
dhcrelay -a -d -i eth1 -i eth2 192.168.7.1
The -a option enable option 82 in Linux DHCPRelay, open Wireshark and note down the value of Option 82.
Cisco DHCP Server Configuration for option 82
configure t
ip dhcp use class
ip dhcp class relay1
relay agent information
relay-information hex 01060240234*
ip dhcp pool pool1
network 10.0.0.0 255.0.0.0
default-gateway 10.0.0.1
class relay1
address range 10.0.0.10 10.0.0.20
ip route 10.0.0.0 255.0.0.0 192.168.7.2
The hex "01060240234*" information is the Value seen in option 82 of Client DHCPDISCOVER , bootp options. if you have multiple dhcp-relay in network you can add the class, pool and static route to reach the specific relay and the DHCP server will assign the IP address range as per the RELAY agent configured range.
DHCP Client
ipconfig /release
ipconfig /renew
Client should get IP address 10.0.0.10
In Windows 2012 Server the option 82 can be matched against the option 82 value or with sub-options
Agent id or Remote Circuit id.
Keep Learning , Keep Sharing!
Tuesday, 1 July 2014
Which parameter defines wireless client max idle timeout ?
Answer : This parameter is known as BSS Max Idle Period and is defined in 802.11 standard, 802.11-2012.pdf as:
The BSS Max Idle Period element contains the time period a non-AP STA can refrain from transmitting frames to the AP before the AP disassociates the STA due to inactivity.
The Max Idle Period field indicates the time period during which a STA can refrain from transmitting frames to its associated AP without being disassociated. The Max Idle Period field is a 16-bit unsigned integer. The time period is specified in units of 1000 TUs. The value of 0 is reserved. A non-AP STA is considered inactive if the AP has not received a data frame or management frame of a frame exchange sequence initiated by the STA for a time period equal to or greater than the time specified by the Max Idle Period field value.
The Idle Options field indicates the options associated with the BSS Idle capability.
The Protected Keep-Alive Required bit set to 1 indicates that the STA sends an RSN protected frame to the AP to reset the Idle Timer at the AP for the STA, as defined in 10.23.12. If the Protected Keep-Alive Required bit is 0, the STA sends either an unprotected or a protected frame to the AP to reset the Idle Timer at the AP.
The BSS Max Idle Period element is included in Association Response frames and Re-association Response frames.
For hostapd we can define it using parameter ap_max_inactivity=300
# Station inactivity limit
#
# If a station does not send anything in ap_max_inactivity seconds, an
# empty data frame is sent to it in order to verify whether it is
# still in range. If this frame is not ACKed, the station will be
# disassociated and then deauthenticated. This feature is used to
# clear station table of old entries when the STAs move out of the
# range.
#
# The station can associate again with the AP if it is still in range;
# this inactivity poll is just used as a nicer way of verifying
# inactivity; i.e., client will not report broken connection because
# disassociation frame is not sent immediately without first polling
# the STA with a data frame.
# default: 300 (i.e., 5 minutes)
#ap_max_inactivity=300
In Cisco Wireless LAN controller , this field is "User idle Timeout"
The User Idle Timeout: When a user is idle without any communication with the LAP for the amount of time set as User Idle Timeout, the client is de-authenticated by the WLC. The client has to reauthenticate and reassociate to the WLC. It is used in situations where a client can drop out from its associated LAP without notifying the LAP. This can occur if the battery goes dead on the client or the client associates move away.
Monday, 23 June 2014
Short Introduction of IETF/IEEE/ITU/FCC/Wi-fi
The IETF's official products are documents, published free of charge as RFCs. "RFC" stands for Request for Comments, and this name (used since 1969, before the IETF existed) expresses something important: the Internet is a constantly changing technical system, and any document that we write today may need to be updated tomorrow.
One way to look at the IETF is as the group of people who work together to improve the technology of the Internet on a daily basis. As well as producing RFCs, the IETF is a forum where network operators, hardware and software implementers, and researchers talk to each other to ensure that future protocols, standards and products will be even better. This is not the only technical forum for the Internet, of course. But it is the forum where the basic technical standards for Internet protocols are set and maintained.
The IETF does not standardize transmission hardware (we leave that to organizations like the IEEE and the ITU) and does not standardize specialized application layer protocols. For example, we leave HTML and XML standards to the World-Wide Web Consortium. But the IETF does standardize all the protocol layers in between, from IP itself up to general applications like email and HTTP.
http://www.ietf.org/newcomers.html
List of RFC created by IETF:
http://www.rfc-editor.org/rfc-index2.html
ITU (International Telecommunication Union)
The ITU comprises three sectors, each managing a different aspect of the matters handled by the Union, as well as ITU Telecom. The sectors were created during the restructuring of ITU at its 1992 Plenipotentiary Conference. Radiocommunication (ITU-R) managing the international radio-frequency spectrum and satellite orbit resources is at the heart of the work of the ITU Radiocommunication Sector (ITU-R).
Standardization (ITU-T)
Standardization was the original purpose of ITU when it was founded. This sector remains responsible global telecommunications standards, except for radio.Prior to 1992 it was known as the International Telephone and Telegraph Consultative Committee or CCITT (from its French name "Comité consultatif international téléphonique et télégraphique").
Development (ITU-D)
Established to help spread equitable, sustainable and affordable access to information and communication technologies (ICT).
ITU TELECOM
ITU Telecom organizes major events for the world's ICT community.
Search List of ITU-T standards:
http://www.itu.int/ITU-T/recommendations/index.aspx
H.323
http://www.itu.int/ITU-T/recommendations/rec.aspx?rec=H.323
IEEE
IEEE's Constitution defines the purposes of the organization as "scientific and educational, directed toward the advancement of the theory and practice of Electrical, Electronics, Communications and Computer Engineering, as well as Computer Science, the allied branches of engineering and the related arts and sciences."
In pursuing these goals, the IEEE serves as a major publisher of scientific journals and organizer of conferences, workshops, and symposia (many of which have associated published proceedings).
It is also a leading standards development organization for the development of industrial standards (having developed over 900 active industry technical standards) in a broad range of disciplines, including electric power and energy, biomedical technology and healthcare, information technology, information assurance, telecommunications, consumer electronics, transportation, aerospace, and nanotechnology.
IEEE develops and participates in educational activities such as accreditation of electrical engineering programs in institutes of higher learning.
All 802 standard are IEEE stadard and you can download it free through IEEE get program:
http://standards.ieee.org/about/get/802/802.11.html
FCC:
The Federal Communications Commission regulates interstate and international communications by radio, television, wire, satellite and cable in all 50 states,the District of Columbia and U.S. territories.
The FCC's rules and regulations are in Title 47 of the Code of Federal Regulations (CFR), which are published and maintained by the Government Printing Office. Title 47 Rules & Regulations are also available on the web in a searchable format. Part 15 of it defines rules and regulation for "RADIO FREQUENCY DEVICES". It covers regulations related to frequency, BW, max power of the intentional radiator, Max EIRP and type of devices (indoor and outdoor).
Rules and regulation can be found at:
http://www.ecfr.gov/cgi-bin/text-idx?
SID=5b4b39ebc249c57af9bcefbd1ca86fba&tpl=/ecfrbrowse/Title47/47cfr15_main_02.tpl
Wi-fi Alliance :
http://www.wi-fi.org/who-we-are
Wi-Fi Alliance Mission:
Provide a highly-effective collaboration forum
Grow the Wi-Fi industry
Lead industry growth with new technology specifications and programs
Support industry-agreed standards
Deliver great product connectivity through testing and certification
About Wi-Fi Alliance®
Wi-Fi Alliance is a global non-profit industry association – our members are the worldwide network of companies that brings you Wi-Fi®. The members of our collaboration forum come from across the Wi-Fi ecosystem and share a vision of seamless connectivity. Since 2000, the Wi-Fi CERTIFIED™ seal of approval designates products with proven interoperability, industry-standard security
protections, and the latest technology. Wi-Fi Alliance has certified more than 18,000 products, delivering the best user experience and encouraging the expanded use of Wi-Fi products and services in new and established markets. Today, billions of Wi-Fi products carry a significant portion of the world’s data traffic in an ever-expanding variety of applications.
List of wifi certified products:
http://www.wi-fi.org/certified-products-results?category=3&ga_category=Access
+Point+for+Home+or+Small+Office+%28Wireless+Router%29
Reference: Respective official sites
Tuesday, 15 April 2014
How to untar/extract a tar.bz2/tar/tar.gz file
Thursday, 10 April 2014
CALM, DSRC (Dedicated short-range communications) Standards-short Info
CALM: CALM stands for Communication Access for Land Mobile
CALM enables the following communication modes:
- Vehicle-to-Infrastructure (V2I)
- Vehicle-to-Vehicle (V2V)
- Infrastructure-to-Infrastructure (I2I)
Methods of transmission used by CALM can be any one of these :
· Infrared
· GSM
· DSRC 5.8-5.9 GHz (legacy systems)
· IEEE 802.11 standard
· Bluetooth
· RFID
DSRC: Dedicated short-range communications
DSRC :One-way or two-way short-range to medium-range wireless communication channels specifically designed for automotive use, it consists of a collection of standards for all OSI layers and still some are in review phase
EN 12253:2004 :Physical layer using microwave at 5.8 GHz
EN 12795:2002 :DSRC Data link layer: Medium Access and Logical Link Control
EN 12834:2002 :Application layer
EN 13372:2004 :DSRC profiles for RTTT applications
EN ISO 14906:2004:Application interface
Background:
In October 1999: FCC: allocated 75 MHz of spectrum in the 5.9 GHz band to be used by intelligent transportation systems (ITS).
In August 2008: ETSI allocated 30 MHz of spectrum in the 5.9 GHz band for ITS.
V2I (Vehicle-to-Infrastructure)
· Two intersection RSE messages enable a suite of intersection-related safety applications.
· SPaT message - Signal Phase and Timing
· MAP message – Intersection geometry
· Other RSEs can send Traveler Information message on curve speed, height restriction, icy roads, etc.
· IP data exchange with servers in the Internet – RSE acts as forwarder
V2V(Vehicle-to-Vehicle)
· Each vehicle broadcasts its core state information in a “Basic Safety Message” (BSM) nominally 10 times/sec.
· BSM is sent in 360o pattern using IEEE 802.11p technology.
· Upon receipt of BSM, vehicle safety host builds model of each neighbor’s trajectory, assesses threat to host vehicle, warns driver (or takes control) if threat becomes acute.
Ref:
http://en.wikipedia.org/wiki/Dedicated_short-range_communications
http://en.wikipedia.org/wiki/Communications,_Air-interface,_Long_and_Medium_range
DSRC ppt from https://mentor.ieee.org
Saturday, 8 February 2014
Powerful Ping command (Linux and Windows Ping)
Also the ping command options differ in Linux and Windows.
To ping host 10.0.0.1 , 100 packets with packet size 1100 bytes ,DF bit set, TTL value 32, TOS value as 252, timeout to wait for each reply= 2 sec
we have to use the commands as :
=============================================================================
Windows : ping 10.0.0.1 -n count -l size -f -i TTL -v TOS -w timeout-in-msec
Linux : ping 10.0.0.1 -c count -s size -m dont -t ttl -Q tos -W timeout-in-sec
==============================================================================
Windows : ping 10.0.0.1 -n 100 -l 1100 -f -i 32 -v 252 -w 2000
Linux : ping 10.0.0.1 -c 100 -s 1100 -m dont -t 32 -Q 252 -W 2
=============================================================================
Other options in Windows:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-r count Record route for count hops (IPv4-only).
-s count Timestamp for count hops (IPv4-only).
-j host-list Loose source route along host-list (IPv4-only).
-k host-list Strict source route along host-list (IPv4-only).
-R Use routing header to test reverse route also (IPv6-only).
-S srcaddr Source address to use.
-4 Force using IPv4.
-6 Force using IPv6.
Other options in Linux:
-a
Audible ping.
-A
Adaptive ping.
-b
Allow pinging a broadcast address.
-B
Do not allow ping to change source address of probes.
-d
Set the SO_DEBUG option on the socket being used.
-F flow label
Allocate and set 20 bit flow label on echo request packets.
-f
Flood ping. For every ECHO_REQUEST sent a period ''.'' is printed, while for ever ECHO_REPLY received a backspace is printed.
-I interface address
Set source address to specified interface address.
-l preload
If preload is specified, ping sends that many packets not waiting for reply.
-L
Suppress loopback of multicast packets. This flag only applies if the ping destination is a multicast address.
-n
Numeric output only. No attempt will be made to lookup symbolic names for host addresses.
-p pattern
You may specify up to 16 ''pad'' bytes to fill out the packet you send.
-q
Quiet output. only summary lines at startup time and when finished.
-R
Record route.
-r
Bypass the normal routing tables and send directly to a host on an attached interface.
-S sndbuf
Set socket sndbuf. If not specified, it is selected to buffer not more than one packet.
-T timestamp option
Set special IP timestamp options.
-M hint
Select Path MTU Discovery strategy. hint may be either do (prohibit fragmentation, even local one), want (do PMTU discovery, fragment locally when packet size is large), or dont (do not set DF flag).
-U
Print full user-to-user latency (the old behaviour).
-v
Verbose output.
-V
Show version and exit.
-w deadline
Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received.
Sunday, 19 January 2014
Wednesday, 8 January 2014
Driving in India , Hyderabad
1) Main Aim of Driving: Reaching destinations safe and sound and in the process not getting hurt or hurting other people.
and its "NOT"
Showing driving skill to unknown people
Making world record for fastest driving
2) Don't Panic, if car stops in between.
3) Put hand brake, if it stopped in between and you or on uneven roads. The car should not go back.
4) Maintain safe distance with other vehicles including deadly combination of "L" vehicles and women drivers.
5) Night time, if car stops, put off the light and again start. Don't try switching on vehicle while its lights are on.
6) Try to drive in your lane , and check mirror , if changing lane.
7) Do not try to cross road in front of bus, they will not stop for you.
8) Parking time , be more careful not to hit other parked vehicles.
9) IF you can not see some (behind) vehicle means they are trying to overtake you, reduce your speed and let them go.
10) Motorcyclists and auto-wallas are like unwanted blessings, from where they will come its difficult to know so keep your ears and eyes open all the time.
11) Consider people crossing the road as people walking in the garden, either honk them to listen to you and allow you to cross, or reduce speed to let them cross.
12) Try not to use mobile, loud speaker music while driving, you will miss few living people, who are trying to get your attention in either provoking you to drive
fast or trying to overtake you.
13) Let other people go if they are impatient and honking continuously, you have more important work in your life than getting mad at these people.
14) If people indicator are still on while they are driving in straight road, judge on case to case basis, they forgot to switch it off or they actually want to get to the side.
15) Its a skill , master it, keep practicing.
Monday, 30 December 2013
Embedded Linux Basic tutorials
Below are some of the points covered and its really nice tutorial to get started. The content is mostly from the original author and i have just added few points to make it more simpler for myself.
Part 1-> Learning linux for embedded systems
Install Linux
a) Use a separate Linux PC
b) Make your desktop dual boot, with Windows and Linux
c) Use VMware to install virtual machine environment in your existing Windows desktop.
The author recommends the third approach, but if you have resources use first approach. It is always better to include one Linux PC in your existing setups.
Point to be noted :-)
I certainly do not recommend reading Linux source to try to learn how to program Linux. That's like trying to learn to drive by studying how a car's transmission works.
Part 2 : Getting Started with Embedded Linux
a) Open terminal window -> try these commands-> ls,cp, cd, pwd, cat, less, file, man , info, apropos , man apropos, find
b) Learn vi editor basic commands:
vi filename, :i, :q, Esc y -> select 1 line, p-> paste 1 line, d->delete one line
You can learn more commands using below link:
http://www.cs.colostate.edu/helpdocs/vi.html
c) Hierarchical file system->
- root->/ -> starting point
- /proc ->process directory
- /boot -> contains boot program
- /bin and /sbin -> programs run by administrators
- /dev -> devices both real and virtual
- /etc -> system configuration file
- /home -> user files
- /sys -> system information
- /lib -> libraries
- /usr -> programs which can be run by users
- /tmp -> temporary files
- /var -> system logs
- /opt -> Other software and add-on packages that are not part of the default installation
- /srv -> site specific data
- /mnt -> Mount your filesystems
- Try ps various options -> list all processess-> ps alx, ps l, ps -l, ps alx | less
- init -> Process ID 1 -> created by Linux kernel when system starts
Part 3 : Getting started with Embedded Linux
1) Understand
- GCC : GNU compiler collection, Binutils: GNU Binary utils, make
- IDE: Integrated developement environment like Eclipse
- Text editors: vi, emacs,gedit, kwrite
[root@localhost]#vi hello.c
#include <stdio.h>
int main ()
{ printf("Hello World\n");
return 0;
}
3) Now compile the program
[root@localhost]#gcc -o hello -g -O1 hello.c
gcc : compiler used
-o filename : output file or executable file name
-g level : generate the debugging information ( capital alphabet O (optimized) level in digits 1)
can be -O0 (for easy debugging alphabet O with digit 0)
4) If no error, run the program
[root@localhost]# ./hello
Hello World
5) If error , try to install the proper packages with
yum install (for Fedora)
6) GDB: GNU debugger
[root@localhost ~]# gdb hello
GNU gdb (GDB) Fedora (6.8.50.20090302-21.fc11)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb)
(gdb)
(gdb) break main
Breakpoint 1 at 0x80483bd: file hello.c, line 5.
(gdb) run
Starting program: /root/hello
Breakpoint 1, main () at hello.c:5
5 { printf ("Hello World\n");
Missing separate debuginfos, use: debuginfo-install glibc-2.10.2-1.i686
(gdb) cont
Continuing.
Hello World
Program exited normally.
(gdb) quit
[root@localhost ~]#
7) The compiler name and debugger name can be different, like
arm-none-eabi-gcc which generates the code for ARM using the EABI (Embedded application binary interface)
Part 4 : Getting started with Embedded Linux
1) Recommended books/resources :
- Advanced Programming in the UNIX Environment by W. Richard Stevens
- The Linux Programming Interface by Michael Kerrisk.
- http://stackoverflow.com/
- http://www.fsf.org/
- http://gnu.mirrors.pair.com/gnu/
- http://sourceforge.net/
- http://freecode.com/
- https://github.com/
2) Utilities : make, automake, autoconf, libtool, diffutils, wget
- make : checks which files need to be compiled ( Makefile) and manages order
- automake: generate Makefiles, identifying dependencies and invoking libtool (to create shared libraries
- autoconf: libraries or programs to be compiled for different targets and OS
- diffutils: package of several programs related to finding differences between files (diff, diff3, cmp, sdiff)
- wget : utility for download of files from internet
3) Process
a) Download source files
[root@localhost ~]# wget ftp://ftp.gnu.org/gnu/diffutils/diffutils-3.3.tar.xz
b) Untar
[root@localhost ~]# tar xfv diffutils-3.3.tar.xz
[root@localhost ~]# cd diffutils-3.3
c) Read README file in the directory
d) Build the package
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install
Install to specific directory
[root@localhost ~]#./configure --prefix=~/mydiff
Part 5 : Getting started with Embedded Linux
For part 5 I recommend you to read the original content
http://www.embedded.com/electronics-blogs/open-mike/4425954/Getting-started-with-Embedded-Linux--Part-Five
http://www.linuxtopia.org/online_books/linux_beginner_books/linux_filesystem/opt.html
Ref : http://www.embedded.com/electronics-blogs/4420670/Open-Mike
About the author of these articles:
Michael Eager
Michael Eager is principal consultant at Eager Consulting in Palo Alto, Calif. He has over four decades experience developing compilers, debuggers, and simulators for a wide range of processor architectures used in embedded systems. His current and former clients include major semiconductor companies and systems developers. Michael has been a member of the ISO C++ Standard Committee and ABI Committees for several processor architectures. He is chair of the Debugging Standards Committee for DWARF, a widely used debug data format. He is active in the open-source and Linux communities.
Thursday, 19 December 2013
What is WAVE, 802.11p ?
1) Wireless access in vehicular environments (WAVE)
2) Added support in 802.11 for Intelligent Transportation Systems (ITS) applications.
3) Applicable ITS band 5.9 GHz (5.85-5.925 GHz).
4) IEEE 1609 is a higher layer standard based on the IEEE 802.11p.
5) There is no association and authentication procedure before exchange of data.
6) Use of wildcard BSSID ( a value of all 1s) in the header of all frames they exchange, and may start communication as soon as they arrive on same communication channel.
7) Addition of new management frame for timing advertisement, which allows IEEE 802.11p enabled stations to synchronize themselves with a common time reference. The only time reference defined in the IEEE 802.11p amendment is UTC or Coordinated Universal Time.
8) Channel rejection requirements can be implemented (for both adjacent and nonadjacent channels) to avoid out-of-channel interferences. They only apply to OFDM transmissions in the 5GHz band used by the IEEE 802.11a physical layer.
9) Frequecy band : 5.9GHz band (5.850-5.925 GHz) with 5MHz, 10MHz and 20MHz channel spacings, countries: United States , Europe
Ref: Wiki, 802.11p standard
http://www.etsi.org/deliver/etsi_es/202600_202699/202663/01.01.00_50/es_202663v010100m.pdf
How to change the default MTU size in Windows 7 ?
1) Go to Start-> type cmd-> right click on cmd.exe-> select->Run as administrator
2) Using this command prompt give below command to know the existing MTU of interfaces
C:\>netsh interface ipv4 show subinterfaces
MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
4294967295 1 0 1486381 Loopback Pseudo-Interface 1
1300 1 16167334 2330876 Wireless Network Connection
1300 5 0 0 Local Area Connection
3) To change give below commands
C:\> netsh interface ipv4 set subinterface "Local Area Connection" mtu=1500 store=persistent
ok
4) View the changed MTU
C:\>netsh interface ipv4 show subinterfaces
MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
4294967295 1 0 1486381 Loopback Pseudo-Interface 1
1300 1 16167334 2330876 Wireless Network Connection
1500 5 0 0 Local Area Connection
Saturday, 7 December 2013
RFC 5625 : DNS Proxy Implementation Guidelines
1) The role of the proxy should therefore be no more and no less than to
receive DNS requests from clients on the LAN side, forward those
verbatim to one of the known upstream recursive resolvers on the WAN
side, and ensure that the whole response is returned verbatim to the
original client.
2) It is RECOMMENDED that proxies should be as transparent as possible,
such that any "hop-by-hop" mechanisms or newly introduced protocol
extensions operate as if the proxy were not there.
3) Except when required to enforce an active security or network policy
(such as maintaining a pre-authentication "walled garden"), end-users
SHOULD be able to send their DNS queries to specified upstream
resolvers, thereby bypassing the proxy altogether. In this case, the
gateway SHOULD NOT modify the DNS request or response packets in any
way.
4) DNS proxies should not arbitrarily reject or otherwise drop requests
or responses based on perceived non-compliance with standards.
5) Since UDP packets larger than 512 octets are now expected in normal
operation, proxies SHOULD NOT truncate UDP packets that exceed that
size.
6) Whenever a proxy receives a request over TCP, the proxy
SHOULD forward the query over TCP and SHOULD NOT attempt the same query over UDP first.
7) Proxies SHOULD be capable of forwarding UDP packets up to a payload
size of at least 4096 octets.
8) As per Section 3, end-users SHOULD be able to send their DNS queries
directly to specified upstream resolvers, ideally without hard-coding
those settings in their stub resolver.
9) It is therefore RECOMMENDED that gateways SHOULD support device-
administrator configuration of values for the "Domain Name Server"
DHCP option
10) It is strongly RECOMMENDED that DNS proxies follow the relevant
recommendations in [RFC5452], particularly those in Section 9.2
relating to randomisation of Query IDs and source ports. This also
applies to source port selection within any NAT function.
11) If a DNS proxy is running on a broadband gateway with NAT that is
compliant with [RFC4787], then it SHOULD also follow the
recommendations in Section 10 of [RFC5452] concerning how long DNS
state is kept.
12) The DNS proxy in a gateway SHOULD NOT, by default, be accessible from the WAN interfaces of the device.
Must:
1) Proxies MUST ignore any unknown DNS flags and proxy
packets as usual.
2) Proxies MUST forward packets regardless of the presence or absence of compressed labels therein. (
Compression of labels as per Section 4.1.4 of [RFC1035]
3) [RFC3597] requires that resolvers MUST handle Resource Records (RRs)
of unknown type transparently.
4) All requests and responses MUST be proxied regardless of the values
of the QTYPE and QCLASS fields.
5) All responses MUST be proxied regardless of the values of the TYPE and CLASS fields of any Resource Record therein.
6) If a proxy must unilaterally truncate a response, then the proxy MUST
set the TC bit. Similarly, proxies MUST NOT remove the TC bit from
responses.
7) DNS proxies MUST therefore be prepared to receive and forward queries
over TCP.
8) As per Section 4.1, proxies MUST NOT refuse to proxy such packets which contain an OPT RR
9) DNS proxies MUST implement Section 4.7 of [RFC2845] and either
forward packets unchanged (as recommended above) or fully implement
TSIG.
10) As per Section 4.3, DNS proxies MUST be capable of proxying packets
containing TKEY [RFC2930] Resource Records.
11) Since no standard exists for a "local" scoped domain name suffix, it is RECOMMENDED that the default value for this option SHOULD be empty, and that this option MUST NOT be sent to clients when no value is configured.
Key words for use in RFCs to Indicate Requirement Levels
http://tools.ietf.org/html/rfc2119 :
1. MUST
This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
2. SHOULD
This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
