Sunday, July 19, 2015

Cordless drill baterry lesson

I've got an interesting challenge. Black and Decker cordless drill CD12C without charger. Ok machine but obviously useless without charger. After some investigation on Internet I found suitable charge for about 60 EUR. However, believe or not I found also complete new Makita 6271DWPE with two!!! batteries and charger for 85 EUR on web store. This makes absolutely no sense! Some people call this a "business". So, why should I buy the charger for 60 EUR if whole new machine costs just 25 EUR more.

At the same time I found one Makita charger DC1414T. The question popped up: how to charge Black and Decker battery by Makita charger?

Here is the drill itself:

Here is the Makita charger, with spec. from 9,6 V up to 14,4 NiMH / NiCD batteries:

Note 5 terminals on the charger.

Here are some pictures of the Black and Decker battery. While googling it seems like that this is compatible with DeWalt batteries as well. There are only 3 terminals on this battery. After partial disassembling I found out interesting thing. The third terminal is ground (-) of 1/2 of the battery pack and NOT any thermistor as it was mentioned on some forums.



I've tried first to connect battery and charger simple way : positive to positive and negative to negative. Just to see if Makita charger would deal with it. However, the charger detected battery "temperature problem" and it wasn't charging. So, I had to cheat the charger to start charging. Thermistor is a safety part - it will stop charging if the temperature is too high. BUT, can not be that big issue if Black and Decker doesn't have such a feature at all.


I got original Makita battery pack and measured the resistance between thermistor and negative terminal at room temperature and right after charging (warm battery).




Here is a picture of battery schematic including measured values of thermistor.

So, final solution was to fake the thermistor by a fixed resistance in order to cheat the charger. I have used constant resistor of 16 kohm. Here is the final solution and yes! it's charging! (red light blinking)


Conclusion: The best is to have any charger for 9,6 - 18 V for NiMH/NiCd batteries. It's possible to charge ANY type of NiMH/NiCd battery pack using some cables and crocodile clamps. Of course, I'll modify the charger later on by soldering cables inside and make some more "comfortable" connections + clear marking of the terminals.

Based on a request I made also schematic to show connections between battery and charger (it is simple):


PS: Be extremely careful to not cross-connect some terminals, you can damage charger or battery or both.

Wednesday, May 21, 2014

Dell Precision M4800 with Ubuntu Linux 14.04 (15.04 all the way down)

I would like to share in this blog my experience with laptop Dell Precision M4800. As you might know Dell is offering several variations of this product. My configuration is here:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d4)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
00:1c.6 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #7 (rev d4)
00:1c.7 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #8 (rev d4)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04)
00:1f.2 IDE interface: Intel Corporation 8 Series Chipset Family 4-port SATA Controller 1 [IDE mode] - Mobile (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GLM [Quadro K1100M] (rev a1)
03:00.0 Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)
11:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)

Note especially wireless adapter type:
03:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)

Quick summary of the challanges:
  1. Broadcom wireless card
  2. NVIDIA Optimus system with two graphic adapters
1. I have spent quite a bit if time on the broadcom wireless card. I have basically tried all possible "advices" found on internet with various drivers and methods e.g. ndiswrapper, STA driver, pre-compiled from repositories and also I tried to compile myself. Currently, the version of STA driver is 6.30.223.141.
  • ndiswrapper found the driver, but WiFi was not active, even though the driver says that device is found
  • pre-compiled driver in repositories broadcom-sta-dkms ver. 6.30.223.141-1 discovered all networks and hardware but it was not able to connect to any network - authentication window was popping up over and over again
  • my own compilation of the driver directly from broadcom web page http://www.broadcom.com/support/802.11/linux_sta.php was not working due to some errors in the code (note, that I'm 100% sure, that all necessary packages for compilation was installed). I have used this page as a guideline: http://forum.osxlatitude.com/index.php?/topic/6339-ubuntudebian-14e443b1-broadcom-corporation-device-43b1-rev-03/

Finally, you wouldn't believe what was the solution - installation of older driver release. I have downloaded from here:
https://launchpad.net/ubuntu/saucy/amd64/bcmwl-kernel-source/6.30.223.30+bdcom-0ubuntu3
After installation and restart of comupter everything was working like a charm!

