Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wakaama-dev] LwM2M client (wakaama) to RIOT

Hi Benjamin,

that's exactly what I said before, or at least what I meant to say.
However, yes, that's the typical signature for a RIOT app main. I thought the same thing, to delete those parameters.

Anyway if I delete those parameters, I'll have to delete the while as well, consequently also the switch-case.
But if I delete the switch case, how do I manage the code in those cases? 

Maybe is there some of the code that now is in those switch case that I can delete?


thank you all, regards,
Roberto

2015-05-27 14:43 GMT+02:00 Benjamin Cabé <benjamin@xxxxxxxxxxx>:
Hi Roberto,

I am not sure a RIOT application does get any command-line arguments passed in the first place, no? My understanding is that the typical signature for a RIOT app main is int main(void)
So I think you would be better off just not using getopt and create a trimmed-down main() of your own.

Benjamin –

De : Roberto P <robbberto14@xxxxxxxxx>
Répondre à : Wakaama developer discussions <wakaama-dev@xxxxxxxxxxx>
Date : mercredi 27 mai 2015 12:51
À : Wakaama developer discussions <wakaama-dev@xxxxxxxxxxx>
Objet : Re: [wakaama-dev] LwM2M client (wakaama) to RIOT

The Idea that I have is that is not being passed any value to argc and argv, but I don't know if it's right.

However since that I already know that what I'm going to do is a client, couldn't I remove that while and switch-case and just put the code of the cases that I need? 

(I hope to have been clear, I'm sorry for my not perfect english)

regards,
Roberto


2015-05-27 12:06 GMT+02:00 Roberto P <robbberto14@xxxxxxxxx>:
Hi Achim, thank you for the answer,
 

are you able to „debug“ a run? Or extend the logging?


Unfortunately since that the program doesn't even start, as far as I know, I can't even do a debug.
 

If so, what are the values for argc and argv?

Usually they should be related to command line parameters (see „getopt“ docu).


I had to temporarily remove that while (and put a printf) to be able to see the values of argc that is:  134660048

As far as argv is concerned I got these (see the screenshot) strange symbols as values:




regards,
Roberto



2015-05-26 15:44 GMT+02:00 Kraus Achim (INST/ESY4) <Achim.Kraus@xxxxxxxxxxxx>:

Hi Roberto

 

are you able to „debug“ a run? Or extend the logging?

If so, what are the values for argc and argv?

Usually they should be related to command line parameters (see „getopt“ docu).

 

Mit freundlichen Grüßen / Best regards

 

Achim Kraus

 

Bosch Software Innovations GmbH

Communications (INST/ESY4)

Stuttgarter Straße 130

71332 Waiblingen

GERMANY

www.bosch-si.de

www.blog.bosch-si.com

 

achim.kraus@xxxxxxxxxxxx

 

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B

Executives: Dr.-Ing. Rainer Kallenbach; Michael Hahn

 

 

Von: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] Im Auftrag von Roberto P
Gesendet: Dienstag, 26. Mai 2015 14:12
An: Wakaama developer discussions
Betreff: [wakaama-dev] LwM2M client (wakaama) to RIOT

 

Hi everybody.

 

I guess I'm doing big steps forward in my goal to import wakaama client to RIOT.

 

I took all the files that I needed from wakaama (all those in the core folder + lots others) and I finally satisfied all the undefined dependencies that I had before in lwm2mclient.c, I also added all the necessary macros.

 

I only have a last issue before making it work. It compiles without any error, just several warnings, but as soon as I try to run it, I get an error:

make: *** [term] Segmentation fault (core dumped)

 

which, after some investigation, is due to this while (row 805 in tests/client/lwm2mclient.c):

 

  while ((opt = getopt(argc, argv, "bcl:n:p:t:h:")) != -1)

 

so my question is how can I solve that? I'm having an hard time, I guess I need some help.

 

 

Thank you very much.

Roberto

 

 


_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wakaama-dev


_______________________________________________ wakaama-dev mailing list wakaama-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/wakaama-dev

_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wakaama-dev


Back to the top