Arsiho Blog

Sem tam nieco..
Vytvoril(a) admin v Pia 08 Jan, 2010 09:41 CET
Posledný záznam So 07 Jan, 2012 22:34 CET
(9 Záznamy | 6105 Návštevy | Aktivita=4.00)

Nájsť:
By arsi v So 07 Jan, 2012 22:34 CET

Tak a tu je uni verzia 32bit/64bit pre linux

-Prechod na verziu z kernel stromu od Mareka Beliska
-Ukonceny port na 64bit linux - driver je funkcny na 32bit aj 64bit linuxe
-Opravena chyba pri alokacii miesta pre firmware na openWRT a malych systemoch
-Odtranene padanie driveru
-pridany najnovsi firmware z windows driveru

**************************************************************************************
Par veci okolo instalacie:
Po pridani do kernel stromu bol v mojom ubuntu nainstalovany driver ft1000
a ft1000usb neslo nainstalovat

Musel som dat rmmod ft1000 a potom to uz islo..

cez depmod som to po par nudzovych rezimoch nainstaloval az po vymazani ft1000.ko z /lib/modules
takze pozor na to co robite
ft1000usb_uni_2_0_final

By arsi v So 07 Jan, 2012 21:09 CET

Tak a konecne su opravene vsetky chyby.

Hned bude nasledovat verzia aj pre desktop linux

Opravene/upravene:

uplne odstranene vypadavanie driveru.
posledny firmware z windows verzie driveru
automaticka instalacia firmware suboru do /lib/firmware/

Subor rozbalte to trunk/package/
Nasledne v trunk/
make menuconfig >> Kernel modules -> Wireless drivers -> ft1000
make package/ft1000/{clean,compile} V=99

Chcem sa pokusit dostat driver do distribucie openwrt..

By arsi v Po 02 Jan, 2012 13:12 CET

Tak a som tu znova!

Ked si chcete skompilovat ft1000usb pre openWRT tak tu je zdrojovy balicek:

ft1000usb_openWRT

Adresar ft1000 treba dat do trunk/package, nasledne v trunk dame make menuconfig
ideme do kernel drivers a vyberieme zalozku ostatne a zapneme ft1000

No a potom make package/ft1000/{clean,compile} V=99

A este treba dat do /etc/firmware/ subor ft3000.img

Toto je mierne upravena verzia z jadra linuxu http://lxr.linux.no/#linux+v3.1.6/drivers/staging/ft1000/ft1000-usb/
a zatial konecne bezi uplne bez problemov..

By arsi v Ne 25 Dec, 2011 19:10 CET

Taak ked uz mame tie vaanoce a idem skapat od nudy.
Som sa trocha pohral s driverom.
Opravene veci:

- vypadok driveru pri strate signalu.
- opravene hlasky o preteceni zasobniku pri kompilacii. Velke premenne su dynamicky alokovane..

Este jedna vec. Malo by to fungovat aj na 32bit systeme. Skuste to otestovat a napisat ci to ide.

Novy driver

ArSi?

By arsi v Pia 23 Dec, 2011 15:15 CET

Konecne som mal trocha casu a dostal som sa k linuxom.
No a po par upravach je tu nova verzia driveru testovana na Kubuntu 11.10 64bit

Tak sosajte.. Driver FT1000usb 64bit kernel 3.0.xx

A este ako bonus 32bit verzia Driver FT1000usb 32bit kernel 3.0.xx

Ale nieje otestovana. Mam nainstalovany iba 64bit linux..

ArSi?

By arsi v Pia 15 Apr, 2011 09:47 CEST

Taak som zase tu!

Ked uz som rozbehnuty, skusil som driver "znova" portnut pre 64Bit linux.
Ha ze znova? Ono uz som to raz pred par rokmi ukecal, ale potom jak uz to s diskami a nezalohovanim chodi
som o zdrojaky prisiel :-)

Takze tu je ten slubeny port ft1000usb_64Bit_linux

Testovane je to na najnofsich openSuse

By arsi v Ut 12 Apr, 2011 12:41 CEST

Caf!

Po par kompilaciach openWrt kernelu sa mi podarilo uspesne pripojit modem k asusu 500gp..

Takze tu si mozete stiahnut firmware

A tu je instalacny balicek pre ipkg

Nejak sa mi stale nedari ukecat openWrt aby pridalo do instalacie subor ft3000.img takze pred pripojenim
modemu je nutne vytvorit adresar
/etc/flarion
a donho vlozit spominany subor

Nasledne v subore /etc/config/network treba v sekcii wan zmenit odkaz na eth2

Pozor spotreba modemu je dost velka, najprv treba pripojit usb kabel do oboch portov a nasledne pripojit modem.. Alebo pouzit aktivny usb hub..

Este kratky navod pre zaciatocnikov..

Stiahnite si firmware.
Potom su dve moznosti:
1. Pouzit asusacku firmware flash utility (je na cd)

2. cez tftp
vypneme asus niecim zatlacime cierne tlacidlo na asuse a zapneme napajanie, drzime az kym nezacne blikat napajacia ledka..

sietovku na pocitaci prepneme na staticku IP a dame nejaku ktora je v rozsahu kde je asus
napr. 192.168.1.10

potom pod windows napiseme do cmd lajny

tftp -i 192.168.1.1 PUT openwrt-brcm47xx-squashfs.trx

ta ipcka je ip asusu.

Po preneseni suboru zhasne napajacia ledka a treba pockat na opetovne rozsvietenie
trva to par minut..

potom sa telnetom pripojime na asus. adresu ma 192.168.1.1

prve co treba spravit je nastavit heslo

passwd

a zadame nase nove heslo

potom

mkdir /etc/flarion
cd /etc/flarion
wget -O ft3000.img http://www.arsi.sk/tiki-download_file.php?fileId=9

samozrejme na stiahnutie musi byt wan strana pripojena k internetu

nasledne pripojime modem a ledka by sa mala rozsvietit na modro..

este upravyme zaznam v subore /etc/config/network

a ficime

Prajem prijemnu zabavu!!!

Arsi

By arsi v Pia 08 Okt, 2010 22:29 CEST

Cau deti! :-)

Taaakze dnesna tema: Aplikacia Netbeans Platform ako sluzba windows..

Pri praci na mojom novom projekte som dospel k potrebe spustit Netbeans Platform aplikaciu ako sluzbu windowsov..
Noo musim povedat ze prist nato ako to ukecat nebolo az take jednoduche.. Na zaciatok som potreboval nejake tie zdrojaky :-) Ale stiahnut mercurial repository netbeansov zaberie peknych par hodin. Potom nasledovalo badanie v ktorom module sa nachadza laucher. Laucherov je tam viac takze som ich musel zopar prejst.
Nachadza sa v module apisupport.harness a moj upraveny zavadzac vyzera takto:

app.cpp
/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
 *
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
 * Other names may be trademarks of their respective owners.
 *
 * The contents of this file are subject to the terms of either the GNU
 * General Public License Version 2 only ("GPL") or the Common
 * Development and Distribution License("CDDL") (collectively, the
 * "License"). You may not use this file except in compliance with the
 * License. You can obtain a copy of the License at
 * http://www.netbeans.org/cddl-gplv2.html
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
 * specific language governing permissions and limitations under the
 * License.  When distributing the software, include this License Header
 * Notice in each file and include the License file at
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the GPL Version 2 section of the License file that
 * accompanied this code. If applicable, add the following below the
 * License Header, with the fields enclosed by brackets [] replaced by
 * your own identifying information:
 * "Portions Copyrighted [year] [name of copyright owner]"
 *
 * Contributor(s):
 *
 * The Original Software is NetBeans. The Initial Developer of the Original
 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
 * Microsystems, Inc. All Rights Reserved.
 *
 * If you wish your version of this file to be governed by only the CDDL
 * or only the GPL Version 2, indicate your decision by adding
 * "[Contributor] elects to include this software in this distribution
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
 * single choice of license, a recipient has the option to distribute
 * your version of this file under either the CDDL, the GPL Version 2 or
 * to extend the choice of license to its licensees as provided above.
 * However, if you add GPL Version 2 code and therefore, elected the GPL
 * Version 2 license, then the option applies only if the new code is
 * made subject to such option by the copyright holder.
 *
 * Author: Tomas Holy
 */


#include "applauncher.h"


SERVICE_STATUS ServiceStatus;
SERVICE_STATUS_HANDLE hStatus;
AppLauncher launcher;
void  ServiceMain(int argc, char** argv);
void  ControlHandler(DWORD request);