2. At the beginning I was afraid, that NVIDIA Optimus Quadro K1100M and Intel Internal card arrangement will be an issue. After I have just downloaded NVIDIA proprietary driver and install it via command line my screen didn't turn on! My mistake! I should first google!
Than I re-installed the system and installed following packages:
  • nvidia-prime (latest revision 0.6.2) from Ubuntu repositories
  • nvidia binary driver (version 331.38) from Ubuntu repositories
Note, that there has been quite some dependencies selected automatically during the installation. After restart everything was running perfectly.
All other hardware is running out of box e.g. sound system incl. microphone, web camera, card reader etc.
I have to admit, that I haven't still tested bluetooth functionality. Once I do it, I'll update the post. Enjoy!

Just a recent update on Ubuntu 15.04:
I have installed right now fresh install of Ubuntu 15.04. As I can see from Synaptic manager there is this version of wireless driver 6.30.223.248+bdcom-0ubuntu2. The wireless is now working out of box and no need of downgrade is necessary. Similarly to graphics. I have just installed recommended proprietary drivers and all is working like a charm. Good job Ubuntu!

Sunday, April 13, 2014

WOT on Ubuntu Linux

This time I'll try to share some experience with WOT - World of Tanks.
Most probably it is "discovering" the wheel.
Firs of all here is my setup for playing World of Tanks:
- Play on Linux
- Worl of Tanks 8.11

A good hint is to disable the torrent download, which is due to some reason not working and it's stopping after a while with error. It is possible to disable it by clicking on small spanner button in upper right corner of initial start-up window.

The second possible reason is to download torrents updates manually and place it in folder /home/"user"/PlayOnLinux's virtual drives/WorldOfTanks/drive_c/Games/World_of_Tanks/Updates. After download of torrent just restart the game.


The only interesting part is how to run the game reply in let say comfortable way:
  1. Start your Play on Linux and select your World of Tanks installation
  2. Click Configure
  3. In tab General choose Make a new shortcut from this virtual drive and call it e.g. WorldOfTanksReplay
  4. Refer to worldoftanks.exe (not WOTlauncher!)
  5. Again under General tab use following in the Argument filed: replays/replay_last_battle.wotreplay

6. Than close and create shortcut on your desktop if you want
7. One of important settings is in WOT itself - in your settings choose Enable battle recording - Last
This means that your last game will be always recording and you can replay it by double clicking on the icon.
Enjoy!

Monday, October 8, 2012

NAPA descriptions deeply

The following blog might be a bit too advanced for beginners. However, if users are wondering how NAPA db looks like there is a way how to look into it. By "looking into" any object in NAPA dbs you can basically access absolutely whatever data (even the one not "officially" accessible in other ways).

So what's the trick? Of course few commands. Here they are:
!MAP
and
!DML

!MAP command is showing the content of the memory. It means it's showing all "descriptions", which are accessible at the moment in runtime memory. All these objects are flagged by so-called reference number. It's an id, which is used for handling of "descriptions".

!DML command is used for listing (showing) the "description" from the memory on the screen (into NAPA main window).

Note: If the "description" is not yet in the memory, you can easily make it accessible by DB.READ service function (or DB calculator command).

Probably the most straight forward way to show the functionality is to make an example:
E.g. you are wondering how the NAPA setup is stored in the system.


  • Let's make a setup called SET1 like this: SET,  Z=0.9, Z=5, Z=8, PROF
  • Get it into the runtime memory (rn is variable containing the reference number): @rn=DB.READ('SETUP*SET1','-',1,'-','E')
  • Now use !MAP command to see all descriptions in the memory: !MAP
     ******** DESCRIPTIONS IN MEMORY ******** 
     name                      type        date      refnr  nrec   nwords
     SETUP*SET1                   0  1539119694      22022     1       10
  • In my case the reference number is 22022. Now we can have a look at the record in NAPA db of our setup: !DML 22022
 *******************DESCRIPTION LISTING*******************

 SETUP*SET1                  TYPE:       0 DATE:   1539119694

 LISTING OF RECORD     2000   TYPE:   3   SIZE:    2
     1     SET
     2     Z=0.9, Z=5, Z=8, PROF

 *******************END OF DESCRIPTION LISTING*******************

As you can see it's not any surprise, but this is only simple example. It's much more interesting on tables or loading conditions. Someone can now ask how to access these data. For this purpose there is a calculator command REC.
@array=REC(22022,2000)
!VAR LIS array
SET                   Z=0.9, Z=5, Z=8, PROF
!CAL array(2)
Z=0.9, Z=5, Z=8, PROF

