Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
gonsays
@gonsays
Hello Guys!
I'm trying to ping an IP address using the CallSDKFunctions.ino
my Arduino sketch is here: http://pastebin.com/MEXhdv88

but it is not compiling:

CallSDK-v2.ino: In function 'void setup()':
CallSDK-v2:35: error: expected unqualified-id before string constant
CallSDK-v2:111: error: expected '}' at end of input
expected unqualified-id before string constant

these are the errors :sa:
do I need to call any .h file?
"ICACHE_FLASH_ATTR"
I think the problem is here
Markus
@Links2004
remove the ICACHE_FLASH_ATTR its not need, it automatically in flash
and move #include "Esp.h" out of the extern.
void setup() {
    Serial.begin(115200);
  #ifdef ESP8266
  extern "C" {
void ICACHE_FLASH_ATTR user_ping_recv(void *arg, void *pdata){
you can not create a function in a function
and no extern "C" { in this case.
gonsays
@gonsays
thank you so much!
no extern "C" here, but the function must be inside the ifdef right?
Markus
@Links2004
the ifdef is not needed for the ESP
only if you what to use the same code in AVR
gonsays
@gonsays
Gives me these errors:
CallSDK-v2.ino: In function 'void setup()':
CallSDK-v2:23: error: a function-definition is not allowed here before '{' token
CallSDK-v2:34: error: a function-definition is not allowed here before '{' token
CallSDK-v2:39: error: a function-definition is not allowed here before '{' token
a function-definition is not allowed here before '{' token
Markus
@Links2004
still function in function
gonsays
@gonsays
I've removed the ICACHE_FLASH_ATTR
ohh
ok
I got it
outside the setup or loop
yes
Note os_printf is only visible if you do:
Setup.setDebugOutput(true);
gonsays
@gonsays
blob
oh, ok
it gives me all these errors when I try to compile it
gonsays
@gonsays
yup, I tried to compile your code
and gave me these errors
Markus
@Links2004
the http://bbs.espressif.com/viewtopic.php?t=583 code seams not to good.
i only write it "free hand", have no IDE & compiler at my tablet.
gonsays
@gonsays
ohh ok thank you
gonsays
@gonsays
CallSDK-v2:39: error: 'ping_start' was not declared in this scope
the ping_Start function from the SDK is not being identified
it should been identified right?
maybe i'm not including something
Ivan Kravets
@ivankravets
Dear PlatformIO Users, welcome to PlatformIO IDE beta testing https://twitter.com/platformio_org/status/691030836720844800
Markus
@Links2004
@gonsays include ping.h
gonsays
@gonsays
oh ok thnaks!
I don't think that I have that file
well, at least it compiled now
Setup.setDebugOutput(true);
in order to "watch" the answer
gonsays
@gonsays
should I include a lib to use it?
oh
is it Serial.setDebug...