Showing posts with label Technical. Show all posts
Showing posts with label Technical. Show all posts

Tuesday, May 8, 2012

Micro Operating System

Testing Not to do source address selection for TCP connections

Target IPv6 addresses:
2010:0002:0002:0002:FFF2:FFF2:FFF2:FFF2/64
2010:0002:0002:0002:0002:0002:0002:0002/64

FreeBSD IPv6 address:
2010:0002:0002:0002:0002:0002:0002:0003/64

No default routers.

Now, if you do "ftp 2010:0002:0002:0002:FFF2:FFF2:FFF2:FFF2" from FreeBSD, the SYN reply should come from "2010:0002:0002:0002:FFF2:FFF2:FFF2:FFF2". Not from "2010:0002:0002:0002:0002:0002:0002:0002".

If the target performs source address selection, the reply will come from the matching address "2010:0002:0002:0002:0002:0002:0002:0002" and the connection will fail.

Saturday, April 21, 2012

Writing Read Configuration Register in Flash of Armadillo-440

    Outport(2, 0xA0012384, 0x60)
                           ~~~~~~(Read Configuration Register content << 1)
    Wait(1)
    Outport(2, 0xA0012384, 0x03)
                           ~~~~~~(Read Configuration Register content << 1)
    Wait(1)
    Outport(2, 0xA0000000, 0xff) // Flash to read mode
    Wait(1)

Flash is Numonyx PC28F256P30BF. To check the flash register contents from debugger, memory map the flash to some other area and write the commands in that. Since, Flash is configured as Read-only in some debuggers, they may not allow direct write. Or, write using the debugger scripts which do not know that the address are is Flash. Make sure that the Cache is configured as Write-Through.

Thursday, April 5, 2012

Howto add/delete IPv6 address in WindowsXP

① Command Prompt:
C:/>

② "netsh" command

>netsh
netsh>

③ "inerface" command
netsh>interface
netsh interface>

④ "show interface" command
netsh interface>show interface

Admin State    State          Type             Interface Name
-------------------------------------------------------------------------
有効                            専用               1394 接続
有効                            専用               ローカル エリア接続 2
有効                            専用               ワイヤレス ネットワーク接続
有効                            専用               ローカル エリア接続
有効                            ループバック           ループバック
有効                            内部               内部

⑤ "ipv6" command
netsh interface ipv6>

⑥ "add address "ローカル エリア接続 2" 2001::3" command
OK

add route 2001::3/64 "ローカル エリア接続" command

⑦ "del address "ローカル エリア接続 2" 2001::3" command
OK

Friday, March 30, 2012

Howto add/delete IPv6 address in FreeBSD

To add:
# ifconfig {interface-name} inet6 {IPv6-Address} prefixlen {routed-bit}
# ifconfig le0 inet6 001:470:1e04:5ea::10 prefixlen 64


To delete:
# ifconfig em0 inet6 2001:db8:bdbd::123/48 delete

Wednesday, February 29, 2012

SSL Client Data dump test using OpenSSL

① Command at OpenSSL server is as follows:

OpenSSL> s_server -accept 443 -cert ser.txt -key key.txt -verify 1 -WWW


② Send the following data from SSL Client:

   char http_request[] = "GET /index.txt HTTP/1.0\r\n"
                                "User-Agent: SSL Client\r\n"
                                "Accept: text/plain\r\n"
                                "\r\n";
③ Place index.txt at "OpenSSL-Win32/bin". If you get error "Error opening 'index.txt'", check the file name is set correctly. Sometimes the file extension also set as name. It may be "index.txt.txt".

④ When you send the command shown in ②, OpenSSL server will send the index.txt to the SSL client. Set the index.txt with arbitrary sizes and test the client.

DVMRP packet sample data (packet dump)

DVMRP (Distance Vector Multicast Routing Protocol) V3 Probe packet capture dump is as follows:

0000  01 00 5e 00 00 04 00 09 41 4d 89 b0 08 00 45 c0   ..^.....AM....E.
0010  00 20 69 40 00 00 01 02 ae 2e c0 a8 01 01 e0 00   . i@............
0020  00 04 13 01 0c 8d 00 0e ff 03 03 ab dd b4 00 00   ................
0030  00 00 00 00 00 00 00 00 00 00 00 00               ............

Monday, February 27, 2012

Few Questions for Embedded

What is static?
What is different when a global variable is declared as static and without static?
What the memory types of C?
When stack is allocated?
What is happening when malloc is called?
What library malloc is included?
What is difference between Semaphore and Mutex? What is the similarity?

Friday, February 3, 2012

Difference betweenn MII and RMII

In MII,

