gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > NDS wifi examples?

#123015 - firegun9 - Sat Mar 24, 2007 3:47 pm

Hello,

I am a newbie here, and I am planning to develop an email software on my nds. I just installed devKitPro. I found two ds wifi library there without examples. Can somebody tell me where to find a wifi tutorial or example?

#123017 - qw3rty - Sat Mar 24, 2007 4:27 pm

Search for the wifi-lib 0.3a-examples.
That's the newest I know of.

There were some changes since 0.3a, but it's nothing severe.
Basically you have to exchange "close" with "closesocket", and adapt the arm7.c for the new ndslib (curtime changed)

#123095 - knight0fdragon - Sun Mar 25, 2007 2:46 am

I believe there is a 0.3d out actually, check out the devkitpro CVS on sourceforge

http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=199021&release_id=482368
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#123120 - qw3rty - Sun Mar 25, 2007 7:47 am

Yes, there is !

But the newest examples are from 0.3a

#123178 - firegun9 - Sun Mar 25, 2007 10:30 pm

Thanks guys,
I found the 0.3a example.

#123262 - Yooser Naim - Mon Mar 26, 2007 7:41 pm

I'm just starting to work with the wifilib as well, and I'm having trouble making the changes to wifi_example1(0.3a) in order to get it to work with the 0.3d release. I knew about the close - closesocket change, but can't figure out what changes to make involving the curtime change. Could somebody go into a little more detail on this?

#123335 - qw3rty - Tue Mar 27, 2007 9:56 am

Either remove everything related with curtime, or rename it to the proper name.

basically all time-variables have a time. in front now

(e.g. IPC->curtime is now IPC->time.curtime)

P.S. : or even better : use the arm7-main of the combined example, and add the wifi-code to that file (no idea if maybe something else changed ?!)

#123372 - Yooser Naim - Tue Mar 27, 2007 7:10 pm

Thanks, qw3rty, that gets me closer. I'd like to see this wifi example maintained somewhat, and I wouldn't know how to rearrange things between the arm7 and arm9, so I just changed the curtime references to time.curtime. It doesn't fix everything, just as you had suggested, cause I get another error in the arm7 code when compiling:

$ make
make -C arm7
make[1]: Entering directory `/c/wifi_example1/arm7'
template.c
arm-eabi-gcc -MMD -MP -MF /c/wifi_example1/arm7/build/template.d -g -Wall -O2 -m
cpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork
-I/c/wifi_example1/arm7/include -I/c/wifi_example1/arm7/build -I/c/devkitPro/lib
nds/include -I/c/wifi_example1/arm7/build -DARM7 -c /c/wifi_example1/arm7/source
/template.c -o template.o
c:/wifi_example1/arm7/source/template.c: In function 'VblankHandler':
c:/wifi_example1/arm7/source/template.c:87: error: 'TransferRegion' has no membe
r named 'heartbeat'
make[2]: *** [template.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/wifi_example1/arm7'
make: *** [arm7/wifi_example1.elf] Error 2

So, I just deleted line 87 with the heartbeat update on it. Not sure what that would do, but here are the errors that occurred on the next compile:

$ make
make -C arm7
make[1]: Entering directory `/c/wifi_example1/arm7'
template.c
arm-eabi-gcc -MMD -MP -MF /c/wifi_example1/arm7/build/template.d -g -Wall -O2 -m
cpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork
-I/c/wifi_example1/arm7/include -I/c/wifi_example1/arm7/build -I/c/devkitPro/lib
nds/include -I/c/wifi_example1/arm7/build -DARM7 -c /c/wifi_example1/arm7/source
/template.c -o template.o
linking wifi_example1.arm7.elf
built ... wifi_example1.arm7
make[1]: Leaving directory `/c/wifi_example1/arm7'
make -C arm9
make[1]: Entering directory `/c/wifi_example1/arm9'
linking wifi_example1.arm9.elf
c:/devkitPro/libnds/lib\libdswifi9.a(wifi_arm9.o): In function `Wifi_Init':
e:/projects/devkitPro/dswifi/arm9/source/wifi_arm9.c:775: undefined reference to
`DC_FlushAll'
collect2: ld returned 1 exit status
make[2]: *** [/c/wifi_example1/arm9/wifi_example1.arm9.elf] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/c/wifi_example1/arm9'
make: *** [arm9/wifi_example1.elf] Error 2

Did I create this myself, or is this example simply riddled with out of date code? I'd really like to have a basic, working wifi example to work with as I try to figure these libraries out. If this example can be fixed easily, I'd like to be able to do that. But, if there is an even simpler, more fundamental example that gets the DS up and running with sockets using the current libnds, I'd be very happy if someone could point me to it. Either way would be of great help.

Thanks again, qw3rty.

#123373 - wintermute - Tue Mar 27, 2007 7:13 pm

http://www.devkitpro.org/files/wifi_lib_test.zip

Sorry it's not more obvious - I'm trying to get together a kind of standard wifi arm7 core so I can sort out some examples that don't need a custom arm7
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#123390 - Yooser Naim - Tue Mar 27, 2007 9:35 pm

I'd like to see that when its done. Will it be part of a new examples package for devkitarm? If not, where should I look for it?

Anyway, you do great work wintermute.

#123401 - Lick - Tue Mar 27, 2007 10:26 pm

Here is my WiFi basecode (click) that you can examine. It works with dswifi0.3d and r20.
Note that the HTTP part doesn't get the whole webpage.
_________________
http://licklick.wordpress.com

#123552 - Yooser Naim - Thu Mar 29, 2007 1:17 am

Awesome, lick. This looks good. I'll have to try it out when I have a chance. Thanks.