Hi hans, thanks for the idea, but the result is the same. I extracted the firmware for the windows driver using your tool and when I use it, it seems to work except for a repeating message of;<br> dvb-usb: error while querying for an remote control event. <br>
I think they have an other .sys for the remote control management firmware.<br>But when I try to scan the dmesg is exactly the same as before, everything seems correct, but there's no signal / SNR. I don't know if this could be a different GPIO used or different i2c or something like that, because the rest seems correct.<br>
<br>Albert<br><br><div><span class="gmail_quote">2008/2/16, Hans-Frieder Vogt <<a href="mailto:hfvogt@gmx.net">hfvogt@gmx.net</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Albert,<br> <br> your dmesg-output looks absolutely fine for me (besides the already discussed xc2028 4-0061: Error on line 1063: -5<br> message).<br> Since you also obvisouly succeeded to patch the xc3028 firmware so that the scode can be loaded (which in my<br>
cinergy did not make any noticeable difference), I still have the suspicion that the dib0700-firmware is the main reason<br> for your device not working.<br> Can you try the firmware from the Windows-driver? Comparing various dib0700-based device drivers, I found quite<br>
different dib0700-firmware in these. I am not sure if there is any single "latest" version of the firmware which can be used<br> for all devices.<br> <br> I have written a small tool to extract the dib0700 firmware from the Windows driver (there are probably already other/better<br>
tools around, but I just did not find any). If you use this tool (ignore the warnings, I am still trying to understand how the<br> firmware is organised) and then copy the resulting firmware to the firmware-directory under the name of<br>
dvb-usb-dib0700-1.10.fw, do you see any difference?<br> <br> Good luck,<br> Hans-Frieder<br> <br> Here comes the tool:<br> <br> /*<br> dib0700 firmware extraction tool<br> extracts firmware for DiBcom0700(c) based devices from .sys driver files<br>
and stores all found firmwares in files dibfw-00.fw, dibfw-01.fw, ...<br> <br> Copyright (C) 2008 Hans-Frieder Vogt <<a href="mailto:hfvogt@gmx.net">hfvogt@gmx.net</a>><br> <br> This program is free software; you can redistribute it and/or modify<br>
it under the terms of the GNU General Public License as published by<br> the Free Software Foundation version 2<br> <br> This program is distributed in the hope that it will be useful,<br> but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br> GNU General Public License for more details.<br> <br> You should have received a copy of the GNU General Public License<br> along with this program; if not, write to the Free Software<br>
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br> */<br> #include <stdio.h><br> #include <stdlib.h><br> #include <fcntl.h> /* for O_RDONLY */<br> #include <unistd.h> /* for open/close, ftruncate */<br>
#include <errno.h><br> #include <string.h><br> #include <sys/stat.h><br> #include <sys/mman.h><br> <br> <br> static const char fwstart[] = "\x02\x00\x00\x00\x04\x70\x00\x00";<br> <br> #define MAX_FW 10<br>
static int fwofs[MAX_FW];<br> <br> int read_firmware(unsigned char *m, int idx) {<br> int fd;<br> int j, i = 0;<br> unsigned char *buf; /* fw is stored in junks of 22 bytes */<br> char fname[20];<br>
unsigned char bytes, hibyte, lobyte, endflag, crcbyte;<br> unsigned int crc, datapos;<br> int databytes = 0;<br> <br> sprintf(fname,"dibfw-%02x.fw", idx);<br> <br> fd = open(fname, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);<br>
if (fd < 0) {<br> fprintf(stderr, "ERROR trying to open/create output file \"%s\""<br> "\n", fname);<br> return 1;<br> }<br>
for (i=0;; i=i+22) {<br> buf = &m[i];<br> <br> bytes = buf[0];<br> lobyte = buf[2];<br> hibyte = buf[3];<br> endflag = buf[4];<br> crcbyte = buf[21];<br>
<br> /* do the checksum test */<br> crc = 0;<br> for (j=0; j<22; j++)<br> crc += buf[j];<br> if ((crc & 0xff) != 0) {<br> fprintf(stderr, "ERROR: invalid line 0x%08x:\n", i);<br>
for (j=0; j<22; j++)<br> fprintf(stderr, "0x%02x ", buf[j]);<br> fprintf(stderr, "\n");<br> break;<br>
}<br> <br> /* check whether data really fits together */<br> if (i > 0) {<br> datapos = lobyte | (hibyte << 8);<br> if (datapos != databytes) {<br>
fprintf(stderr, "WARNING data inconsistent? at "<br> "offset 0x%04x data written is 0x%04x, "<br> "but line says 0x%04x\n", i, databytes,<br>
datapos);<br> }<br> }<br> <br> /* now write the data */<br> write(fd, &bytes, 1);<br> write(fd, &lobyte, 1);<br>
write(fd, &hibyte, 1);<br> write(fd, &endflag, 1);<br> write(fd, &buf[5], bytes);<br> write(fd, &crcbyte, 1);<br> if (i > 0) {<br>
databytes += bytes;<br> }<br> <br> /* endflag seems to indicate the end of the firmware */<br> if (endflag == 1)<br> break;<br> }<br>
close(fd);<br> }<br> <br> int main(int argc, char **argv) {<br> struct stat st;<br> int fd;<br> unsigned char *map;<br> unsigned long map_len;<br> int err;<br> int i, j;<br>
int num_fw = 0;<br> <br> printf("%s - an extraction tool for DiBcom0700(c) firmware from W* drivers\n",<br> argv[0]);<br> if (argc!=2) {<br> fprintf(stderr, "%s <sys-filename>\n", argv[0]);<br>
return 1;<br> }<br> if ((err = stat(argv[1], &st) < 0)) {<br> fprintf(stderr, "ERROR calling stat: %s\n", strerror (err));<br> return 1;<br> }<br>
fd = open(argv[1], O_RDONLY, 0);<br> if (fd < 0) {<br> fprintf(stderr, "ERROR trying to open file \"%s\"\n", argv[1]);<br> return 1;<br> }<br> /* generate a memory map for the file */<br>
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);<br> close (fd);<br> <br> if (map == MAP_FAILED) {<br> fprintf (stderr, "ERROR calling mmap: %s\n", strerror (errno));<br>
return 1;<br> }<br> map_len = st.st_size;<br> <br> /* first search for characteristic start-string */<br> for (i=0; i<map_len-8; i=i+4) {<br> if ((*((unsigned int *)&map[i]) == *((unsigned int *)fwstart)) &&<br>
(*((unsigned int *)&map[i+4]) == *((unsigned int *)&fwstart[4]))) {<br> printf("found start of FW at 0x%08x\n", i);<br> fwofs[num_fw] = i;<br>
num_fw++;<br> if (num_fw >= MAX_FW) {<br> fprintf(stderr, "WARNING: number of firmwares "<br> "identified limited by compile time "<br>
"array size %d\n", MAX_FW);<br> break;<br> }<br> }<br> }<br> if (0 == num_fw) {<br> fprintf(stderr, "ERROR: did not find any firmwares in file "<br>
"\"%s\"\n", argv[1]);<br> return 1;<br> }<br> for (i=0; i<num_fw; i++) {<br> read_firmware(&map[fwofs[i]],i);<br> }<br>
<br> return 0;<br> }<br> <br> <br> <br> Am Samstag, 16. Februar 2008 schrieb Albert Comerma:<br> <br>> More information... I attach a dmesg of tuner-xc2028 loaded in debug mode<br> > while doing a scan ( scan es-Collserola|tee channels.conf ). I don't see any<br>
> problem, but it doesn't work.<br> ><br> > Albert<br> ><br> > 2008/2/16, Albert Comerma <<a href="mailto:albert.comerma@gmail.com">albert.comerma@gmail.com</a>>:<br> > ><br> > > For what I understand, changing the Firmware 64 to 60000200 changes the if<br>
> > frequency to 5.2MHz. So this modification on the firmware should make the<br> > > card work. What it's more strange for me is that when trying to scan no<br> > > signal or SNR is reported, so it seems like xc3028 firmware is not working<br>
> > properly. Perhaps could be a wrong BASE or DTV firmware loaded?<br> > ><br> > > Albert<br> > ><br> > > 2008/2/16, Albert Comerma <<a href="mailto:albert.comerma@gmail.com">albert.comerma@gmail.com</a>>:<br>
> > ><br> > > > So, If it's not a problem, any of you could send me the current xc3028<br> > > > firmware you are using, because mine does not seem to work... Thanks.<br> > > ><br>
> > > Albert<br> > > ><br> > > > 2008/2/15, Patrick Boettcher <<a href="mailto:patrick.boettcher@desy.de">patrick.boettcher@desy.de</a>>:<br> > > > ><br> > > > > Aah now I remember that issue, in fact it is no issue. I was seeing<br>
> > > > that<br> > > > > problem when send the sleep command or any other firmware command<br> > > > > without<br> > > > > having a firmware running. In was, so far, no problem.<br>
> > > ><br> > > > > Patrick.<br> > > > ><br> > > > ><br> > > > ><br> > > > > On Fri, 15 Feb 2008, Holger Dehnhardt wrote:<br> > > > ><br>
> > > > > Hi Albert, Hi Mauro,<br> > > > > ><br> > > > > > I have successfulli patched and compiled the driver. Im using the<br> > > > > terratec<br> > > > > > cinergy device and it works fine.<br>
> > > > ><br> > > > > >>> [ 2251.856000] xc2028 4-0061: Error on line 1063: -5<br> > > > > ><br> > > > > > This error message looked very familar to me, so i searched my log<br>
> > > > and guess<br> > > > > > what I found:<br> > > > > ><br> > > > > > Feb 15 20:42:18 musik kernel: xc2028 3-0061: xc2028_sleep called<br> > > > > > Feb 15 20:42:18 musik kernel: xc2028 3-0061: xc2028_sleep called<br>
> > > > > Feb 15 20:42:18 musik kernel: xc2028 3-0061: Error on line 1064: -5<br> > > > > > Feb 15 20:42:18 musik kernel: DiB7000P: setting output mode for<br> > > > > demod df75e800<br>
> > > > > to 0<br> > > > > > Feb 15 20:42:18 musik kernel: DiB7000P: setting output mode for<br> > > > > demod df75e800<br> > > > > > to 0<br> > > > > ><br>
> > > > > It identifies the marked line (just to be sure because of the<br> > > > > differen line<br> > > > > > numbers)<br> > > > > ><br> > > > > > if (priv->firm_version < 0x0202)<br>
> > > > > -> rc = send_seq(priv, {0x00, 0x08, 0x00, 0x00});<br> > > > > > else<br> > > > > > rc = send_seq(priv, {0x80, 0x08, 0x00, 0x00});<br>
> > > > ><br> > > > > >> The above error is really weird. It seems to be related to<br> > > > > something that<br> > > > > >> happened before xc2028, since firmware load didn't start on that<br>
> > > > point of<br> > > > > >> the code.<br> > > > > ><br> > > > > > The error really is weird, but it does not seem to cause the<br> > > > > troubles - my<br>
> > > > > card works despite the error!<br> > > > > ><br> > > > > >><br> > > > > >>> [ 2289.284000] xc2028 4-0061: Device is Xceive 3028 version 1.0,<br>
> > > > firmware<br> > > > > >>> version 2.7<br> > > > > >><br> > > > > >> This message means that xc3028 firmware were successfully loaded<br> > > > > and it is<br>
> > > > >> running ok.<br> > > > > ><br> > > > > > This and the following messages look similar...<br> > > > > ><br> > > > > > Holger<br> > > > > ><br>
> > > > > _______________________________________________<br> > > > > > linux-dvb mailing list<br> > > > > > <a href="mailto:linux-dvb@linuxtv.org">linux-dvb@linuxtv.org</a><br>
> > > > > <a href="http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb">http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb</a><br> > > > > ><br> > > > ><br> > > > > _______________________________________________<br>
> > > > linux-dvb mailing list<br> > > > > <a href="mailto:linux-dvb@linuxtv.org">linux-dvb@linuxtv.org</a><br> > > > > <a href="http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb">http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb</a><br>
> > > ><br> > > ><br> > > ><br> > ><br> ><br> <br> <br> <br> <br>--<br> --<br> Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net<br> </blockquote></div><br>