甘巴茶

2.6.13 Kernel on Jornada 720

Posted by chhsu on April 3, 2006

I used Vanilla Kernel from http://www.kernel.org and patched it with simigern's patch file.
That still had problems when Jornada 720 boot from linexec.

I recompiled the linexec.exe with wine and MSVC STD on Linux. That is really interesting when I build the linexec.exe first time. I nerver compile the execution file for windows in Linux environment.

When I compile the linexec.exe I get error message which is can't found "winver.h" file. I searched it from my MSVC directory (/usr/local/msvc-arm/) and got nothing. I think that file didn't include to the msvc-arm.tgz that I download. So I make it to be comment and enforces the GCC ignore it. After this step, I got a new linexec.exe from my host pc.

I put the linexec.exe to the CF card and tigger it from WinCE. Yes!!! It works on Jornada 720, but the kernel compiled by myself still didn't work.

Posted in 企鵝 Linux | 1 Comment »

The 3G/GSM/GPRS and PHS PCMCIA modules on Linux

Posted by chhsu on March 31, 2006

I spent some time to search the HOWTO for 3G/GSM/GPRS modems on Linux. I found some useful documents.

Setup your 3G/GSM/GPSR PCMCIA cards on Linux.

http://www.pharscape.org/content/blogsection/4/53/

Option GlobeTrotter HowTo (GPRS)

Option Fusion HowTo (UMTS/GPRS and WLan)

Vodafone 3G HowTo (UMTS/GPRS)

GCOM – a 2G/3G datacard utility

That's all from this blog http://www.pharscape.org/ .

3G system in Taiwan:

3G Testing Report from CNET

3G service from TWN

3G PCMCIA card from FETNet (pdf)

PHS system:

Modules: WiWi MC-P300 ( SII MC-P300 )

http://www.linet.gr.jp/~manabe/PPxP/message/index2.html

I borrowed the Benten GSM/GPRS (BGC-100) CF card from my friend. It's work fine on Linux. And I use minicom to communicate with it by AT commands. In my laptop , the device name is /dev/ttyS1 that is a softlink to /dev/modem and the minicom setting are 115200bps, 8N1, enable HW flow control.

When I try to establish a phone call the device give me a "NO CARRIER" message. The steps in below:

AT+CPIN="your pid number" 

The device report "OK" 

ATD09xx0xx0xx    ( ATD[phone number] ) 

The device report "NO CARRIER"

 I don't know what's happened? I think that is my call establish flow incorrectly. If I get correct flow I will post in my blog.

 

 

Posted in 無線網路 Wireless, 參考 Reference, 企鵝 Linux | 5 Comments »

Linux booting on Jornada 720 (1)

Posted by chhsu on March 29, 2006

My research needs some handheld equipments like iPaq that using linux to be OS. I found a lot of resources from http://www.handhelds.org . I got a device Jornada 720 from our lab.

I tried to put 2.4.19 kernel and rootfs images to Jornada 720. I successed to boot with Linux in my device. And that work well but the wireless card(Cisco AIRONET 350) can't work. That's no device driver for it. I am going to prepare device driver for it and upgrade kernel image to version 2.6.x.

Today, I spend 4 hours to compile and patch kernel image. The kernel tree from cvs server of handhelds.org have compiling troubles. Now, I fixed it and got a new kernel image for Jornada 720.

The compiling bugs( Kernel version: 2.6.13-hh2):

  • soft_cursor issue:

In Tag 2.6.15, the CONFIG_FG_SOFT_CURSOR definition was removed from drivers/video/Kconfig. In 2.6.13-hh2 didn't remove.

