Oops, I forgot the attachment!

On Tue, Jun 16, 2015 at 12:35 PM, Gianluca Renzi <[email protected]> wrote:

> Hello list!
> I would like inform you (as Tobias Grimm <[email protected]> he is
> the w_scan maintainer for Debian) as suggested to me to look deeper on my
> issue so I decided to explain my issue.
>
> Here is some information:
>
> System Machines:
> Apple PowerBook G4 32bit PowerPC Laptop
> Apple Quad Core G5 64bit PowerPC Tower
>
> On both machines I have the _SAME_ Debian Jessie and the same kernel
> version, and the same version of linux-non-free drivers and the DVB API
> (from debian repos) for the USB dogle DVB-T I am using.
>
> The G5 Machine has the 64bit version meanwhile the G4 is the 32bit version.
>
> When connecting the USB Dongle on the G4 I have the same messages I got in
> the G5 machine:
>
> --------------------------------
>
> POWERPC 64 Bit G5:
>
> [ 4559.231333] usb 1-3.5.2: new high-speed USB device number 11 using
> ehci-pci
> [ 4559.327828] usb 1-3.5.2: New USB device found, idVendor=07ca,
> idProduct=850a
> [ 4559.327839] usb 1-3.5.2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 4559.327845] usb 1-3.5.2: Product: A850 DVBT
> [ 4559.327851] usb 1-3.5.2: Manufacturer: AVerMedia
> [ 4559.327857] usb 1-3.5.2: SerialNumber: 302795401381000
> [ 4559.329949] usb 1-3.5.2: dvb_usb_v2: found a 'AverMedia AVerTV Volar
> Black HD (A850)' in cold state
> [ 4559.330042] usb 1-3.5.2: firmware: direct-loading firmware
> dvb-usb-af9015.fw
> [ 4559.330054] usb 1-3.5.2: dvb_usb_v2: downloading firmware from file
> 'dvb-usb-af9015.fw'
> [ 4559.403336] usb 1-3.5.2: dvb_usb_v2: found a 'AverMedia AVerTV Volar
> Black HD (A850)' in warm state
> [ 4559.810247] usb 1-3.5.2: dvb_usb_v2: will pass the complete MPEG2
> transport stream to the software demuxer
> [ 4559.811281] DVB: registering new adapter (AverMedia AVerTV Volar Black
> HD (A850))
> [ 4559.812936] i2c i2c-8: af9013: firmware version 4.95.0.0
> [ 4559.817066] usb 1-3.5.2: DVB: registering adapter 0 frontend 0 (Afatech
> AF9013)...
> [ 4559.817298] MXL5005S: Attached at address 0xc6
> [ 4559.828686] usb 1-3.5.2: dvb_usb_v2: 'AverMedia AVerTV Volar Black HD
> (A850)' successfully initialized and connected
> [ 4560.533529] usbcore: registered new interface driver dvb_usb_af9015
>
> --------------------------------
>
> POWERPC 32BIT G4:
>
> [  461.600958] usb 1-2: new high-speed USB device number 3 using ehci-pci
> [  461.737345] usb 1-2: New USB device found, idVendor=07ca, idProduct=850a
> [  461.737361] usb 1-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [  461.737370] usb 1-2: Product: A850 DVBT
> [  461.737377] usb 1-2: Manufacturer: AVerMedia
> [  461.737385] usb 1-2: SerialNumber: 302795401381000
> [  463.138837] usb 1-2: dvb_usb_v2: found a 'AverMedia AVerTV Volar Black
> HD (A850)' in cold state
> [  463.158350] usb 1-2: firmware: direct-loading firmware dvb-usb-af9015.fw
> [  463.158373] usb 1-2: dvb_usb_v2: downloading firmware from file
> 'dvb-usb-af9015.fw'
> [  463.229316] usb 1-2: dvb_usb_v2: found a 'AverMedia AVerTV Volar Black
> HD (A850)' in warm state
> [  463.631215] usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport
> stream to the software demuxer
> [  463.631579] DVB: registering new adapter (AverMedia AVerTV Volar Black
> HD (A850))
> [  463.689604] i2c i2c-8: af9013: firmware version 4.95.0.0
> [  463.692588] usb 1-2: DVB: registering adapter 0 frontend 0 (Afatech
> AF9013)...
> [  463.752256] MXL5005S: Attached at address 0xc6
> [  463.762217] usb 1-2: dvb_usb_v2: 'AverMedia AVerTV Volar Black HD
> (A850)' successfully initialized and connected
> [  463.762356] usbcore: registered new interface driver dvb_usb_af9015
>
> -----------------------
>
> Here is the log for G5 (does not work)
> ~$ w_scan -v -v
> w_scan -v -v
> w_scan version 20130331 (compiled for DVB API 5.4)
> WARNING: could not guess your country. Falling back to 'DE'
> guessing country 'DE', use -c <country> to override
> using settings for GERMANY
> DVB aerial
> DVB-T Europe
> scan type TERRESTRIAL, channellist 4
> output format vdr-2.0
> WARNING: could not guess your codepage. Falling back to 'UTF-8'
> output charset 'UTF-8', use -C <charset> to override
> Info: using DVB adapter auto detection.
>     /dev/dvb/adapter0/frontend0 -> "Afatech AF9013" doesnt support
> TERRESTRIAL -> SEARCH NEXT ONE.
> main:3228: FATAL: ***** NO USEABLE TERRESTRIAL CARD FOUND. *****
> Please check wether dvb driver is loaded and
> verify that no dvb application (i.e. vdr) is running.
>
>
> or if I specify the adapter frontend:
>
> ~$ w_scan -a /dev/dvb/adapter0/frontend0 -v -v
> w_scan version 20130331 (compiled for DVB API 5.4)
> WARNING: could not guess your country. Falling back to 'DE'
> guessing country 'DE', use -c <country> to override
> using settings for GERMANY
> DVB aerial
> DVB-T Europe
> scan type TERRESTRIAL, channellist 4
> output format vdr-2.0
> WARNING: could not guess your codepage. Falling back to 'UTF-8'
> output charset 'UTF-8', use -C <charset> to override
> -_-_-_-_ Getting frontend capabilities-_-_-_-_
> main:3244: FATAL: Your DVB driver doesnt support DVB API v5. Please
> upgrade.
>
> ----------------------
>
> Here is the log for G4 (works):
>
> ~$ w_scan -v -v
> w_scan version 20130331 (compiled for DVB API 5.4)
> WARNING: could not guess your country. Falling back to 'DE'
> guessing country 'DE', use -c <country> to override
> using settings for GERMANY
> DVB aerial
> DVB-T Europe
> scan type TERRESTRIAL, channellist 4
> output format vdr-2.0
> WARNING: could not guess your codepage. Falling back to 'UTF-8'
> output charset 'UTF-8', use -C <charset> to override
> Info: using DVB adapter auto detection.
>     ===================== Afatech AF9013
> ===================================
>     len = 1
>     0x00: 03                                              :
>
> ========================================================================
>     /dev/dvb/adapter0/frontend0 -> TERRESTRIAL "Afatech AF9013": good :-)
> Using TERRESTRIAL frontend (adapter /dev/dvb/adapter0/frontend0)
> -_-_-_-_ Getting frontend capabilities-_-_-_-_
> Using DVB API 5.a
> frontend 'Afatech AF9013' supports
> INVERSION_AUTO
> QAM_AUTO
> TRANSMISSION_MODE_AUTO
> GUARD_INTERVAL_AUTO
> HIERARCHY_AUTO
> FEC_AUTO
> FREQ (174.00MHz ... 860.00MHz)
> -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
>     ===================== Afatech AF9013
> ===================================
>     len = 1
>     0x00: 03                                              :
>
> ========================================================================
> Scanning 7MHz frequencies
>
>
> I wrote to Tobias and he sent me a simple code to check what version is
> running on dvb_core DVB-API (the code is in attachment) and it reports:
>
> POWERPC G4:
> $ ./getdvbapiversion /dev/dvb/adapter0/frontend0
> DVB-API Version from header files: 5.10 (0x050A)
> DVB-API Version from frontend /dev/dvb/adapter0/frontend0: 5.10 (0x050A)
>
>
> POWERPC G5:
> $ ./getdvbapiversion /dev/dvb/adapter0/frontend0
> DVB-API Version from header files: 5.10 (0x050A)
> Could not query API version from the DVB API
>
> It seems in the POWERPC G5 the legacy ioctl to the FE in general works.
> It just seems the new
> FE_GET/SET_PROPERTY are not accepted.
>
> It is strange, because on POWERPC G4 works.
>
> Some hint, help or clue??
>
> Best Regards,
> Gianluca
>