25 MHz clock is used and four data signals TXD0, TXD1, TXD2, TXD3 and RXD0, RXD1, RXD2, RXD3 are used.

But, in RMII, pins are reduced by half and clock is increased by double. 50MHz Clock is used and TXD0, TXD1 and RXD0, RXD1 signals are used. Other data pins are grounded.

Thursday, February 2, 2012

difference between Static and dynamic RAM

http://computer.howstuffworks.com/question452.htm

Your computer probably uses both static RAM and dynamic RAM at the same time, but it uses them for different reasons because of the cost difference between the two types. If you understand how dynamic RAM and static RAM chips work inside, it is easy to see why the cost difference is there,­ and you can also understand the names.
Dynamic RAM is the most common type of memory in use today. Inside a dynamic RAM chip, each memory cell holds one bit of information and is made up of two parts: a transistor and a capacitor. These are, of course, extremely small transistors and capacitors so that millions of them can fit on a single memory chip. The capacitor holds the bit of information -- a 0 or a 1 (see How Bits and Bytes Work for information on bits). The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell, the bucket is filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a leak. In a matter of a few milliseconds a full bucket becomes empty. Therefore, for dynamic memory to work, either the CPU or the memory controller has to come along and recharge all of the capacitors holding a 1 before they discharge. To do this, the memory controller reads the memory and then writes it right back. This refresh operation happens automatically thousands of times per second.
This refresh operation is where dynamic RAM gets its name. Dynamic RAM has to be dynamically refreshed all of the time or it forgets what it is holding. The downside of all of this refreshing is that it takes time and slows down the memory.
Static RAM uses a completely different technology. In static RAM, a form of flip-flop holds each bit of memory (see How Boolean Gates Work for detail on flip-flops). A flip-flop for a memory cell takes 4 or 6 transistors along with some wiring, but never has to be refreshed. This makes static RAM significantly faster than dynamic RAM. However, because it has more parts, a static memory cell takes a lot more space on a chip than a dynamic memory cell. Therefore you get less memory per chip, and that makes static RAM a lot more expensive.
So static RAM is fast and expensive, and dynamic RAM is less expensive and slower. Therefore static RAM is used to create the CPU's speed-sensitive cache, while dynamic RAM forms the larger system RAM space.

Wednesday, February 1, 2012

When pull-up is used?

Pull-up is used when multiple (at least two or more) outputs share a single pin. For example, multiple outputs connected in a bus or a single pin is used as input as well as output pins between two devices. So, it can be summarized as 1) bus 2) bidirectional input/output pins 3) High speed communication buses will need tri-state and will use pull-ups.

http://en.wikipedia.org/wiki/Three-state_logic

http://wiki.answers.com/Q/What_is_Tri-state_logic

Tuesday, January 31, 2012

What is EtherCAT?

EtherCAT - Ethernet for Control Automation Technology - is an open high performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs.


http://en.wikipedia.org/wiki/EtherCAT

For Electronics Circuit Design to start with

Do you know any FPGA vendors other than Xilinx and ALTERA?

low-tier FPGA companies: Lattice Semiconductor, SiliconBlue, Acrhonix, Quicklogic
start-ups: InPa

In that an FPGA vendor called Actel is bought by Microsemi.

Microsemi FPGA named product of the year
http://dangerousprototypes.com/2011/01/22/microsemi-fpga-named-product-of-the-year

Monday, January 30, 2012

Windows on ARM processors?

Yes, the next version of Windows7 will be Windows8 and it runs on ARM processors. But, the demo of Windows8 on ARM processors are tightly controlled by MicroSoft. We can expect many things new in Windows8.

Wednesday, January 25, 2012

do you know dynamically loaded libraries?

Apart from Static and Shared Libraries, there is a third type of libraries that are used by programs. These are called dynamically loaded libraries. These libraries are built as normal shared or statically linked libraries.

The difference is that they are not loaded at program startup, instead you would use the dlsym() and dlopen() application programming interface to activate the library. This is how you get web browser plugin's, modules (Apache), or just in time compilers to work. When you are done using the library, you would call dlclose() to remove the library from memory. Errors are handled via the dlerror() application programming interface.

See Dynamic Loading:

 http://en.wikipedia.org/wiki/Dynamic_loading

Dynamic loading is a mechanism by which a computer program can, at run time, load a library (or other binary) into memory, retrieve the addresses of functions and variables contained in the library, execute those functions or access those variables, and unload the library from memory. Unlike static linking and loadtime linking, this mechanism allows a computer program to startup in the absence of these libraries, to discover available libraries, and to potentially gain additional functionality.

What does /sbin mean?

sbin is short for static binaries.Those are the executable binaries statically linked with static libraries.