As you can see from above, NAPA dbs are storing data in relatively simple way using sets of arrays. Each object (description) is matrix (vector of vectors/2D array), while descriptions are flagged by reference number and each array is flagged by so-called record number (2000 in example above). It is not always 100% clear what all "records" are containing - this is NAPA company know-how, but in many cases it is really easy to understand just by looking at the examples.

Friday, June 10, 2011

HOW TO : Panic exit in NAPA

"Panic Exit" error message is well known for all NAPA users. If I'm not wrong they've changed it in 2008 release into something like this :
Now you maybe ask yourself how long I had to wait to write this post until I managed to get the message. Answer : Not much :o)
Following procedure was tested on NAPA rel. 2010.2-3 and also 2010.2-4 but feel free to test it on other releases as well.
  1. Start NAPA
  2. Open project (e.g. use PRO command)
  3. In main window menu go to TASK->LOADING CONDITIONS->LOADING CONDITIONS
  4. Use open button or FILE->OPEN
  5. And now type name of existing loading condition, in my case L30
  6. In upper left corner click by mouse on either Detailed list or Properties list
  7. And afterwords click on another loading condition than you've typed before
  8. there you go - Panic Exit - enjoy
Let me some complains. It's a bit odd, that NAPA has quite high price+maintenance and at the same time the focus is not on already existing basic tools but on building new ones. Or maybe by other words, there was no improvement of text editor for years, but every year there is some "new" and "fancy" manager application. Another think is, that NAPA guys develops only the features which are asked by rich customers with high number of licenses. Other users has probably only bad ideas about NAPA.

Sunday, October 10, 2010

Simple but useful command

This blog will be very short. It will describe a command which you can use for searching in macros (DATA*) or eventually lists (LIST*) for a string. The result of command is list of macros, which contains the string you search for. This is very useful in case you are searching for some example of some command e.g. in NAPAdb. Of course, there are many other possible purposes. Difficult part of the command is syntax and proper form of apostrophes. Below is self-explaining example :
@list=ARR(3)
@AD.SELECT(7,'DATA*',list,'','','LOC<''searched_string''')
!var lis list

Saturday, October 9, 2010

Dell Precision M4500

I just got in my hands new laptop Dell Precision M4500. It is quite new model from Dell and I'm going to describe you some issues during getting Linux on it.

So I've downloaded my favorite Linux distribution Mandriva 2010.1 in its latest release. After installation and first restart I got blank (black) screen already during booting. Of course, the problem was with video card NVIDIA FX1800M and it's drivers. Than I had to start system into safe mode - command line interface.
In order to be able to install proprietary deriver from NVIDIA, it is necessary to install following packages : binutils, gcc, make, kernel-source, kernel-server-devel.
code :
su (+enter password)
urpmi --auto-update
urpmi binutils --auto-select
etc.
sh ./NVIDIA-LINUX-x86-....(use name of your driver)
Installer will guide you through the installation and after restart you should be able to start system normally. Note : if you need to uninstall some package use command urpme.

Next issue was to get working my wireless : Broadcom Corporation Device 4353 (rev 01). To find out what wireless card (+other devices) you have, you can use command lspci -nn. Do not install broadcom-wl driver, it wont work. The only way I get it working was by ndiswrapper. So go to Mandriva Control Center->Install&Remove software and install ndiswrapper. Than go to Network & Internet tab->Set up a new network interface->Wirelelss->Use a Windows driver (with ndiswrapper )->pick up file with windows driver. You should download a windows driver unpack it and find files bcmwl5.inf and bcmwl5.sys. After all this steps, you can finally configure your wireless as usually.

Let's fix the last issue...Microphone is not working neither with pulse audio neither with alsa. First I've disabled pulse audio in Mandriva Control Center->Hardware->Sound configuration->uncheck "Enable pulse audio" :
Than open console, login as root "su" (+enter password). Open e.g. midnight commander by command "mc" and go to following folder : /etc/modprobe.d/ . Create a new file there with name alsa-base.conf and insert into it following line : options snd-hda-intel model=dell-s14. Restart computer and now microphone should work. Of course also open mixer and check if the channels are not muted or too low volume.

