KA04 example sketch does not compile

Hi,

I recently bought the KA04 Ethernet Shield Kit… Putting it together was real fun; it is a nice kit to build…

Downloading the example software was no problem… Copied it to the Arduino Sketch directory… put the EtherCard folder in the Libraries folder…

Started Arduino… I am using version 1.6.9… after Verify I get the error message:

=====================================================

Arduino: 1.6.9 (Windows XP), Board: “Arduino/Genuino Uno”

In file included from D:\Documents and Settings\satchmo\My Documents\Arduino\ka04_sample_code\ka04_sample_code.ino:2:0:

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:147:26: error: ‘prog_char’ has not been declared

static void browseUrl (prog_char *urlbuf, const char *urlbuf_varpart,

                      ^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:148:26: error: ‘prog_char’ has not been declared

                      prog_char *hoststr,

                      ^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:150:25: error: ‘prog_char’ has not been declared

static void httpPost (prog_char *urlbuf, prog_char *hoststr,

                     ^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:150:44: error: ‘prog_char’ has not been declared

static void httpPost (prog_char *urlbuf, prog_char *hoststr,

                                        ^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:151:25: error: ‘prog_char’ has not been declared

                     prog_char *header, const char *postval,

                     ^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard/EtherCard.h:169:26: error: ‘prog_char’ has not been declared

static bool dnsLookup (prog_char* name);

                      ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

===============================

this is not good, right? seems to me, some declaration is missing…

help, please?

Did you unzip the file before loading it into the Arduino software?
You might try version 1.6.6 or lower.

did I unzip the file before loading it? are you being serious with me?

and try 1.6.6.? why? does that version ignore a faulty declaration? you must be kidding me…

anyone else?

to all…

first: of course I unpacked the KA04_sample_code.zip file… how else would I have gotten the above results?

as far as I can see now, there is a missing declaration of prog_char in the EtherCard.H file… I think it is supposed to be some type declaration; not an actual variable… it is used to hold the URL-string… as far as I can make out…

I am not able to correct the H-file; it is not flat ASCII… maybe there is a workaround for that one…

if there is someone out there who has got this working? pleas send me you H-file…

I did not try an older version, of the Arduino IDE software… that seems nonsense to me…

regards…

the plot thickens…

I managed, to repair the EtherCard.H file with Notepad++; very nifty editor…

I had to replace ‘prog_char’ with just ‘char’… that solved teh above error…

now, we get this…

===

Arduino: 1.6.9 (Windows XP), Board: “Arduino/Genuino Uno”

C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware “C:\Program Files\Arduino\hardware” -hardware “D:\Documents and Settings\satchmo\Local Settings\Application Data\Arduino15\packages” -tools “C:\Program Files\Arduino\tools-builder” -tools “C:\Program Files\Arduino\hardware\tools\avr” -tools “D:\Documents and Settings\satchmo\Local Settings\Application Data\Arduino15\packages” -built-in-libraries “C:\Program Files\Arduino\libraries” -libraries “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries” -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10609 -build-path “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp” -warnings=none -prefs=build.warn_data_percentage=75 -verbose “D:\Documents and Settings\satchmo\My Documents\Arduino\ka04_sample_code\ka04_sample_code.ino”
C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware “C:\Program Files\Arduino\hardware” -hardware “D:\Documents and Settings\satchmo\Local Settings\Application Data\Arduino15\packages” -tools “C:\Program Files\Arduino\tools-builder” -tools “C:\Program Files\Arduino\hardware\tools\avr” -tools “D:\Documents and Settings\satchmo\Local Settings\Application Data\Arduino15\packages” -built-in-libraries “C:\Program Files\Arduino\libraries” -libraries “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries” -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10609 -build-path “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp” -warnings=none -prefs=build.warn_data_percentage=75 -verbose “D:\Documents and Settings\satchmo\My Documents\Arduino\ka04_sample_code\ka04_sample_code.ino”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._dhcp.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._dns.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._enc28j60.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._tcpip.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._webutil.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\EtherCard.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\dhcp.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\dns.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\enc28j60.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\tcpip.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard\webutil.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp” -o “nul”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp” -o “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\preproc\ctags_target_for_gcc_minus_e.cpp”
“C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino10/ctags” -u --language-force=c++ -f - --c+±kinds=svpf --fields=KSTtzns --line-directives “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\preproc\ctags_target_for_gcc_minus_e.cpp”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp” -o “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\sketch\ka04_sample_code.ino.cpp.o”
“C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR “-IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard” “-ID:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard” “D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp” -o “D:\Temp\UsrTemp\build7d099c5d125d6ea2f4099b4f9f62b7f6.tmp\libraries\EtherCard._EtherCard.cpp.o”
D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\5’ in program

CF0F572FBD|com.apple.Safari

^

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\26’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\7’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\2’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\2’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\16’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\260’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\2’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\16’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\342’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\36’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\232’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\311’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\377’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\16’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\342’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\230’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\230’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\25’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\36’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\1’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\36’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\34’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\36’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\377’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:2: error: stray ‘\377’ in program

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:9: error: ‘Mac’ does not name a type

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:104: error: ‘J’ does not name a type

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:158: error: expected unqualified-id before numeric constant

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:167: error: ‘Safari’ does not name a type

D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard._EtherCard.cpp:1:174: error: expected unqualified-id before numeric constant

Using library EtherCard in folder: D:\Documents and Settings\satchmo\My Documents\Arduino\libraries\EtherCard (legacy)

exit status 1
Error compiling for board Arduino/Genuino Uno.

=====

anyone?

from the compiler output, I suddenly got the feeling I was dealing with MAC OSX software… from within the library…

all the ._<file.ext> files were included to support this library on MAC OSX… that was the trick…

and upon loading the library in compilation, it stumbled upon unrecognizable code…

so I deleted all the ._<file.ext> files from the EtherCard folder… and VOILA…

we have compilation…

I guess, this is what Velleman means, when they say Level 5 experience kit… :slight_smile:

I am in luck, to be a programmer too…

in the end…

I got this all working nicely… once you are all hooked up, you can switch on the Serial Monitor SHFT/CTRL/M… do not forget to adjust the baud rate to the value in the sketch… in my case 57600… you might try and tinker with that one… it adjusts the speed of your connection…

and ow yeah… do not forget, to hook up to your router for a LAN connection… you are not on the worldwideweb… just on your own LAN…

once the shield is all up and running, you receive an IP…
surf to that one, and you will see the output on your own simple web server…
for now, this example displays the Active Time…

one word of advice to Velleman… this is NOT how you do it… this might be a level 5 EXP kit, but this might be too much for some of us…

apart from that? great kit, and great results…

regards to all…

I am having the same problem, but am not a programmer! Is there any way you can upload your updated .h file? I’ve tried everything I can think of I can’t get the darn thing to work.

hi evlaar…

the solution is all in the above lines:

  • you need to repair the EtherCard.H file; I used the Notepad+ editor for this; just replace all occurences of “prog_char” with “char”…

  • after that you might need to alter your EtherCard folder, like I had to; I had to delete all the MAC OSX lib files… (starting with ._)

if you read all of my instructions, you should be fine…

regards…

@evlaar

I will break it down for you:

  • I would download some version of Notepad+, or use at least an editor that can translate the EtherCard.H file to plain ASCII…

  • goto the EtherCard folder and open EtherCard.H; replace all strings “prog_char” with just “char”; prog_char is NOT a typecast…

  • mind the last occurence: static bool dnsLookup (prog_char* name); this should read: static bool dnsLookup (char *name); the asterisk belongs to name in C++…

  • once you fixed this, saved EhterCard.H and recompile you will most likely run into another error, like I did…

  • depending on your platform, the EtherCard library contains both Windows and MAC OSX driver files; not too elegant, again…

  • so my compiler ran into MAX OSX code in this library, which it obviously could not translate…

  • so what I had to do was delete all the MAC OSX files, and it worked; those were all the files that start with “._”…

  • I suppose, that on a MAC OSX configuration, you will run into the same problem; maybe not: it depends on how smart Arduino compiles…

On a final note, I think this is bad practice from the part of Velleman; the should at least have taken the effort of offering a seperate download for Windows vs. MAC; considering the “prog_char” issue, I cannot tell what happens there… Maybe the “prog_char” type is part of the MAC OSX library…

All in all, very sloppy programming indeed…

@ronniebonk

Thanks for the quick reply! Always a concern on these forums your questions fall on deaf ears. I took care of the H file, and it reduced my compiling errors drastically. the last one it doesn’t like is ‘word homePage()’ Below is my error message-

[color=#BF0000]Arduino: 1.6.6 (Windows 7), Board: “Arduino/Genuino Uno”

C:\Arduino\Sketches\ka04_sample_code\ka04_sample_code.ino: In function ‘word homePage()’:

ka04_sample_code:37: error: ‘word homePage()’ was declared ‘extern’ and later ‘static’ [-fpermissive]

static word homePage() {

                  ^

ka04_sample_code:11: error: previous declaration of ‘word homePage()’ [-fpermissive]

Serial.begin(57600);

  ^

exit status 1
‘word homePage()’ was declared ‘extern’ and later ‘static’ [-fpermissive][/color]

Very frustrating to buy and build this shield and have velleman’s support be so weak…

@evlaar

you are most welcome; I can understand the frustration…

concerning your remaining compiler error, I have to tell you I am not familiar with that one; at least, I did not get it… strange…

I will have to delve into this deeper; unfortunately, I do not have the time right now…

I noticed, you are using version 1.6.6 of the Arduino IDE, whereas I am using 1.6.9; that could make some difference…

would you be willing to upgrade to 1.6.9, and try again? and come back to me after that?

regards, and good luck…

@evlaar

I am back, with good tidings… although in my opinion, you should have been able to cure this one yourself…

upon loading the KA04_samplecode, you will notice that the declaration “static word homePage() { … }” (which is the function, that builds your webpage) is written in between the setup() { … } and loop() { … } procedure declarations… as I recall correctly…

you do not have to be a real programmer, to understand that this is bad practice; the declaration of other objects, than setup() and loop() are supposed to be placed after loop()… it is possible, this might have worked with earlier versions of the Arduino IDE…

anyway, the first thing I did upon loading this sketch, was to correct that… I make a habit of cleaning up any code, before I compile it; you should learn that too… and you really need some programming skills in at least C++ and/or Processing…

so: if you cut the entire “static word homePage() { … }” section, and paste it after loop() { … }, you should be fine…

rest of the instructions above…

regards, and good luck…

PS. sorry, you had to experience this… but this is what you get in Open Source enviroments and contributed libraries…

Velleman is no software company; but I think they should at least test their own products, and provide better support on this…

@evlaar

I think you should be fine, after this…

Still a last word of advice: I do not know what your skills are, but you should at least get familiar with the software part of all this…

At least, the Arduino platform is intended to make electronics work via software…

In the case of this kit KA04, you are able to set up some sort of LAN server at home; which can be nice in some ways…

But how will you pull that off, without at least understanding the software?

Anyway… you know how to find me…

regards…

Thanks @ronniebonk I think I may just be in over my head with this one. I am a mechanical engineer hacking my way through the software part, only been using arduino for a few weeks. I have an aquaponics greenhouse at my house and have it fully automated with arduino and arduino based sensors/actuators. I taught myself the programs along the way, but really they’re all written for you with some google magic.

Then I had the bright idea to hook it up with ethernet shield to try to see it all on my phone remotely- and here we are. If I can’t get through step one the rest might be quite the roller coaster. Do you think if I just buy another shield from ebay (around $10) I might have better luck with the stock programs from the arduino library?

???

did you get this running or not? do we have compilation, after all my hints?

Yes, it worked!! Thanks so much. I guess in my ramblings I forgot to mention that. I guess my point is now I have no idea how to program it to write sensor readings to a server, since the arduino ethernet libraries don’t work and it has to be the velleman ethercard one.

But at least i have a sweet stop watch now!

well, you might look down at this result, my dear evlaar…

but I hope you realize, that you can change the “static word homePage() { … }” function to point to any HTML and URL you choose; you just need to learn HTML and such… just saying…

furthermore in my my opinion, you should now be able to send Arduino data from your sensors to a webpage, just what KA04 does; you mentioned your phone? well, try hooking up your phone to your local WIFI; there is your LAN… and so forth…

I understand, this is all a bit too much for a Mechanical Engineer… but am afraid, you will have to learn this, and not be dependeable on third parties…

for what it is worth: you know how to reach me… email = rvonknl@gmail.com… that is the bestway…

regards…and good luck…