If use "make jornada720_defconfig" to configure kernel, please select option "SA1100 FB support".

      • vmlinux.lds.S issue:

      Remove least 2 line in vmlinux.lds.S.

      • cpufreq_get function issue:

      Duplicated defines in arch/arm/mach-sa1100/generic.c and drivers/video/cpufreq/cpufreq.c.

      Please modify the pound define in generic.c file and skip this problem.

      Posted in 企鵝 Linux | Leave a Comment »

      Gentoo Linux

      Posted by chhsu on March 28, 2006

      I re-install gentoo(2006.0) linux on my desktop. That have some things need notice:

      • Firefox-bin portage and scim protage.

      While I starup Firefox-bin after "emerge scim". Firefox will crash with scim daemon is running.

      Solution: Don't use Firefox-bin, try "emerge mozilla-firefox".

      • Vmware setup problem:

      Vmware need kernel support "Loadable module support" and "Module unloading".

      http://www.electrictoolbox.com/article/applications/install-vmware-gentoo/

      • Xwindows screen resolution problem:

      Use xorgcfg to configure the /etc/X11/xorg.conf file. Please don't try modify by yourself. That will causing some problems that you don't know how to solve.

      • High memory support on kernel:

      If your have over 1G memory on your desktop, please turn on "High Memory Support".

       

      under 1G (includes 1G): select off

      1G ~ 4G: select 4GB

      upper 4G: select 64GB

      http://kerneltrap.org/node/2450

       

      Now, I install XP Pro on VMware guest system. After this, I have list to install.

      • OPnet
      • AcitveSync (XP)
      • NS2
      • Cross Compiler

      Posted in 企鵝 Linux | Leave a Comment »

      MS Virtual WiFi

      Posted by chhsu on February 10, 2006

      Original link

      Connecting to multiple IEEE 802.11 networks with one WiFi card

      可以讓一張無線網,在系統上模擬出兩個以上的無線網路置,利用802.11 Power saving mode來作為切換無線裝置的方法。

      裡面包含原始碼與執行檔,剛剛稍微拿來玩了一下,只是忘記測試routing的部份,使用上還不是那麼的好用,不過也確實看到了連線成功的部份,還蠻有趣的。

      Related research

      #1 A survey on wireless mesh networks , 2005 JNL

      #2 Multi-Channel MAC for ad hoc Networks_ Handling Multi-Channel Hidden Terminals using a Single Transceiver , 2004 CNF

      #3 Implementing a low power TDMA protocol over 802.11 , 2005 CNF

      Open Source Project

      #1 Wireless Radio Software Switch

      #2 GNU Radio: Software Defined Radio

      #2 Unified Link Layer API

      Thinking:

      #1 Is possible to implement to Linux and support all wireless cards?

      #2 The original thinking is about prue 802.11 wireless network. If the “wireless” includes WUSB , BT , GPRS, … etc, is possible?

      Posted in 無線網路 Wireless, 研究 Research | Leave a Comment »

      DHCP relay agent

      Posted by chhsu on February 10, 2006

      Blog:

      椰子殼 – DHCP relay agent

      RFC

      #3046 DHCP Relay Agent Information Option

      #3361 Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers

      Tutorial

      DHCP – Relay Agent for Windows Server 2003

      Posted in 研究 Research | Leave a Comment »

      SCTP notification note

      Posted by chhsu on November 24, 2005

      The SCTP notification are alerts to peer clients and while the peer clients received the notification packets,peer client SCTP layer will genereate events to upper layer with ULP.

      The notifications(SCTP to ULP) include below :

      1. DATA ARRIVE notification
      2. SEND FAILURE notification
      3. NETWORK STATUS CHANGE notification
      4. COMMNUICATION UP notification
      5. COMMUNICATION LOST notification
      6. COMMUNICATION ERROR notification
      7. RESTART notification
      8. SHUTDOWN COMPLETE notification

      I traced source code from linux kernel 2.6.x . You can find the functions like sctp_ulpevent_type_enabled() from ulpevent.h,and follow after it is sctp_ulpq_tail_event() function to transmit.

      
      Linux/net/sctp/chunk.c
      ----------------------
      75 /* Final destructruction of datamsg memory. */
      76 static void sctp_datamsg_destroy(struct sctp_datamsg *msg)
      77 {
      78         struct list_head *pos, *temp;
      79         struct sctp_chunk *chunk;
      80         struct sctp_sock *sp;
      81         struct sctp_ulpevent *ev;
      82         struct sctp_association *asoc = NULL;
      83         int error = 0, notify;
      84
      85         /* If we failed, we may need to notify. */
      86         notify = msg->send_failed ? -1 : 0;
      87
      88         /* Release all references. */
      89         list_for_each_safe(pos, temp, &msg->chunks) {
      90                 list_del_init(pos);
      91                 chunk = list_entry(pos, struct sctp_chunk, frag_list);
      92                 /* Check whether we _really_ need to notify. */
      93                 if (notify
      94                  asoc =chunk->asoc;
      95                         if (msg->send_error)
      96                                 error = msg->send_error;
      97                         else
      98                                 error = asoc->outqueue.error;
      99
      100                         sp = sctp_sk(asoc->base.sk);
      101                         notify = sctp_ulpevent_type_enabled(SCTP_SEND_FAILED,
      102                                                             &sp->subscribe);
      103                 }
      104
      105                 /* Generate a SEND FAILED event only if enabled. */
      106                 if (notify > 0) {
      107                         int sent;
      108                         if (chunk->has_tsn)
      109                                 sent = SCTP_DATA_SENT;
      110                         else
      111                                 sent = SCTP_DATA_UNSENT;
      112
      113                         ev = sctp_ulpevent_make_send_failed(asoc, chunk, sent,
      114                                                             error, GFP_ATOMIC);
      115                         if (ev)
      116                                 sctp_ulpq_tail_event(&asoc->ulpq, ev);
      117                 }
      118
      119                 sctp_chunk_put(chunk);
      120         }
      121
      122         SCTP_DBG_OBJCNT_DEC(datamsg);
      123         kfree(msg);
      124 }
      
      In the line 200 of the ulpqueue.c , and the event will tail to SCTP queue list.
      
      linux/net/sctp/ulpqueue.c
      163 int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
      164 {
      165         struct sock *sk = ulpq->asoc->base.sk;
      166         struct sk_buff_head *queue;
      167         int clear_pd = 0;
      168
      169         /* If the socket is just going to throw this away, do not
      170          * even try to deliver it.
      171          */
      172         if (sock_flag(sk, SOCK_DEAD) || (sk->sk_shutdown & RCV_SHUTDOWN))
      173                 goto out_free;
      174
      175         /* Check if the user wishes to receive this event.  */
      176         if (!sctp_ulpevent_is_enabled(event, &sctp_sk(sk)->subscribe))
      177                 goto out_free;
      178
      179         /* If we are in partial delivery mode, post to the lobby until
      180          * partial delivery is cleared, unless, of course _this_ is
      181          * the association the cause of the partial delivery.
      182          */
      183
      184         if (!sctp_sk(sk)->pd_mode) {
      185                 queue = &sk->sk_receive_queue;
      186         } else if (ulpq->pd_mode) {
      187                 if (event->msg_flags & MSG_NOTIFICATION)
      188                         queue = &sctp_sk(sk)->pd_lobby;
      189                 else {
      190                         clear_pd = event->msg_flags & MSG_EOR;
      191                         queue = &sk->sk_receive_queue;
      192                 }
      193         } else
      194                 queue = &sctp_sk(sk)->pd_lobby;
      195
      196
      197         /* If we are harvesting multiple skbs they will be
      198          * collected on a list.
      199          */
      200         if (sctp_event2skb(event)->list)
      201                 sctp_skb_list_tail(sctp_event2skb(event)->list, queue);
      202         else
      203                 __skb_queue_tail(queue, sctp_event2skb(event));
      204
      205         /* Did we just complete partial delivery and need to get
      206          * rolling again?  Move pending data to the receive
      207          * queue.
      208          */
      209         if (clear_pd)
      210                 sctp_ulpq_clear_pd(ulpq);
      211
      212         if (queue == &sk->sk_receive_queue)
      213                 sk->sk_data_ready(sk, 0);
      214         return 1;
      215
      216 out_free:
      217         if (sctp_event2skb(event)->list)
      218                 sctp_queue_purge_ulpevents(sctp_event2skb(event)->list);
      219         else
      220                 sctp_ulpevent_free(event);
      221         return 0;
      222 }
      
      To be continue...
      

      Posted in 企鵝 Linux | Leave a Comment »

      Nice referenced books about kernel

      Posted by chhsu on November 23, 2005

      The Linux Networking Architecture: Design and Implementation of Network Protocols in the Linux Kernel

      by Klaus Wehrle, Frank Pahlke, Hartmut Ritter, Daniel Muller, Marc Bechler

      這一本?錯的?考書?,?於?寫kernel tcp/ip程?的人事很好的?考書?,?外?本書後?有列出一些網路資?,很實用有興趣的人?以看看。

      Linux Kernel Development

      by Rober Love

      這本書是我從Kernelnewbies的網站上看到的,剛剛?翻了一下,讀起來還?賴,等有比較深入的了解在跟大家報告。

      Posted in 書籍 Books | Leave a Comment »