変換名人 USB-RS232

| No Comments | No TrackBacks

RS-232C (D-Sub 9 pin) なポートがついているマシンを引退させるのに伴い、仕事で必要なので、適当に安い USB シリアル変換アダプタを買いました。



なんもせずにフツーに認識されてフツーに使えた。ややつまんないけど。

ドライバはそのまんま pl2303


Bus 005 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            3.00
  iManufacturer           1 Prolific Technology Inc.
  iProduct                2 USB-Serial Controller
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

VirtualBox などで使用する、仮想マシン用のディスクイメージ。これを効率的にバックアップするのには少しコツが要ります。既に広く知られているとは思いますが、個人的メモも兼ねて書いておきます。

Apple Products I Ever Bought

| No Comments | No TrackBacks

今までに買ってきた/所有してきた Apple 製品を思い出してみた。ただなんとなく。

故 Jobs 氏への強い思い入れは不思議とほとんどなかったのかな、 と改めて思いました。 むしろ Bill Atkinson さん、故 Jeff Raskin さん、 Andy Hertzfeld さん、Joanna Hoffman さん、といった、 エンジニアな方々への興味の方が強かったのかな、と。

要約:
日常的に Vine マシンとして使っている MacBook Early 2008 の後釜として、MacBook Air Middle 2011 を購入。現時点で Vine が MBA 上でどの程度動くか動かないか、とりあえず現状を確認しました。で、安定するまで当分は OS X 上の VirtualBox に Vine 環境を移そうか、と考えています。




Bought a MacBook Air (Middle 2011) - 11inch, US Keyboard, 4GB Memory, 128GB SSD and Core i7 - to replace my MacBook (Early 2008) that has served me very hard as a Vine Linux development environment as a daily basis for a few years.


[MacBook Air Mid 2011 11-inch]

To be honest, I always have used my whity MacBook with Vine - Mac OS X is always there on the harddrive in a separated partition, but I seldom booted it up on my MacBook - maybe once or twice a year? Another OSX machine at home, an old PowerMac G4 MDD, is still there and serving me as a daily basis as well, to store my huge digital music contents (almost all in lossless format) on iTunes (still hundreds of CDs left to get ripped though), and as a scanning machine (connected to the old SCSI A3 flatbed scanner).

The first thing I did on my new toy was to play around the new OS for a while that amazed me a bit. This was the first time for me to play with the multi-touch trackpad and gestures. I felt Gestures and "Mission Control" are really great for portable computers with small screens like this MBA 11inch.

And the next thing I gonna do was, of course, to figure out how well this brand new machine is supported on Linux - I know there are so much to get done on the Linux kernel, the X thing, and some userland utilities, to run Linux on the MBA 2011 flawlessly, but I just thought it was worth checking out and playing around.


[MacBook Air Mid 2011 11-inch vs MacBook Early 2008]

On my environment (VineSeed/Vine Linux 6 on MacBook Early 2008), the system always crashes with a kernel panic when trying to shut the system down like this:

