| | OJN en local, ztamps non enregistré | |
| | Auteur | Message |
---|
Pixel du Rezo Special Nabz
Nbr de messages : 2708
| Sujet: Re: OJN en local, ztamps non enregistré Mer 10 Oct 2012 - 22:34 | |
| Tu connais un minimum le C++ ou pas ? Car le plus simple serait de mettre des logs, notamment dans les fonctions OnRfid (sur le lapin, les plugins, etc..) puis comprendre pourquoi le plugin configuré ne répond pas. | |
| | | rexave Lapin nain
Localisation : Nantes Nbr de messages : 16 Carottes : 4580
| Sujet: Re: OJN en local, ztamps non enregistré Mer 10 Oct 2012 - 22:36 | |
| Je ne connais pas particulièrement le C++ mais développe en PHP, java, python, perl etc ... donc ca devrait le faire.
Peux tu m'indiquer les fichiers impactés ? Comment on récupère les logs du lapin ? | |
| | | Pixel du Rezo Special Nabz
Age : 44 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13143
| Sujet: Re: OJN en local, ztamps non enregistré Mer 10 Oct 2012 - 22:41 | |
| quand je parlais du lapin, c'est le fichier qui gère le lapin. Les fichiers : lib/pluginmanager.cpp lib/bunny.cpp et les plugins/NAME/plugin_NAME.cpp qui ont un OnRFID Dans ton bin/openjabnab.ini [Log] LogFile=openjabnab.log LogFileLevel=Debug LogScreenLevel=Debug Tu auras donc les logs dans le bin/openjabnab.log et à l'écran. Dans un premier temps, tu mets des - Code:
-
LogDebug("fichier XX, ligne YY"); notamment au début de chaque OnRFID, et dans chaque cas des "if", "foreach", etc.. | |
| | | rexave Lapin nain
Localisation : Nantes Nbr de messages : 16 Carottes : 4580
| Sujet: Re: OJN en local, ztamps non enregistré Mer 10 Oct 2012 - 23:20 | |
| J'ai mis le nom des fonctions ou les étapes clefs des fonctions appelées. Voici ce que j'obtiens en passant un Ztamp paramétré CallUrl : - Code:
-
[10/10/2012 23:19:06] void PluginManager::HttpRequestBefore(HTTPRequest&) : PluginManager::HttpRequestBefore [10/10/2012 23:19:06] bool PluginManager::HttpRequestHandle(HTTPRequest&) : PluginManager::HttpRequestHandle [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID foreach [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID p->GetEnable [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID foreach [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID p->GetEnable [10/10/2012 23:19:06] virtual bool PluginCallURL::OnRFID(Bunny*, const QByteArray&) : PluginCallURL::OnRFID [10/10/2012 23:19:06] virtual bool PluginCallURL::OnRFID(Bunny*, const QByteArray&) : CallURL [10/10/2012 23:19:06] void PluginCallURL::CallURL(Bunny*, QString) : PluginCallURL::CallURL [10/10/2012 23:19:06] bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID p->OnRFID | |
| | | rexave Lapin nain
Localisation : Nantes Nbr de messages : 16 Carottes : 4580
| Sujet: Re: OJN en local, ztamps non enregistré Mer 10 Oct 2012 - 23:29 | |
| J'ai voulu débuguer plus en détail CallUrl(), vu que l'on semble arriver jusque là. Mais je n'arrive pas à afficher des infos : - Code:
-
void PluginCallURL::CallURL(Bunny * b, QString url) { LogDebug("PluginCallURL::CallURL "); QByteArray message = "CU " + url.toAscii() + "\n"; LogDebug("PluginCallURL::CallURL message=" + message); b->SendPacket(MessagePacket(message)); } donne : - Code:
-
plugin_callurl.cpp: In member function âvoid PluginCallURL::CallURL(Bunny*, QString)â: plugin_callurl.cpp:30: error: call of overloaded âarg(const char [45], const QByteArray)â is ambiguous /usr/include/qt4/QtCore/qstring.h:133: note: candidates are: QString QString::arg(qlonglong, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:135: note: QString QString::arg(qulonglong, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:736: note: QString QString::arg(long int, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:738: note: QString QString::arg(ulong, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:732: note: QString QString::arg(int, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:734: note: QString QString::arg(uint, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:740: note: QString QString::arg(short int, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:742: note: QString QString::arg(ushort, int, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:151: note: QString QString::arg(char, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:153: note: QString QString::arg(QChar, int, const QChar&) const <near match> /usr/include/qt4/QtCore/qstring.h:155: note: QString QString::arg(const QString&, int, const QChar&) const /usr/include/qt4/QtCore/qstring.h:744: note: QString QString::arg(const QString&, const QString&) const | |
| | | Pixel du Rezo Special Nabz
Age : 44 Localisation : Montpellier Nabaztag : Ptiloo (V1), Kymoo (V2), Mymoo (V2), Lyloo (V2), Maryloo (V2), Faitoo (V2), Titoo (V2), Kachoo (Karotz) Nbr de messages : 2708 Carottes : 13143
| Sujet: Re: OJN en local, ztamps non enregistré Jeu 11 Oct 2012 - 9:01 | |
| message est un QByteArray, le plus propre sera ça : - Code:
-
LogDebug(QString("PluginCallURL::CallURL message= %1").arg(QString(message))); et celui ci marchera aussi : - Code:
-
LogDebug("PluginCallURL::CallURL message=" + QString(message)); | |
| | | rexave Lapin nain
Localisation : Nantes Nbr de messages : 16 Carottes : 4580
| Sujet: Re: OJN en local, ztamps non enregistré Sam 17 Nov 2012 - 16:21 | |
| Bonjour, j'avais laissé ce point de côté, j'ai eu une urgence entre temps. Me voici de retour. J'ai donc ajouté dans plugins/callurl/callurl.cpp des logs comme suit : - Code:
-
void PluginCallURL::CallURL(Bunny * b, QString url) { LogDebug("PluginCallURL::CallURL "); QByteArray message = "CU " + url.toAscii() + "\n"; LogDebug(QString("PluginCallURL::CallURL message= %1").arg(QString(message))); b->SendPacket(MessagePacket(message)); } J'ai affecté l'action sur un nanoztag RFID qui appelle l'url http://192.168.0.252/mail.php J'obtiens ceci dans les logs : - Code:
-
bool PluginManager::HttpRequestHandle(HTTPRequest&) : PluginManager::HttpRequestHandle bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID foreach bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID p->GetEnable bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID foreach bool Bunny::OnRFID(const QByteArray&) : Bunny::OnRFID p->GetEnable virtual bool PluginCallURL::OnRFID(Bunny*, const QByteArray&) : PluginCallURL::OnRFID virtual bool PluginCallURL::OnRFID(Bunny*, const QByteArray&) : CallURL void PluginCallURL::CallURL(Bunny*, QString) : PluginCallURL::CallURL void PluginCallURL::CallURL(Bunny*, QString) : PluginCallURL::CallURL message= CU http://192.168.0.252/mail.php Je retrouve bien mon url, par contre je ne recois pas de mail, alors que si je l'appelle via un navigateur je recoit bien le mail. Le lapin et le navigateur sur le même réseau local. Y a t il des logs sur le lapin ? Je me demande si le lapin traite la demande qui semble bien partir. Comment vérifier que c'est le bon bootcode qui est sur le lapin ? merci pour ta prochaine réponse | |
| | | Contenu sponsorisé
| Sujet: Re: OJN en local, ztamps non enregistré | |
| |
| | | | OJN en local, ztamps non enregistré | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |