gnokii-users
[Top][All Lists]
Advanced

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

Re: [patch] DLR3 support for 6310 ¯ request for testing


From: Manfred Jonsson
Subject: Re: [patch] DLR3 support for 6310 ¯ request for testing
Date: Tue, 09 Jul 2002 00:56:37 +0200

hi all

the following code snipplet from links/fbus.c works for 
a  ___ 7110 ___  with a dlr-3. pay attention to three 
things. the first dtr_low/dtr_high ensures AT command
mode (this resets the phone). the second dtr_low/dtr_high 
would reset the phone to AT mode therefore it is commented.
this code example leaves dtr/rts high. if the device read
wouldn't block a dau-9 would work on the first run because 
the power isn't removed.

todo:
- confirm work with 6210 and 6310 together with dlr-3
- make the read robust against timeout or use another 
  means to ensure the AT commands don't interfere. if
  an AT command is send directly after an other AT command
  the first command is aborted and the second fails.
- confirm work with 7110, 6210 and 6310 together with dau-9

bye mafnred

snipplet:

static bool FBUS_OpenSerial(bool dlr3)
{
        unsigned char init_char = 0x55;
        unsigned char end_init_char = 0xc1;
        int count;
 
        unsigned char buffer[255];
        int res;
 
        /* Open device. */
        if (!device_open(glink->PortDevice, false, false, false, GCT_Serial))
{
                perror(_("Couldn't open FBUS device"));
                return false;
        }
 
        device_setdtrrts(0, 0);
        sleep(1);
        device_setdtrrts(1, 1);
        device_changespeed(19200);
        sleep(1);
        device_write("AT\r", 3);
        sleep(1);
res = device_read(buffer, 255);
puts(buffer);
        device_write("AT&F\r", 5);
        usleep(100000);
res = device_read(buffer, 255);
puts(buffer);
        device_write("AT*NOKIAFBUS\r", 13);
        usleep(100000);
res = device_read(buffer, 255);
puts(buffer);
//      device_setdtrrts(0, 0);
//      sleep(1);
//      device_setdtrrts(1, 1);
//      sleep(1);
 
        device_changespeed(115200);
 
puts("start fbus init");
        for (count = 0; count < 32; count++) {
                device_write(&init_char, 1);
        }
        device_write(&end_init_char, 1);
        usleep(1000000);
puts("fbus init complete");
 
        return (true);
}



reply via email to

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