jpenny1993 / dsnifi

Example NiFi usage for dswifi library
7 stars 0 forks source link

Nifi doesn't work #1

Closed Fewnity closed 2 years ago

Fewnity commented 2 years ago

Hello! I tried your dsnifi fork (I can't open issue on your fork) and when I'm running your dsnifi project, received values are always x = 0008, y = 0000. I think the dswifi lib is broken or there is another problem. Do we need a specific version of devkitpro to compile the dswifi lib? Thanks!

jpenny1993 commented 2 years ago

Hi, sorry about that, I can almost certainly guarantee that this doesn't work as this library is by no means complete. I started looking into NDS development last year, took on a bit more than I could chew, and haven't come back yet.

As a heads up for what this NiFi library attempts to do is, run the DS in promiscuous mode and accepts data from all WiFi available channels which isn't ideal. devkitpro doesn't support NiFi as it's a proprietary protocol that requires access to official Nintendo documentation or a lot of free time to decypher.

The code in here originated from the below repo and I was working towards removing the gamemaker wrapper. https://github.com/CTurt/dsgmLib

During development I found that the default dswifi library provided by devkitpro was missing some functions. I proceeded to fork the dswifi library from devkitpro and port in the changes with had intentions of releasing a PR back to the devkitpro repo https://github.com/jpenny1993/dswifi

In terms of compilation you should be fine to use any build of devkitpro, and overwrite the dswifi libs with the replacement build.

Best of luck in getting data transfers working. I'm not really in the best position to do development on this atm, if you don't get anywhere please let me know and I'll make the repos private to prevent anyone else falling into the same development pit.

Apologies for misleading you and not binning the repo sooner John

Fewnity commented 2 years ago

Oh thanks for your reply!

And I found the problem in your dsnifi project :)

temporary fix:

You need too add : #define wirelessData (WIFI_Buffer + 32) in main.c and replace (unsigned short)WIFI_Buffer[0 * sizeof(unsigned short)]; by (unsigned short)wirelessData[0 * sizeof(unsigned short)];

Now received values are correct!

jpenny1993 commented 2 years ago

Thanks for the advice, I'll find some time to update it and hopefully get excited about C dev again.

Best of luck with the counterstrike dev, looks pretty ace

Fewnity commented 2 years ago

Thank you! Good luck with your projects too!

Fewnity commented 2 years ago

Hi! I've done some nice improvements to the Nifi demo, you can look here: Fewnity/ Nintendo-DS-Nifi-Template. I tried to fix the limitations of the Library. (Packet loss).