panic occurred, switching back to text console
BUG: scheduling while atomic: swapper/0/0x10010000
Modules linked in: sit tunnel4 rfcomm sco bnep l2cap vboxnetadp vboxnetflt vboxdrv autofs4 sunrpc
ipv6 acpi_cpufreq freq_table mperf dm_mirror dm_region_hash dm_log dm_mod uinput snd_hda_codec_realtek
snd_hda_intel lib80211_crypt_tkip snd_hda_codec wl(P) snd_hwdep uvcvideo btusb snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq videodev bluetooth ohci1394 v4l1_compat snd_seq_device
applesmc snd_pcm_oss snd_pcm hwmon rfkill lib80211 ieee1394 led_class snd_timer snd firewire_ohci
soundcore firewire_core i2c_i801 snd_page_alloc sky2 input_polldev mbp_nvidia_bl pcspkr crc_itu_t
joydev iTCO_wdt iTCO_vendor_support appletouch processor battery thermal ac ata_generic pata_acpi
uhci_hcd ohci_hcd ehci_hcd i915 dkms_kms_helper drm i2c_algo_bit button i2c_core video output
[last unloaded: cpufreq_ondemand]
Pid: 0, comm: swapper Tainted: P       D     2.6.35-20vl6 #1
Call Trace:
[<c102d3a6>] __schedule_bug+0x1/0x56
[<c1359495>] schedule+0x83/0x4b9
[<f7d7b78e>] ? drm_crtc_helper_set_config+0x84/0x65b [drm_kms_helper]
[<c135999d>] _cond_resched+0x2e/0x47
[<c10c8b80>] __kmalloc+0xa8/0x145
[<f7d7b78e>] drm_crtc_helper_set_config+0x94/0x65b [drm_kms_helper]
[<c1005e37>] ?show_trace_log_lvl+0x39/0x43
[<f7d7aae8>] drm_fb_helper_force_kernel_mode+0x2b/0x5b [drm_kms_helper]
[<f7d7ab62>] drm_fb_helper_panic+0x17/0x1d [drm_kms_helper]
[<c104b6c3>] notifier_call_chain+0x14/0x16
[<c1359289>] atomic_notifier_call_chain+0x14/0x16
[<c1359289>] panic+0x73/0xbc
[<c1005c17>] oops_end+0x7a/0x88
[<c102088f>] no_context+0x115/0x11f
[<c102098a>] __bad_area_nosemaphore+0xf1/0xf9
[<c1020af0>] ? do_page_fault+0x0/0x2eb
[<c10209a4>] bad_area_nosemaphore+0x12/0x15
[<c1020c32>] d0_page_fault+0x142/0x2eb
[<c10080fd>] ?sched_clock+0x9/0xd
[<c104bfb3>] ?sched_clock_local+0x17/0x11e
[<c1020af0>] ?do_page_fault_0x0/0x2eb
[<c135b9b6>] error_code+0x66/0x6c
[<c104007b>] ? ignore_signals+0x21/0x27
[<c1020af0>] ?do_page_fault+0x0/0x2eb
[<f91a3e0d>] ?rtMpNotificationLinuxOnCurrentCPU+0xa/0x9d [vboxdrv]
[<f91a3a51>] rtmpLinuxWrapper+0x22/0x27 [vboxdrv]
[<c10572e7>] generic_smp_call_function_single_interrupt+0xa0/0xba
[<c1017e29>] smp_call_function_single_interrupt+0xa0/0xba
[<c135b546>] call_function_single_interuupt+0x2a/0x30
[<c104007b>] ? ignore_signals+0x21/0x27
[<f86fa1ea>] ? acpi_idle_enter_bm+0x24d/0x289 [processor]
[<c12b7475>] cpuidle_idle_call+0x73/0xce
[<c10023a3>] cpu_idle+0x4e/0x67
[<c1357280>] start_secondary+0x1a8/0x1ad

I'd been looking for the solution to the issue, and finally I found this was it:


The fix itself was very trivial:

--- src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c	(revision 73209)
+++ src/VBox/Runtime/r0drv/linux/mpnotification-r0drv-linux.c	(revision 73210)
@@ -77,7 +77,7 @@
  * @param pvUser2           The notification event.
  * @remarks This can be invoked in interrupt context.
  */
