mercoledì 29 luglio 2009

LoadLibrary("netman.dll") failed


today I got in my hands a winp box with a problem: network connections folder empty, even if the computer was equipped with both a lan and a wlan controller correctly installed. Another symptom was the "network connections" service down and impossible to start (error 126 in my case). I then googled around and fount this tutorial from microsoft. Trying the suggested steps, I found an error when trying to regsvr32 netman.dll since the answer was LoadLibrary("netman.dll") failed - The specified procedure could not be found. I tried to reinstall a fresh netmon.dll from the o.s. cd but no success.
Trying all the other methods suggested on microsoft website didn't work (uh?). I then found this solution (thanks to this post):
  1. from a shell window, type ipconfig
  2. ipconfig will complain a "xyz.dll" file is missing (the missing file is not always the same).
  3. Find an xyz.dll copy and put it in the right folder (usual %windir%\system32)
In my case it worked! Now I would like an explanation. If anybody can tell my why.....

sabato 25 luglio 2009

Oracle 10g TNSListener error 3 ....

I faced with this error for one entire day: it became my nightmare! Basically the service OracleOraDb10g_home1TNSListener (running the oracle listener....uh really?) refused to start on my development box based on win xp. To be precise, the sw platform is:
Windows XP sp3
Oracle 10g 10.0.20
Since I found the solution (yes sometimes it happens!) here it is:

Symptom: TNS Listener service does not start giving error 3. Looking at TNSListener service properties, the executable path field is empty.

Cause: In my case the problem was generated by one of those (in)famous registry cleaners who removed some Oracle entries.

Solution: Insert the proper executable path (this should be done through regedit, it's very easy: in My Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\OracleOraDb10g_home1TNSListener add a string key ImagePath with value %ORACLE_HOME\BIN\TNSLSNR or wherever TNSLSNR.exe is).

At this point, if you have the same pattern I had, TNSListener won't start, giving a new error, with code 1053. Well, googling around I couldn't find a satisfying explanation about how and where this error is generated. Fortunately I remembered that few days before I ran one of those registry cleaning tools, which happily told me "hey I just removed 6MB of waste from you regedit". Unfortunately there were many entries related to ORacle. Readding these entries took my TNSListener service back to work. In case it might help, I post here the entries I needed to readd to registry.




mercoledì 22 luglio 2009

Pattern Visitor

Hi Folks,
today has been the OOP days, so I delighted myself with patterns! In particular I used the dear old Visitor Pattern in order to traverse a tree graph and do different tasks. As you know, Visitor uses the double dispatch technique in order to decouple elements from visitors, through accept() and visit() methods. Well I found this interesting paper suggesting the use of reflection techniques to avoid the accept() methods on element objects.

venerdì 17 luglio 2009

Having fun with conexant bt878 chip...


Dear all,
it's almost 3 days I'm fighting against an old capture card based on the famous bt878a chip produced by Conexant. The bt878a is able to acquire one PAL signal at 25fps (NTSC is supported too). This is the theory, now let's see the practice!

The card I'm using is a very cheap 4 composite input card. The design reference name is ucc4. More info are availables here. This card was born to be used (and this is what I'm trying to do) with video surveillance software.
The 4 inputs are all handled by the same bt878 chip, infact the bt878 integrates one programmable video mux.
This card was born during old win95/NT times and its official software (PICO 2000) is not much improved since then. Well, I'm not telling the complete truth. The 99% of PICO2000 implementations you may find online are an unsupported beta version, which calling it buggy would be an honor. The official version (PICO2000 1.9 when I'm writing this post) is not a wonderful example about "HOWTO design a GUI in 21st century" but I must admit is fast and reliable. So, what's the problem? Well, the problem is you have to pay for it. Nothing against commercial software (take a look at the job I do to live!) but nowdays the hw market offers much better DVR cards in terms of acquisition (having one chip only and 4 inputs means 7fps per input...) and video compression (i.e. h.264 compression onboard). So I believe UCC4 is nowdays a good solution for homemade video surveillance systems and I would like to have it working with a freeware solution.
I must say I'm a linux fan (I use it since almost ten years), but in this case I had the requirement to use Windows XP (for those interested, the card works under linux...). The motivation is trivial: most of home users have Redmond's o.s. on their pc and would not install linux just because of a 10$ card (yes this is ucc4 current value in Europe. In china it is sold at 0.99$)
Problem: the drivers bundled with these cards work with pico2000 sw only. Googling around I then found btwincap a sourceforge project aiming to produce WDM compatible drivers for these conexant chipsets. As you may read on btwincap websites each card can have different pins assignments, requiring the drivers to be aware about it (bt878a has 24 programmable I/O pins used for example to control external muxes). thanks to btspy, a tool available from btwincap guy and able to detect the pin assignments and produce a config file to be used during the driver install procedure, I was able to have ucc4 working with almost all my video acquisition softwares (I usually use AmCap for testing video acquisition hw).
Unfortunately all the sw I tested are unaware about the video mux issue, so I'm unable to display two or more channels concurrently. What I would need is a sw able to switch channels 4times per seconds, so driving the mux dynamically...this is what pico2000 probably does.
I'm very interested in solving this issue so I'm thinking about wiriting a piece of sw to do this. If you know some solution let me know!