-- 
Ciao e buona giornata.

"GP! In mezzo al campo stai proprio schifoso!"
Coach M.Russo
#include <linux/dvb/version.h>
#include <linux/dvb/frontend.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>


int main(int argc, char *argv[]) {
    if (argc < 2) {
      printf("Usage: dvbapiversion <frontend>\n");
      printf("e.g. dvbapiversion /dev/dvb/adapter0/frontend0\n");
      return -1;
    }

    printf("DVB-API Version from header files: %d.%d (0x%04X)\n", DVB_API_VERSION, DVB_API_VERSION_MINOR, DVB_API_VERSION << 8 | DVB_API_VERSION_MINOR);

    struct dtv_property prop[] = {
        { .cmd = DTV_API_VERSION },
    };
    struct dtv_properties props = {
        .num = 1,
        .props = prop
    };

    int frontend_fd = open(argv[1], O_RDWR | O_NONBLOCK);
    if (frontend_fd < 0) {
        printf("Can't open frontend %s\n", argv[1]);
        return -1;
    }

    struct dvb_frontend_info frontendInfo;
    if (ioctl (frontend_fd, FE_GET_INFO, &frontendInfo) >= 0) {
       printf("Frontend name: %s\n", frontendInfo.name);
    }
    else {
       printf("Could not query frontend info from the DVB API\n");
    }


    if (ioctl (frontend_fd, FE_GET_PROPERTY, &props) >= 0) {
       printf("DVB-API Version from frontend %s: %d.%d (0x%04X)\n", argv[1], prop[0].u.data >> 8,  prop[0].u.data & 0xFF, prop[0].u.data);
    }
    else {
       printf("Could not query API version from the DVB API\n");
    }

    close(frontend_fd);

    return 0;
}

Reply via email to