Donnerstag, 18. August 2011

Switching the Nokia 1208 from local mode to Normal mode by FBUS

Yes I did it!!!!!

After fiddling around a little bit I solved the issue how to power up the Nokia 1208 only by FBUS and by enabling battery power. I just disabled the CheckDCT4Only() function code in gammu.

Because the phone seems to get stuck on this code segment. After removing the code the phone powers up as expected. The code segment is located in this file: gammu/depend/nokia/dct4.c in line 31.

I hope I can investigate the whole CheckDCT4Only() function in the next few days.
And maybe I'll develop a patch for gammu.

The next step will be writing my own code to access the phone.


[Update] How to boot Nokia 1208 in local mode

While playing around with the BSI PIN in the Easy Flash Interface of my Nokia 1208 I discovered that if I do things in the following order my device powers up in local mode.

  1. Remove the Battery
  2. Connect the BSI with a pull-down resistor of 3.3k Ohm to Ground
  3. Plug-in the USB-Adapter cable
  4. Reassign the Battery to the Nokia 1208 Phone
  5. On the display appears a sallow "Local Mode"

The only disadvantage is, I did not have any fbus command to bring the phone in normal mode so far. Any hints?

[Update]
It seems not necessary that the phone is connected to the USB Cable. But it seems that there should be a larger time gap between attempts. I looks that there are some capacitors in the phone which have to be discharged before the next successful switch to local mode.

Mittwoch, 10. August 2011

How to build my modified gammu version from git on ubuntu

First of all you the git package have to be installed on your box:
sudo apt-get install git
Next step is to install all the required source and development packages.
sudo apt-get build-dep gammu
Now you have to get the gammu sources from my github repository
git clone https://github.com/ka23/gammu.git
Change the directory to the newly created gammu folder and create a new build folder and change to it
cd gammu/
mkdir build
cd build
Now cmake have to be executed
cmake ..
This will take some time ... after everything have been created, you have to call make
make
Now You have to wait even longer... But after a successful compiler run gammu is available in the gammu folder
gammu/gammu
To test your freshly compiled gammu you have to provide a gammurc file "~/.gammurc" which looks like this in my case:
[gammu]
device = /dev/ttyUSB0
connection = fbus

After this you can call
gammu/gammu --identify







This is my homebrew universal USB to Nokia FBUS Cables Adapter

As I mentioned in a previous Post I use this RJ45 Connector which I extracted from an old DSL router to plug-in various Adapter Cables.



The banana sockets are used to connect the different not fbus related pins to the adaptor cables. These are Power for example.The cable straps are used as strain relief (Zugentlastung in German).

The following Banana jacks are connected to the following PINS on adapter cable

For the easy-flash 3 in 1 adapter:
  • The red one is connected to the power clamp on the small cable. And to VCC Pin of Easy Flash I.
  • The green one is connected to the BSI Pin on the connector this applies to Easy Flash I and Easy Flash II Easy Flash III was not tested. There seems to be a 3.3k Ohm resistor included.
  • The blue one is connected to GND (Ground).
  • The black and yellow ones are not connected.

Donnerstag, 4. August 2011

Are there any fbus specifications available?

The only useful documentation if found is the one from gammu/gnokii which can be found on my github repository for example:

nokia.rst - The general nokia part which covers fbus and mbus
n6110.rst - Nokia 6110 and derivatives (Nokia 6130, 6150, 6190, 5110, 5130, 5150, 5190, 3210, 3310)
n7110.rst - Nokia 6210 and derivatives (7110)
n6510.rst - Nokia 6510 and derivatives (?)

The rest of the documentation can be found here.

If there is more documentation out there some one may can drop me a comment.

Some more c++ code can be found here.

Something about timings

There is not that much information about the fbus protocol in the internet. So I decided to gather the informations I am stumbling over in this Blog. Maybe there are more or less useful information for you.

In a avrfreaks discussion turboscrew talked about some timings of the fbus during initialization.
If you first output the 0x55's and then the query frame taking care that the time between the 0x55's or the bytes of the query message do not exceed 5 ms and that there is, say, 10 ms delay between the last byte of the 0x55 chunk and the first byte of the query, and still no response, then I'd suspect that there is still something wrong with the cable.
I am not sure if this is correct, but it is information ;-)