A possible solution. Ok since there are tons of video surveillance sw, it would be a waste of time and efforts trying to write a new sw just to support a 10 years old card. What I'm thinking about is a sort of intermediate layer between btwincap drivers and video capture software. It would be enough a btwincap wrapper switching sequentially between enabled channels (so driving the video mux) . then this wrapper would expose 4 virtual channels to app layer with particular attention to video buffers. When a channel is freezed (because the chip is working in a time slot dedicated to another input channel) this wrapper would have to continue displaying the same frame. So even if the digital output is one (because we have one chip only) 4 buffers would be required anyway...

Here's attached the btspy report in order to have ucc4 working with btwincap:

General information:
Name:ucc4
Chip: Bt878 , Rev: 0x00
Subsystem: 0x00000000
Vendor: Gammagraphx, Inc.
Values to MUTE audio:
Mute_GPOE : 0xf00000
Mute_GPDATA: 0xf00000
Has TV Tuner: No
Number of Composite Ins: 4
Composite in #1
Composite1_Mux : 2
Composite1_GPOE : 0xf00000
Composite1_GPDATA: 0xf00000
Composite in #2
Composite2_Mux : 3
Composite2_GPOE : 0xf00000
Composite2_GPDATA: 0xf00000
Composite in #3
Composite3_Mux : 1
Composite3_GPOE : 0xf00000
Composite3_GPDATA: 0xf00000
Composite in #4
Composite4_Mux : 0
Composite4_GPOE : 0xf00000
Composite4_GPDATA: 0xf00000
Has SVideo: No
Has Radio: No

mercoledì 15 luglio 2009

watching english speaking tv abroad

Hi Folks,
probably many of you non native english speakers, would like to improve your own english knowledge as I do.
Many televisions stream their channels through the web. My favourite ones are: ABC and BBC . Unfortunately these channels do not broadcast outside their own countries (probably it's due to copyright restrictions). The restriction is based on ip-geolocation technologies. The funny thing is the amount of errors this approach generates. Infact, you can reside in the us or uk, but if your provider does some strange sort of routing, you might be banned too. There are blog posts saying it was impossible to reach bbc iPlayer website from the starbucks underneath bcc building in london!
Well since in this period I'm living in ITaly, I started looking for a solution. Among many P2P tv streaming softwares, like Sopcast, Joost, TVU Player, I was able to find tons of english based channels but most of them are crappy (advertisement channels or really boring monothematic ones).
At this time, the only working solution I have found is UKTelly. I did not study the technology behind it, but it appears like a uk based proxy. In this way you can watch BBC ITV and so on. All this c omes at a price: 149€ per year and I'm very doubtful about its legality (an aspect I'm very concerned about, especially when I pay!).
So, my final question is: did anybody find a better solution?

martedì 14 luglio 2009

Hello World!

Hi, I'm an Italian sw engineer and I just opened this blog, not as a dialy logbook, but as a repository where I can find out all the stuff I could need one day!
The topics will be different, ranging from computer science (mainly) to other hobbies like engines repairing and tuning.
So I apologize for the mess here around :)