Alternative to curl and bridge?

Hello,

Im working with bridge library and I have a problem because the comunication is slow between arduino and linino and I need communication in real time. Its any alternative?

Actually, I am execute in yún a C program that execute “curl http:/…”.

Regards.

If you are a hardcore C programmer, have a look at this: http://forum.arduino.cc/index.php?topic=297265.0

flyonthewind:
Im working with bridge library and I have a problem because the comunication is slow between arduino and linino and I need communication in real time. Its any alternative?

@flyonthewind,
this is a common request, there are a lot of “work arounds”. Can you explain your need a bit more?
TIA
Jesse

Of course!

I have a C program in Linino for send orders to Arduino. If order is a ultrasound sensor its no problem, but if the sesor is a motors delay its problematic. I have a delay around 0,5"-1".

flyonthewind:
Of course!

I have a C program in Linino for send orders to Arduino. If order is a ultrasound sensor its no problem, but if the sesor is a motors delay its problematic. I have a delay around 0,5"-1".

Okay, not very common problem. But has solution.

  • If you want deterministic solution, then all your important code MUST be on ATmega32u4, not Linux. Linux is NOT deterministic.
  • If NOT deterministic and small time window delay is okay, you must define that time window. Maybe some code can be on ATmega32u4 and some code on Linux.

Do you understand the word deterministic?

Jesse

Hi,

Yes, I know. But Its not possible. I send remote orders to Linino and it must send the values of pins to ATmega.

Libcurl (http://curl.haxx.se/) is possible to use in linino in a C code program?

Regards.

flyonthewind: Hi,

Yes, I know. But Its not possible. I send remote orders to Linino and it must send the values of pins to ATmega.

Libcurl (http://curl.haxx.se/) is possible to use in linino in a C code program?

Regards.

@flyonthewind,

to send values to pins you must use ATmega. If your client is remote then you must go through Linux.

Yes, you have available:

  • libcurl (for C)
  • perl-www-curl
  • php4-mod-curl
  • php5-mod-curl
  • python-curl
  • strongswan-mod-curl

Sorry no LUA library for CURL available.

For other languages see answer by sonnyyu http://forum.arduino.cc/index.php?topic=297259.0

To put library on Linux, SSH into Yun

opkg update
opkg libcurl

Jesse

Hello, thanks!

How to send values to pins through Linux?

I have libcurl installed by opkg, but gcc can not find the file, I use #include also #include and doesn't found "fatal error: curl/curl.h: No such file or directory"

jessemonroy650: Linux is NOT deterministic.

I guess/hope that you wanted to write: "Linux is not an RTOS (Real Time Operating System)", because being non deterministic is scary and not reliable ;-)

kind regards,

Jos

flyonthewind: Hello, thanks!

How to send values to pins through Linux?

I have libcurl installed by opkg, but gcc can not find the file, I use #include also #include and doesn't found "fatal error: curl/curl.h: No such file or directory"

google: gcc flags

3.1 Option Summary https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html

The flag you need is -include

One way to send command to pin. http://arduino.cc/en/Tutorial/MailboxReadMessage

Jesse

Hello,

Mailbox is similar to yunserver-client no?

I compile OK, and I receive error "fatal error: curl/curl.h: No such file or directory"

gcc -o program file.cpp file2.cpp -lstdc++ -lcurl

I think that Libcurl-dev not in Linino

Thanks!

flyonthewind:

1) Mailbox is similar to yunserver-client no?

2) I compile OK, and I receive error "fatal error: curl/curl.h: No such file or directory"

gcc -o program file.cpp file2.cpp -lstdc++ -lcurl

3) I think that Libcurl-dev not in Linino

1 Mailbox is service, processor (ATmega32u4) to processor (AR9331). Mailbox is memory, not socket, not internet.

2 Compile:

gcc -o program file.cpp file2.cpp -lstdc++ -lcurl [b]-include /{path to}/curl/curl.h[/b]

3 libcurl is not Libcurl-dev. libcurl is okay - use.

Jesse

I try to compile with:

gcc -o program file.cpp file2.cpp -lstdc++ -lcurl -include /{path to}/curl/curl.h

but I don't kwow whati is "path to" directory. I have installed libcurl and the files are here:

opkg files libcurl Package libcurl (7.29.0-1) is installed on root and has the following files: /usr/lib/libcurl.so.4 /usr/lib/libcurl.so.4.3.0

I have try to execute this command: gcc -o program parsereq.cpp -lstdc++ -lcurl -include /usr/lib/libcurl.so.4

But the error is the same: "fatal error: curl/curl.h: No such file or directory"

Where is my fault?

Thanks