gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How detect incoming call?????


From: Osma Suominen
Subject: Re: How detect incoming call?????
Date: Tue, 18 Feb 2003 13:22:01 +0200 (EET)

On Mon, 17 Feb 2003, Eduardo Garcia wrote:

> How can I detect a incoming call in this cell phones (6120, 5120 and 3280
> are the models that I using now. I think that 51XX and 61XX models are very
> similar) using MBUS protocol with a MICROCONTROLER (Microchip PIC more
> exactly) managing it through USART??

Okay, now I understand what you are doing and quite obviously you cannot
use gnokii in this environment (unless somebody wants to port it - hey,
it's not impossible ;) )

> Today I perform calls simulating keypress and releases, resets, get
> information about phone and a lot of others actions, but I don't understand
> how detect a incoming call to hang on the call and continue all operations
> necessary.
>
> When there are a incoming call to cell phone I don't receive nothing through
> MBUS! I think that would need to receive a packet "r incoming call alert
> { 0x0005, seqnr, numlen, "number", namelen, "name" }" but it don't happen!

So this means that you should see a packet of perhaps 20 bytes arriving
from the bus when the phone sees an incoming call. If that doesn't
happen then there's something wrong.

One possibility that was mentioned was that you need to add the
authentication sequence. This seems to be some ritual that convinces the
phone that it is connected to a genuine Nokia accessory (which, in the
case of gnokii, and your microcontroller, is obviously not true), and
thus you get access to some functions that you otherwise wouldn't. So
perhaps incoming calls are only reported to "genuine accessories".

If that is indeed the case then you need to reimplement the
authentication sequence which is coded into gnokii (specifically,
common/phones/nk6100.c and the functions Authentication() and
PNOK_GetNokiaAuth()). It might be a bit hard to do in PIC assembly, at
least you have to bee very careful to do the translation (in fact
emulating a C compiler by hand) correctly. It shouldn't be impossible
but you first have to study the C code and get a general idea of what it
does. I've worked with Z80 assembly and done similar things (translating
C code by hand) and it's sometimes tedious but not impossible to do.

Obviously Nokia made the algorithm somewhat complicated to prevent it
from being used by people like gnokii hackers and you ;)

> When I spoke "r incoming call alert   { 0x0005, seqnr, numlen, "number",
> namelen, "name" }" obviously I thought anythink how: 0X1F, 0X10, 0X00, 0X01,
> 0X00, 0X??, 0X00, 0X01, 0X00, 0X05, ...

This is not something _you_ send, it is a description of a sequence of
bytes that should appear from the phone without any special action from
your side.

There's also the possibility that the phone(s) need some kind of
keepalive in order to work correctly. It might be that if the phone
hasn't seen any activity in the link for (say) a few seconds it will
stop informing about events that happen. So you could make an idle loop
that sends some kind of keepalive packets (perhaps a simple status
message e.g. query the battery or RF level) once every few seconds.

This would be much easier to code than the authentication sequence so
perhaps you should try it first.

> Please, sorry if my english don't is understandable.

That's OK and I can understand it. It's just a lingua franca anyway.
It seems that most people on this list don't speak it as their mother
tongue (including me).

Disclaimer: I'm basically just reiterating what other people have
already told and trying to give some further explanations. I have not
worked with the aforementioned phone models (though I have a 6150
myself, which is related).

-Osma

-- 
*** Osma Suominen *** address@hidden *** http://www.iki.fi/ozone/ ***




reply via email to

[Prev in Thread] Current Thread [Next in Thread]