Overall I'm quite happy with this laptop, but once again was proved, that new hardware is not well supported by Linux. I have this experience on all my laptops. All the issues was solved "out of box" later, based on users experiences and debugging. Hopefully this blog will  be useful for others as well. Let me know by mail in case of some comments or questions.

Saturday, June 20, 2009

Customizing of environment - part 1

The name of this post is covering quite extensive part of NAPA and many issues. We can customize more less everything in NAPA. Sounds amazing?
So lets make a list from top of my head what you can customize :


  • resources of NAPA - it means, that you can change color, fonts, sizes of different "building blocks" of environment. e.g. color of text windows, hight of text in whole environment, the color of windows ....

  • additional buttons - you can add new buttons in all NAPA windows below main toolbars, but you can also add menu items in your current menu (I know how to do it at least in main window)

  • change default icons to something you like more or you can create your own

  • windows and tools as new widgets - this option is giving almost whatever possibilities and of course you can create your own NAPA tools

  • managers - this is the most common and official way of NAPA customization

In this post I'll start with adjusting of so called resources/resource files. Below is an example of two versions of resource files.




The first screenshot represents default theme and the second my own settings. I made 4 different settings.

  1. Background color

  2. Foreground color

  3. Text background color

  4. Size of the text

If you want to do the same you have to save a text file of this shape :

napa*background : Dimgray
napa*foreground: White
napa*XmText.background: Darkgray
!ADD RES*SMALLLAYOUT


And save this as either RES*your_user_ID or RES*SYSTEM into database SYSDB (DB2). The first form is for customizing of your own run of NAPA and the second is for all users.

Saturday, May 30, 2009

My current Linux distribution

Right now, I'm getting more and more experiences with my Mandriva 2009.1 Spring distribution. In this post I would like to point some advantages of this distribution.

I have to make a conclusion at the beginning of the post. :o)
I love it.
It is the best distribution I've ever tried. Anyway, I'm impressed by it's features and abilities. I'm not a typical Linux user - I don't want to set up/install everything by command row. I just like the clicking tools and to have all the options summarized in nice GUI (graphical user interface). This is what new Mandriva offered to me. Let's go through some steps I made on my installation.
  1. Installation itself was easy and intuitive. I was installing on external USB HDD. If you install also on a system with other OS or not to a primary hard drive you have to be careful with choosing proper partition for installation and also with writing of boot-loader. I made all settings by myself - it is not that difficult.
  2. The next step was fixing some hardware drivers. The first one was wireless. I have on my laptop Intel PRO/Wireless 3945ABG adapter. I opened Mandriva Control centre and choosed "Browse and configure hardware". After clicking on Ethernetcard->RO/Wireless 3945ABG->Run config tool system informed me that I need to download driver for Intel website. I was following the instructions and in a minute I got running wireless connection. I used similar procedure for setting up a drive for my NVidia G72GL (Quadro FX 350M) video adapter. After pressing "Rung config tool" on my video adapter I've choosed "GeForce FX series" instead of default "GeForce 6100 and later". Mandriva downloaded drivers and installed new drivers. After logging out and in I got support for desktop effects as well. Very important issue which I solved was to disable "Pulse audio". You can do it in Mandriva Control centre->Sound configuration by un-ticking "Enable PulseAudio". This made my Skype working 100% correct reg. sound input/output. I have Intel Corporation|82801G (ICH7 Family) High Definition Audio Controller.
  3. I had to set up also installation sources which I made following the guidelines from Mandriva website. It is important to set up "Non-free" and "PLF" sources. There you can find codecs and many other software/libraries/tools which can't be placed in Official Mandriva surces.
  4. Next step was of course installing of codecs, Mplayer,VLC player, Skype,unrar, pdf editor, StarDict, Adobe flash player (directly from their web page). I think, that very important step was to uninstall totem-plugin for Mozilla and instead install Mplayer-plugin for Mozilla, which much better. I've installed also JAVA under java-1.6.0-openjdk package name. I've played a lot with changing of colours/themes. The best docker (I think) is the kiba dock. It's easy to use and set up. It's small and it just works. You have to allow desktop effects to get a proper behaviour of Kiba dock - but this is common for most of the dockers I've tried.
  5. What I like very much on Mandriva?
  • really quick boot and turning of the computer
  • nice and stable KDE 4.2.2
  • I think it is one of the most user friendly GUI focused Linux distribution
  • large community and repositories
  • until now I didn't find any bug
  • it contain most of the newst software (Open Office, Mozilla and much much more)
  • you can change the icon on "Start" (menu) button by GUI tool. This is the first OS where I found this option!!!! I love it.....:o)
  • it works as you expect
