Hello Chekov,
On Mon, 01 Mar 2010 02:04:13 +0100, "chekov" chekov@riseup.net wrote:
but now i'm stuck, because i get no feedback from the phone, except that the display lights up blue.
I think the problem is related to this:
Received PROMPT2 from phone, starting download handle_write(): 4096 bytes (4096/16503) handle_write(): 4096 bytes (8192/16503) handle_write(): 4096 bytes (12288/16503) handle_write(): 4096 bytes (16384/16503) handle_write(): 119 bytes (16503/16503) handle_write(): finished handle_write(): 4096 bytes (4096/16503) <<<<----- this should not happen got 1 bytes from modem, data looks like: 1b
This probably means that the downloader does not receive a reply in time and continues to download the code. You can try to fix it with this modification:
--- ./src/host/osmocon/osmocon.c Tue Feb 23 18:38:39 2010 +++ /src/host/osmocon/osmocon.c Mon Mar 01 07:59:22 2010 @@ -275,6 +275,7 @@ usleep(1); } else if (dnload.write_ptr >= dnload.data + dnload.data_len) { printf("finished\n"); + dnload.serial_fd.when = BSC_FD_READ; dnload.write_ptr = dnload.data; return 1; }
As a consequence of still sending data to the phone, the firmware could crash because there was a bug which is already fixed in the latest GIT version. You can check if you already have the latest version:
--- ./src/target/firmware/comm/msgb.c Tue Feb 23 18:38:39 2010 +++ /src/target/firmware/comm/msgb.c Sun Feb 28 11:22:57 2010 @@ -35,7 +35,11 @@
#ifdef NO_TALLOC /* This is a poor mans static allocator for msgb objects */ -#define MSGB_DATA_SIZE 256 +#define MSGB_DATA_SIZE 256+4 #define MSGB_NUM 16 struct supermsg { uint8_t allocated;
Maybe the above helps to solve the problem.
Best regards, Dieter
hello
i am already using the newest git.
Dieter Spaar schrieb:
Hello Chekov,
handle_write(): 4096 bytes (4096/16503) <<<<----- this should not happen got 1 bytes from modem, data looks like: 1b
This probably means that the downloader does not receive a reply in time and continues to download the code. You can try to fix it with this modification:
--- ./src/host/osmocon/osmocon.c Tue Feb 23 18:38:39 2010 +++ /src/host/osmocon/osmocon.c Mon Mar 01 07:59:22 2010 @@ -275,6 +275,7 @@ usleep(1); } else if (dnload.write_ptr >= dnload.data + dnload.data_len) { printf("finished\n");
- dnload.serial_fd.when = BSC_FD_READ; dnload.write_ptr = dnload.data; return 1; }
since i didn't manage to apply this patch i did it manually.
As a consequence of still sending data to the phone, the firmware could crash because there was a bug which is already fixed in the latest GIT version. You can check if you already have the latest version:
Now it looks good. The LCD is flashing its message now and the terminal prints some more info.
still, this info differs from the wiki: the last section is missing and the second last section is printed twice
$ ./host/osmocon/osmocon -m c123 -p /dev/ttyUSB0 target/firmware/hello_world.bin got 2 bytes from modem, data looks like: 04 81 got 5 bytes from modem, data looks like: 1b f6 02 00 41 got 1 bytes from modem, data looks like: 01 got 1 bytes from modem, data looks like: 40 Received PROMPT1 from phone, responding with CMD read_file(target/firmware/hello_world.bin): file_size=16500, hdr_len=4, dnload_len=16507 got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 43 Received PROMPT2 from phone, starting download handle_write(): 4096 bytes (4096/16507) handle_write(): 4096 bytes (8192/16507) handle_write(): 4096 bytes (12288/16507) handle_write(): 4096 bytes (16384/16507) handle_write(): 123 bytes (16507/16507) handle_write(): finished got 1 bytes from modem, data looks like: 1b got 1 bytes from modem, data looks like: f6 got 1 bytes from modem, data looks like: 02 got 1 bytes from modem, data looks like: 00 got 1 bytes from modem, data looks like: 41 got 1 bytes from modem, data looks like: 03 got 1 bytes from modem, data looks like: 42 Received DOWNLOAD ACK from phone, your code is running now!
Hello World from apps/hello_world/main.c program code ====================================================================== Device ID code: 0xb4fb Device Version code: 0x0000 ARM ID code: 0xfff3 cDSP ID code: 0x0128 Die ID code: <snip> ====================================================================== REG_DPLL=0x2413 CNTL_ARM_CLK=0xf0a1 CNTL_CLK=0xff91 CNTL_RST=0xfff3 CNTL_ARM_DIV=0xfff9 ====================================================================== REG_DPLL=0x2413 CNTL_ARM_CLK=0xf0a1 CNTL_CLK=0xff91 CNTL_RST=0xfff3 CNTL_ARM_DIV=0xfff9 ====================================================================== entering interrupt loop
please note, that osmocom -m c118xor only worked because there is no c118-mode and it fell back to c123-mode.
baseband-devel@lists.osmocom.org