วันจันทร์ที่ 31 มกราคม พ.ศ. 2554

Ping Error

1.  Destination Network Unreachable => มี router ตอบกลับมาว่า ไม่สามารถหา Host ที่ต้องการได้จาก Network Path ใดๆ
2.  Destination Host Unreachable => router ตอบกลับว่า สามารถค้นหา Host ที่ต้องการเจอ แต่เมื่อส่ง ARP เพื่อถามหา IP Address ดังกล่าว กลับไม่มีการตอบกลับ
3.  ping: sendto: Host is down

วันพุธที่ 26 มกราคม พ.ศ. 2554

iperf

iperf เป็น Application สำหรับวัดค่าต่างๆของเครือข่าย ได้แก่ Throughput , Jitter (Latency Variation) , Datagram loss , Bandwidth
option ที่ป้อนให้ มีความหมายดังนี้
Client/Server:
-f     --format  [kmKM]    format to report: Kbits, Mbits, KBytes, MBytes
-i    --interval                   seconds between periodic bandwidth reports
-l    --len  [KM]                length of buffer to read or write (default 8 KB)
-m    --print_mss             print TCP maximum segment size (MTU - TCP/IP header)
-p    --port                       server port to listen on/connect to
-u    --udp                       use UDP rather than TCP
-w    --window  [KM]      TCP window size (socket buffer size)
-B    --bind  "host"           bind to "host", an interface or multicast address
-C    --compatibility        for use with older versions does not sent extra msgs
-M    --mss                      set TCP maximum segment size (MTU - 40 bytes)
-N    --nodelay                set TCP no delay, disabling Nagle's Algorithm
-V    --IPv6Version         Set the domain to IPv6

Server specific:
-s     --server                  run in server mode
-U    --single_udp           run in single threaded UDP mode
-D    --daemon               run the server as a daemon

Client specific:
-b     --bandwidth  [KM]      for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u)
-c    --client  "host"        run in client mode, connecting to "host"
-d    --dualtest               Do a bidirectional test simultaneously
-n    --num  [KM]           number of bytes to transmit (instead of -t)
-r    --tradeoff               Do a bidirectional test individually
-t    --time                     time in seconds to transmit for (default 10 secs)
-F    --fileinput  "name"    input the data to be transmitted from a file
-I    --stdin                    input the data to be transmitted from stdin
-L    --listenport           port to recieve bidirectional tests back on
-P    --parallel              number of parallel client threads to run
-T     --ttl                      time-to-live, for multicast (default 1)

Miscellaneous:
-h    --help                   print this message and quit
-v     --version             print version information and quit

ที่มา : IPERF - The Easy Tutorial

วันอังคารที่ 18 มกราคม พ.ศ. 2554

รวบรวม apt-get package name

Command : Package Name
killall : psmisc
iwlist , iwconfig : wireless-tools
lsusb : usbutils
dos2unix : tofrodos

USB-CDC Support

หากว่า Linux Kernel มองไม่เห็น USB-CDC Device อย่าเพิ่งตกใจ ดิ้นรนไปหา Driver มาลงเพิ่ม เนื่องจาก Linux เวอร์ชันใหม่ๆนั้นมี Driver CDC อยู่แล้ว (ที่ผมใช้อยู่เป็น 2.6.32-rc8) แต่บางครั้งอาจยังไม่ได้โหลดเคอร์เนลโมดูลเข้าหน่วยความจำ วิธีแก้คือ

#depmod -a

คำสั่งนี้จะเป็นการโหลดเคอร์เนลโมดูลเข้าสู่หน่วยความจำ เมื่อใช้คำสั่งนี้แล้วลองถอดอุปกรณ์ออกแล้วเสียบเข้าไปอีกครั้ง คราวนี้จะเห็นว่า USB-CDC สามารถใช้งานได้แล้วครับ

แหล่งอ้างอิง
http://www.qbik.ch/usb/devices/drivers.php

วันพฤหัสบดีที่ 13 มกราคม พ.ศ. 2554

How to compile RT73 Driver for ARM Linux

1.  Download latest RT73 Linux Driver from Ralink
2.  unzip source code using command
     tar xvjf 2010_0817_RT73_Linux_STA_v1.1.0.4.tar.bz2
3.  cd 2010_0817_RT73_Linux_STA_v1.1.0.4/Module
4.  cp Makefile.6 Makefile
5.  vim Makefile
6.  Modify to this
     #PLATFORM=PC
     #PLATFORM=CMPC
     PLATFORM=ARM
     .
     .
     .
     ifeq ($(PLATFORM),PC)
     LINUX_SRC =/lib/modules/$(shell uname -r)/build
     endif
     ifeq ($(PLATFORM),CMPC)
     LINUX_SRC = /home/fonchi/vendor/kernel-default-2.6.21/linux-2.6.21
     endif
     ifeq ($(PLATFORM),ARM)
     LINUX_SRC = /home/<home dir>/kernel/kernel-bin
     endif
  
     save and exit
7.  compile source code using command
   CROSS_COMPILE=arm-angstrom-linux-gnueabi- ARCH=arm make all
8.  install module i'm copy compile output to flash drive and then install to ARM machine using flash drive.
    at Ubuntu Machine
    mount /dev/sda /mnt
    cp rt73.bin /mnt
    cp rt73sta.dat /mnt
    cp rt73.ko /mnt
    umount /mnt

    at ARM Machine
    mount /dev/sda /mnt
    mkdir /etc/Wireless/RT73
    cp /mnt/rt73sta.dat /etc/Wireless/RT73/
    dos2unix /etc/Wireless/RT73/rt73sta.dat
    chmid +x /etc/Wireless/RT73/rt73sta.dat
    cp /mnt/rt73.bin /lib/firmware/
    mkdir -p  /lib/modules/2.6.32-rc8/kernel/drivers/staging/RT73/
    cp /mnt/rt73.ko /lib/modules/2.6.32-rc8/kernel/drivers/staging/RT73/
    umount /mnt
9.  load module using command
     depmod -a
10.insert RT73 usb. Enjoy...

Usful Links
Ralink RT73 driver download page
Porting for Beagle Board
Project4fun