So, I can only recommend to try Mandriva 2009.1 Spring Linux distribution as my best candidate.

Thursday, May 14, 2009

First steps with NAPA

My second post will be about basic NAPA initial environment/settings. And my personal opinion about GUI and software itself. I'll not describe the installation process - it is fully described in installation manual with screenshots on every steps. I was installing NAPA many times both stand alone and server version. It's no problem - like any other windows application, you don't have to be IT specialist to do it.

Before first run of NAPA is good to make settings of EXCEED. What is it? It's an UNIX system emulator, which means that you can run UNIX based software under Microsoft Windows. Exceed and Exceed 3D is recommanded to install befor installation of NAPA itself. I have to say, that for me is very supprising, that NAPA is right now supported only on MS Windows platform running under emulater - EXCEED. It is like running e.g. MS Office under Linux via Wine emulator (translation layer).

Back to Exceed setting. Start "Xconfig" from Start->Programs->Hummingbird Connectivity V8.0->Exceed.
Here is the list of settings I use to make after installation of Exceed + NAPA :
  1. Mouse, Keyboard and Other Input Devices - here you can choose which keyboard layout you use. More important is tab "Mouse Input". There you can set up the actions for mouse wheel movement. Choose "Wheel movement invokes macro" option. Than click on button "Macro Bindings". In next window click on button next to Wheel: and Up: items. Press Add, fill the name of macro e.g. UP and press "Start Record". After this step be care full, because whatever you press know will be recorded as "UP" macro. Know, press once up arrow on keyboard and immediately after that press "Stop Record". Than press OK. In "Macro selector window" assign just created macro to Wheel: Up: action. In "Mouse Wheel Macro Bindings" window you can set up together 4 options for mouse wheel in combination with some keys. Repeat the procedure mentioned above once again, but this time Wheel: Down: and during macro recording press down arrow. When you finished Mouse, Keyboard settings press OK and green tick for validation in main window.

  2. Display end Video - in this section just go to "Common Settings" tab and there put ticks for "Enable Server Reset" and "Exit Server Reset". Remove ticks from "Close Warning on Exit" and "Hide X Server Menu Items" if there are some. Again you have to validate the settings by clicking on green tick. This settings will cause, that you will not get disturbing messages when closing NAPA windows by clicking of "close" button on top of the window.

  3. Copy and Paste, and X Selection - very important is to set Copy/Paste. If you want to be able to use Copy/Paste between NAPA and all other windows applications you have to choose "CLIPBOARD" in selection window. Validate again the setting by green tick.

Now you can start NAPA. The first time you'll get login window, type "ADMI" as User Id without any password. ADMI user is the first initial and the only user just after installation. You can administrate your accounts, users and passwords later directly in NAPA. The basic NAPA window after start you can see on next screenshot :

Let's continue next time with some more interesting settings like customization of NAPA start and GUI. You will be maybe surprised how much you can do during the start process.

Let me know in comments abut which part of NAPA you would like to read next time.



Thursday, May 7, 2009

My first blog

So, this is my first blog. My English is not the best, so please be patient when you're reading my blog. Maybe I can write something about my interests and that means what I'll write mostly about here.


I like Linux and open source idea. I'm currently running OpenSuse 11.1 with KDE 4.2 desktop environment. I've already tried few distros like famous Ubuntu or PCLinuxOS and Fedora. Every distro is unique and different in the same time. It's about personal opinion which one you like. I'm planning to try even more distros and maybe write something about my current and future experiences with it.


The second thing is the software which I work with in work - NAPA. It is actually a shortcut of "Naval Architectural PAckage". My intension is also to write some articles about this software, which I work with for 5 years. I write a macros and composing so-called manager applications within it. It is morels a programming but not the same as e.g. C++ or GUI programming. The main purpose of mentioned software is naval calculations and analysis like hydrostatics, stability, hull surface definition and its fairing, preparing of approval documentation and many more. NAPA contains many "tasks" - modules which has different purposes and are binded together. It is one of the leading software in ship design busssiness. If you want to know something more about it you can visit the web site http://www.napa.fi/ .So, you can look forward to read something more about the topics mentioned above. I'll try to get back to writing as soon as possible. Hopefully you will like it :o)