int main(int argc, char *argv[]) {
    SERVICE_TABLE_ENTRY ServiceTable[2];
    ServiceTable[0].lpServiceName = "NbApp";
    ServiceTable[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)ServiceMain;
    ServiceTable[1].lpServiceName = NULL;
    ServiceTable[1].lpServiceProc = NULL;
    StartServiceCtrlDispatcher(ServiceTable);
     return 0;
}
void ServiceMain(int argc, char** argv)
{
    ServiceStatus.dwServiceType        = SERVICE_WIN32;
    ServiceStatus.dwCurrentState       = SERVICE_START_PENDING;
    ServiceStatus.dwWin32ExitCode      = 0;
    ServiceStatus.dwServiceSpecificExitCode = 0;
    ServiceStatus.dwCheckPoint         = 0;
    ServiceStatus.dwWaitHint           = 0;

    hStatus = RegisterServiceCtrlHandler(
        "NbApp",
        (LPHANDLER_FUNCTION)ControlHandler);

    if (hStatus == (SERVICE_STATUS_HANDLE)0)
    {
        return;
    }

    ServiceStatus.dwCurrentState = SERVICE_RUNNING;
    SetServiceStatus (hStatus, &ServiceStatus);
    launcher.start(argc - 1, argv + 1);
    return;
}

void ControlHandler(DWORD request)
{
    return;
}

Este dodam ze pri kompilovani je potrebny cygwin, ale preba nastavit pre c++ kompilator c++-3.exe novsia verzia nepodporuje nastavenie -mno-cygwin

No a na zaver skompilovana verzia..

app.exe

Treba ju skopcit ako appHomeDir/bin/appName.exe

nasledne otvorit command promt a

sc create myAppService binpath= c:\...\appHomeDir/bin/appName.exe

potom controlPanel/Administrative Tools/services najdete myAppService
otvorite properties
nastavite autoStart
a este zalozka /log on/Allow service to interact with desktop

A hotovo!!!

By admin v Po 20 Sep, 2010 15:16 CEST

Pri hladani vo forach sa mi nepodarilo najst priklad, ako vytvorit svoj vlastny defaultLookup, ktory by umoznoval registraciu dalsich Lookupov, nieco na styl "TopCommponent" a procedura associateLookup..

Takze tu je moja verzia:

import org.openide.util.Lookup;
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;
import org.openide.util.lookup.ProxyLookup;
import org.openide.util.lookup.ServiceProvider;

/**
 * Default Lookup pre body
 * @author ArSI
 */
@ServiceProvider(service = PointLookup.class)
public final class PointLookup extends ProxyLookup {

    private static final InstanceContent instanceContent = new InstanceContent();
    private static Lookup instanceLookup = new AbstractLookup(instanceContent);

    /**
     * vytvory novy default proxy lookup a prida mu
     * abstractlookup v ktorom budeme skladovat instancie objektov
     */
    public PointLookup() {
        super(new Lookup[]{
                    instanceLookup
                });
    }

    /**
     * Zaregistruje do tohto defaul lookupu novy uzivatelsky
     * @param l lookup na zaregistrovanie
     */
    public final void addLookup(Lookup l) {
        Lookup[] lookups = this.getLookups().clone();
        Lookup[] newLookups = new Lookup[lookups.length + 1];
        System.arraycopy(lookups, 0, newLookups, 0, lookups.length);
        newLookups[lookups.length] = l;
        this.setLookups(newLookups);

    }

    /**
     * Zaregistruje novu instanciu objektu
     * @param obj instancia objektu
     */
    public final void zaRegistuj(Object obj) {
        instanceContent.add(obj);
    }

    /**
     * zrusi registraciu instancie objektu
     * @param obj instancia objektu
     */
    public final void odRegistruj(Object obj) {
        instanceContent.remove(obj);
    }
}

No a v tele triedy ktora bude lookup poskytovat bude potom

...
private static PointLookup lookup = Lookup.getDefault().lookup(PointLookup.class);
...
    public static Lookup getLookup() {
        return lookup;
    }

    public static PointLookup getPointLookup(){
        return lookup;
    }

Samozrejme som uvazoval nad tym ako to pridat do Lookup.getDefault()..
Po prejdeni zdrojakov netbeansov mam pocit ze sa to da tak, ze vyrobim potomka "MainLookup" ktory sa stara
o inicializaciu lookupu s tym ze tam prihodim aj ten nas..
A zaregistrujem to ako sluzbu.. pod "Lookup.class"