-static void rtMpNotificationLinuxOnCurrentCpu(RTCPUID idCpu, void *pvUser1, void *pvUser2)
+static DECLCALLBACK(void) rtMpNotificationLinuxOnCurrentCpu(RTCPUID idCpu, void *pvUser1, void *pvUser2)
 {
     unsigned long ulNativeEvent = *(unsigned long *)pvUser2;
     NOREF(pvUser1);

Now the fix has been included on VirtualBox-4.1.0-2vl7 (VineSeed).

Same fix for Vine Linux 6 (more precisely, packages for VinePlus/6) will be uploaded as 4.1.0-2vl6 as well shortly.

自宅のリビングのテレビに接続するメディアサーバ (xbmc とか vlc とか) 的な、省電力で安価なマシンが欲しかったので、ION + 定電圧 (CULV) 版 Celeron SU2300 という、変態(?)構成なマザーボード ZOTAC IONITX-P-E を購入し、ちょうどベータ版がリリースされている Vine Linux 6.0 をテストがてらインストールしてみました。


[ZOTAC IONITX-P-E]

Yesterday afternoon we went to the tennis school (where we once lived near and I had regular lesson for several years) with my daughter to see how the kids tennis lesson (“Kinder Class”) was like.

We just watched the class behind the fence - not the trial lesson for my daughter. Sorry for her - she complained that she wanted to join the class and play with balls and racquets. Very sorry for her. Anyway we watched 80% of the whole lesson - about 40 minutes - until my daughter got bored of standing behind the fence, watching the kids class on the tennis court.

Not bad. We saw two children (two four-years-old boys) in the class on that day, while on the neighbouring court “Players' Course” (a very serious class for teens who wants to be professional tennis players) was playing very hard. The two kids were having fun at the class, moving and playing with much joy. They didn't look like they got bored.

This is the startup screenshot of the soon-to-come Vine Linux 6.0 - the “script” theme from the Plymouth graphical boot animation.



To tell the truth I have been always wondering, why the progress bar on the boot-up screen looks like this. The progress bar is placed on the black background - the border is drawn in white colour - so the which is the progress bar itself, black one, or white one?

Seems like the “script” theme itself adopts black-coloured bar as a progress bar itself. So the following screenshot means that the boot-up process is now about 20% complete:



But don't you think it a bit strange? Sometimes do you see this as “the progress bar coming from the right side, now approximately 80% complete” or something?

I believe, in this example (black background, progress bar with white border), the following screenshot should represents “approximately 20% complete” far better:



If the latter one is still ambiguous, how about the following example whose border colour and the progress bar colour is bit different? I like this much better IMHO.



What would you think? Am I the only one who think it different?


P.S.
This change can be easily done by editing the following png files:

/usr/share/plymouth/themes/script/progress_bar.png
/usr/share/plymouth/themes/script/progress_box.png

And don't forget to execute “sudo /sbin/new-kernel-pkg --mkinitrd --depmod --install (kernel_version)” (kernel_version = 2.6.35-18vl6 for example) to take effect.


P.S. 2
Soon after this article was published, I noticed other Vine members were talking on the IRC channel about changing the default Plymouth theme from Script to Spinfinity - okay, okay - that's another solution to avoid the Script theme...


P.S. 3
Then here's yet another canditate from Daisuke-san - looking good. The very best IMHO. Now we can clearly distinguish the progress bar itself - no confusion here.


digikam can't compile on the current version of VineSeed (development/unstable version of Vine Linux, and soon-to-be Vine Linux 6.0).

I found the following lines on the CMakeLists.txt in the digikam source code:

# Extract version of libjpeg so that we can use the appropriate dir
# See bug #227313, #228483
FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
STRING(REGEX REPLACE ".*#define +JPEG_LIB_VERSION +([0-9]+).*" "\\1" jpeglib_version "${jpeglib_h_content}")
MESSAGE(STATUS "Identified libjpeg version: ${jpeglib_version}")

IF ("${jpeglib_version}" LESS 80)
    SET(DIGIKAM_LIBJPEG_DIR libjpeg-62)
ELSE ("${jpeglib_version}" LESS 80)
    SET(DIGIKAM_LIBJPEG_DIR libjpeg-80)
ENDIF ("${jpeglib_version}" LESS 80)

while on the other hand VineSeed now has libjpeg-turbo instead of the ancient libjpeg6b.

jpeglib.h from libjpeg-turbo does NOT have the line starting from #define JPEG_LIB_VERSION: instead the declaration is in another header file jconfig.h like this:

#define JPEG_LIB_VERSION 62

So the trivial hack (until the upstream fix this tiny issue) is like this:

--- digikam-1.9.0/CMakeLists.txt.orig   2011-02-28 05:16:18.000000000 +0900
+++ digikam-1.9.0/CMakeLists.txt        2011-06-08 14:10:15.000000000 +0900
@@ -153,7 +153,9 @@
 
 # Extract version of libjpeg so that we can use the appropriate dir
 # See bug #227313, #228483
-FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
+# VINE: better check jconfig.h in place of jpeglib.h on libjpeg-turbo
+# FILE(READ "${JPEG_INCLUDE_DIR}/jpeglib.h" jpeglib_h_content)
+FILE(READ "${JPEG_INCLUDE_DIR}/jconfig.h" jpeglib_h_content)
 STRING(REGEX REPLACE ".*#define +JPEG_LIB_VERSION +([0-9]+).*" "\\1" jpeglib_version "${jpeglib_h_content}")
 MESSAGE(STATUS "Identified libjpeg version: ${jpeglib_version}")

現在の手元のマシン (MacBook w/ Intel GM965 Graphic Controller) の VineSeed、XOrg 1.10.0xorg-x11-drv-intel-2.14.0-2vl6.i686Adobe Flash Plugin10.2.152.27 で、

を観ようとすると、



。。。。

どこか懐かしさもある、大昔遊んだマイコンのテレビゲームみたいな。。。。




結局、Flash の ハードウェアアクセラレーションを無効にする、というのが正解だった模様です。特定の YouTube 映像のみでおかしくなっていたので、まあなんか特定のエンコーディング用のアクセラレータの問題ではないかと思ってはいたのですが。
なにせ VineSeed でちょうど XOrg 1.10 一式が投入された直後ということもあり、原因はなんだなんだということに。。。



<d> flash10.2からVAAPI/VDPAUつかったh264のアクセラレーションが使われるようになったのだけど
<d> h264のプロファイルによっては壊れる
<d> &一回こわれるとflashプロセスを殺さないと
<d> 全部に影響するっぽい

ということだと。だいさめ 情報サンクス。


Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en

Recent Comments

  • Akisan: ご教示ありがとうございました。 ヘッドユニットが故障したので、修理ではなく国産品に交換したのですが、時計と温度計は生きています。 これが消えると寂しいと思っていたので、そうではないことがわかり安心しました。 eBay UK に注文しておいたアダプタが到着しましたので 早速取り付けようと思います。 また何かわからないことがありましたら、ご指導をお願いします。 read more
  • Shaolin: Akisan さん、こんにちは。 このアダプタを装着しても、時計と外気温は依然表示されてますよ。この両者の表示は、オーディオユニットから接続され来ているわけではなく、独立して持っているということなのでしょうかね。 read more
  • Akisan: Clio2/Ph2乗りの Akisan と申します。 私もこのアダプタを取り付けようと思っていますが、教えていただきたいことがあります。 オレンジ色のコネクタをディスプレイ・パネルからはずしてアダプタにつけるとのことですが、そうすると、ディスプレイ・パネルには何も接続されないことになりますので、ディスプレイには、時計や外気温が表示されないことになるのでしょうか? read more
  • Tennisschuhe Expert: I think tennis would be a great sports. It is read more
  • t_dragon_2000: おー、これはかなりの情報ですねえ。 ありがとうございます。 しかも、このデッキは現役で使ってます。 ロータリコマンダーは今も使っているのですが、 デッキ交換したときにどうしようかと思っていました。 いつまでも残してください。 read more
  • T. Asakura: 10年以上、ご無沙汰してます。基礎工、Mi16で少しだけ先輩の朝倉です。このRSに9年以上乗ってます。これも良いクルマです。(あれももちろんでしたが、たまに思い出します。)あまりの偶然にコメントしました。また、情報共有したいですね。良かったらメールください。朝倉 read more
  • Shaolin: いぶすきさん、ありがとうございます。 ISO 4040 自体は http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=44856 にあるようですが、66 CHF、約6,000円弱って... というわけで、他を探してみると、 http://www.tazi-k.net/daybook/2007021.html の、2007年2月14日分の記述が詳しいようです。 read more
  • ibuski: 4040だって。 read more
  • Shaolin: ええ、是非どうぞ。 405助手席ダイニングチェアーが完成したあとにでも、 うちに遊びに来て下さい。 match さんや吉池さんもご一緒に。 read more
  • takemoo: 21世紀の車へようこそ!(まぁ設計はお互い20世紀ですが…) >低速走行時にリアがぴょこぴょこと小刻みに跳ねるような挙動をとることです。 そうそう、これが気になったんですよ>ルーテシア まぁ、いまどきの車(笑)はボディ剛性が上がったせいで、こういう挙動をすることがままあるらしいですが・・ >いいところどりをして、更に洗練度が増した、とでもいえるかも ほほう、それは魅力的ですなぁ。 今度乗せてください。 read more

Find recent content on the main index or look in the archives to find all content.