asynclabs / WiShield

WiShield library for the Arduino development platform
asynclabs.com
98 stars 46 forks source link

wep_keys must be const #4

Open tnorth opened 12 years ago

tnorth commented 12 years ago

I tried to compile the SimpleServer example for an Ardunio Uno, with the Copperhead wifi shield. I get this error:

avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/ZG2100BasedWiFiShield /tmp/build8344589035392899805.tmp/SimpleServer.cpp -o/tmp/build8344589035392899805.tmp/SimpleServer.cpp.o SimpleServer.cpp:28:50: error: variable 'wep_keys' must be const in order to be put into read-only section by means of 'attribute((progmem))'

Looks like adding const in config.h:51 fixes the problem.

However, it doesn't seems that the wireless is working, and there is no output on the serial port event though the verbose mode is set. Any hint ?

Config: COLLECT_GCC=/usr/bin/avr-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/4.6.2/lto-wrapper Target: avr Configured with: ../gcc-4.6.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs --with-pkgversion='Fedora 4.6.2-1.fc16' --with-bugurl=https://bugzilla.redhat.com/ Thread model: single gcc version 4.6.2 (Fedora 4.6.2-1.fc16)

tnorth commented 12 years ago

Ok my bad, it was just unable to connect my laptop configured as AP. Woks with a D-LINK DI-624.

wam090 commented 11 years ago

hello @tnorth im facing trouble with the my WIFI shield although im just trying the hello world example, and the red light is not turning on, is it because of my router settings , i tried making it an Access point and a normal router both cases the shield didnt work, or is there a specific kind of router i should get. or im missing anything out.. help please MY Router : "TP-LINK" "TL-WR702N" nano router

tnorth commented 11 years ago

Hi wam090, It looks like some people have trouble with some kinds of routers. Perhaps yours belong to those?

Are you using the provided example "SimpleServer.pde" ? Try to have it configured in normal mode, with WPA2 (security_type = 3). The shield connects with a static IP address, so make sure that your router allows that. For example, you could try to connect your laptop with the same static configuration, and see if that works first. Use the infrastructure mode (WIRELESS_MODE_INFRA), and don't forget to match the router's SSID by setting the ssid[] string. But have probably already done that :) Good luck!

wam090 commented 11 years ago

Well i tried everything till now , I even assigned to it an IP upon its MAC address but , nothing still not connecting, it worked once and never again, although im doing the same steps.

Thanks

tnorth commented 11 years ago

Hmm hard to help here. Have you tried with an open network ?