Using WIFI-NINA with FtpServer; no accept()

only
server.available -> ServerDrv::availServer -> availDataTcp -> if (tcpServers[socket])
goes to uint8_t accept = command[6]

all other AVAIL_DATA_TCP_CMD go to other parts of availDataTcp.

ServerDrv::availData is used for UDP and in availDataTcp goes to } else if (socketTypes[socket] == 0x01) {

:+1: I can see that now. Thank you for the explanation.

Hey Juraj. Great work thanks! :slight_smile:
I'm in a very similar situation to d2w and really needing the accept() feature. I make a webserver with websockets support 7 years ago (before accept) and wasted lots of time digging into the old library do made it work at the time. Now i got a nano and was sad to see that accept() wasn't in the nina library also. I'm also a newbie on the whole process of sharing stuff to the official repositories... I see you already submitted code that apparently works and passed all the tests almost 3 months ago, but it's still not a part of the official branch right? What's the process here? Is it still waiting for someone to review/approve it?

I learned to be patient with Arduino repositories.
Do you want to test it?
You can download the modified library from my repository. GitHub - JAndrassy/WiFiNINA at server_accept
There is a corresponding change in the firmware. Let me know if you want the updated firmware binary.

1 Like

Yeah I definitely want to test it! :slight_smile:
The firmware you mention, it's for the NINA module? You mean I need to update that firmware before using your version of the library? If that's the case, yes I guess I will need it. I am quite new to the nano (I literally started using it a few hours before my firsts post on this thread).

here is the firmware as zipped attachment. replace a bin in Arduino IDE installation folder in tools/WiFi101/tool/firmwares/NINA, then

nina-fw.zip (656.7 KB)

Humm I just tried it and I get an error trying to upload the new bin file. I replaced the file NINA_W102.bin in firmwares/NINA/1.3.0 with your file, then tried uploading. The erase and upload part go fine, but then i get a "Error validating flashed firmware" error, and running the "CheckFirmwareVersion again reports that it can't communicate back with the wifi module. Uploading an official version seems to be working well, though.

just to be sure. did you unzip the zip?

Yes, I extracted the file. In the NINA folder i had 2 files, NINA_W102.bin and NINA_W102-Uno_WiFi_Rev2.bin. I renamed NINA_W102.bin to NINA_W102.bin.old, extrated your file there, and renamed it to NINA_W102.bin

I think it is the file I used, but I am not 100% sure so I test it and eventually I build it again later today

sorry, it wasn't a complete image. this one is right.
NINA_W102.zip (695.3 KB)

1 Like

No worries. The last version seems ok. Just tested the AdvancedChatServer with 3 clients and seems to be working fine. :slight_smile: Thank you again for all the help.
I will try and poke around with my webserver soon, but unfortunatellywon't have the time in the next few days...

it can help if you write a comment on the PR in GitHub

Sure I can do that. You mean adding a reply on the 2 pages you liked on Jan 7? Or somewhere else?

here https://github.com/arduino-libraries/WiFiNINA/pull/204
so they know it is useful

Great, already done it! :+1:

you forgot to mention that you tested it and it works :slight_smile:

Yes true... It's fixed now! :slight_smile:

@Juraj

Please have a look at Teensy 4.1 - Adafruit Airlift Featherwing Co-Processor FTP Server not opening Port 21 and guide, if necessary, the process how to update NINA_W102 firmware for Adafruit Airlift Featherwing.

I'm also trying now to add your WiFiNINA PRs added server.accept() #204, WiFi.config - setting defaults as the Ethernet library #219, etc. to my WiFiNINA_Generic Library

Hi Dale, I have been trying to get an FTP server going on a nano 33 Iot as well and had the same problem with trying to get a new client connection going. This works well now with the server.accept, great work of everyone involved! However, my next hurdle is to establish a data connection back to the client. Did you make any progress to get your FTP server going?