How I've connected the Nokia 1110i to my PC

On my earlier Blog Post someone asked my how did I connect the Nokia 1110i to my PC for powering it up by fbus. I used the following cable to connect the phone


It is called Easy Flash 3in1 for Nokia and provides a RJ45 Jack on the other end. This is normally used with flashers like: Twister / 3in1 GTS / Griffin / UFS / Cyclone / Tornado / J.A.F / NBOX / Powerflasher / Genie Clip / Micro UFS.

It was not that expensive even cheaper than 3 single cables on ebay.

To provide the serial lines and the Power I've sawed up an old DSL Modem called FritzBox an extracted a little square of the PCB with the RJ45 plug socket. After this I soldered a PL 2300 USB to serial converter Cable to the FBUS pins located on the PCB. Have a look at this:



For the exact pin-out you may have to check the pinning of your particular phone

Yet another resource for the fbus protocol

After a long break I decided to restart my efforts on this topic. The aim is to provide a fbus communication class or library for the arduino platform. I recently stumbled over the following link: http://www.ucdevelopers.page.tl/Understanding-the-Protocol.htm
Maybe this is usefull for my development. A second interesting code snippet I've put into a gist.

Here it is:

Samstag, 5. Februar 2011

Git repository for the patched gammu client

In my post Nokia 1110i power up and power down via FBUS I used a modified version of gammu
which has the possibility to change the phones operation mode from I call it communication enabled mode to either test, local or normal mode. This is done by command-line:

gammu --nokiasetmode 1

I do know the following modes:
  • Normal mode -> 1 (0x01)
  • Test mode -> 4 (0x04)
  • Local mode -> 5 (0x05)
  • Shut-down mode -> 2 (0x02) I am not sure about this, but it caused a power of on my
    1110i and on my 6230. But try this with care
You can check out my git repository with the following command line:

git clone https://github.com/ka23/gammu.git

But keep in mind that these commands may damage your phone.

The modified version also logs out all the communication to console. Like the output in my video

4 Ways to Power Up a nokia phone by not touching the power button

The following information was posted here.

I have dyed my comments in green.

nokia service manual tells that powering up is possible by:
  • Connecting a charger to the phone. The CCONT recognizes the charger from the VCHAR voltage and starts the power up procedure. Sometimes the phone is not powering up in full "normal mode" but in communication enable mode. The Nokia 1110i I have for testing is in communication mode with charger plugged in. See how to power up here.
  • Pressing the power key, that generates PWRONX signal from the power key to the CCONT, this starts the power up procedure. This is really boring and does not fit into the headline!!!
  • A RTC interrupt. If the real time clock is set to alarm and the pghone is switched off, the RTC generates an interrupt signal, when the alarm is gone off. The RTC interrupt signal is connected to the PURX line to give a power on signal to the CCONT just like the power key. Okay boring as well but maybe a fall-back for extreme hard cases you can setup a wakeup one minute, hour or day in future and poll if something have to be transmitted or someone have to be called. After this the phone should be shut down again.
  • IBI-pulse. When a short (10ms) voltage pulse is applied to the BTEMP pin, the CONT wakes up and starts the power on procedure. This is used by the HDa12 Service tools.
    This sounds interesting but for this case the soldering iron have to be warmed up, because I do not know any Phone where this pin is lead out to the data connector.
Another promising sounding approach is to simulate a nokia car-kit there are some logs in the gammu documentation. Have a look at this.

If there are any other ways to wake up a phone, please drop me a comment.

Nokia 1110i power up and power down via FBUS

After days of nescience and searching I finally managed to power up the Nokia 1110i by FBUS.
To demonstrate my success I have recorded a video. (My first youtube video;-))



On the video you can see a modified version of gammu, a great source of information during my long way through the darkness of FBUS communication.

An other great source is embedtronics (Nokia F-Bus Protocol).

Yes I know there are cheap GSM-Modules around for about 80 € but my intend during this learning curve was to learn something about bus systems and how to communicate with mobile phones. The intent is to access the phone by a micro-controller like the arduino , another great open source project.