FTP class - problems connecting to Aminet server

Just starting out? Need help? Post your questions and find answers here.
User avatar
micha-b
User
User
Posts: 10
Joined: Wed Mar 29, 2023 8:51 am

FTP class - problems connecting to Aminet server

Post by micha-b »

Image
Hi all,

I'm working on a tool that generates readme files for Aminet (that's a Amiga file directory server farm, to those who don't know) and then loads them up together with a corresponding Archive. My development plattform is PureBasic v6.01 LTS on Windows 10. So far, so good. My connection code (it works with other servers, like "ftp.free.fr") NEVER gets a connection to Aminet - I urgently need your help.

Here's my connection code (stripped down to essentials):

Code: Select all

; ------------------------------------------------------------
;   PureBasic - Aminet Ftp-Connect
; ------------------------------------------------------------
;
server$   = "main.aminet.net"
user$     = "anonymous"
pw$       = "fritz@sitz.com"
ftpdir$   = "new"
port.l    = 21
passive.l = #True
Ftp.l      = 0

If OpenFTP(Ftp, server$, user$, "", passive, port)
  ;--> I suspect NOW Aminet expects the user to send Email Adress as password
  ;--> How to do that?!
  Debug CheckFTPConnection(Ftp)
  Debug "Connection: Success"    
  If SetFTPDirectory(Ftp, ftpdir$)      
    Debug "Success, directory changed"
    Debug GetFTPDirectory(Ftp) 
    If ExamineFTPDirectory(Ftp)
      While NextFTPDirectoryEntry(Ftp)
        Debug FTPDirectoryEntryName(Ftp)
      Wend
    FinishFTPDirectory(Ftp)
    EndIf
  Else
    Debug "Cannot change directory to 'new'."   
  EndIf
Else
  Debug "no connection to Aminet server"
EndIf  
Am I doing something wrong? What could be the failure reasons?

Thanks for any hints!
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: FTP class - problems connecting to Aminet server

Post by HeX0R »

Is that a serious question?

Code: Select all

  ;--> I suspect NOW Aminet expects the user to send Email Adress as password
  ;--> How to do that?!
See help of OpenFTP() => https://www.purebasic.com/documentation ... enftp.html
Just put your pw$ where it belongs to.
User avatar
micha-b
User
User
Posts: 10
Joined: Wed Mar 29, 2023 8:51 am

Re: FTP class - problems connecting to Aminet server

Post by micha-b »

Is that a serious question?

;--> I suspect NOW Aminet expects the user to send Email Adress as password
;--> How to do that?!

Plain text
See help of OpenFTP() => https://www.purebasic.com/documentation ... enftp.html
Just put your pw$ where it belongs to.
yes, that was indeed a serious question. I wouldn't have asked if not since I couldn't explain the connection error in any way. :D

Naturally, I tried both login with and without password, too before - with the same result: No connection.
Turned out that it was a problem with my firewall. It's working with my code, eben if password is empty. Sorry for the waves, fellows. :oops:
Problem is solved.

Image
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: FTP class - problems connecting to Aminet server

Post by HeX0R »

I just asked, because I couldn't imagine that someone only registers here to ask a question, where the answer is pretty clearly explained in the manual.
We are all a little sensitive here, since we had a few new users in the past who where suspected to be (pretty clever) A.I. bots.
User avatar
micha-b
User
User
Posts: 10
Joined: Wed Mar 29, 2023 8:51 am

Re: FTP class - problems connecting to Aminet server

Post by micha-b »

HeX0R wrote: Wed Mar 29, 2023 9:11 pm I just asked, because I couldn't imagine that someone only registers here to ask a question, where the answer is pretty clearly explained in the manual.
We are all a little sensitive here, since we had a few new users in the past who where suspected to be (pretty clever) A.I. bots.
no offend intended, man. :D
I'm indeed relatively new to PureBasic, but not to coding as such. I usually code C and BlitzBasic/AmiBlitz3 on the Amiga and C/C++/Qt5/Qt6 on other plattforms.

I see the point that my question might have sounded silly. As said, I couldn't explain the failure to myself (until I disabled my firewall :lol: ).

I'm no bot and I'm pretty sure that I will have more PB questions in the future. :wink:
Last edited by micha-b on Wed Mar 29, 2023 10:09 pm, edited 1 time in total.
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: FTP class - problems connecting to Aminet server

Post by idle »

welcome to PB, I'm sure you'll enjoy it.
User avatar
micha-b
User
User
Posts: 10
Joined: Wed Mar 29, 2023 8:51 am

Re: FTP class - problems connecting to Aminet server

Post by micha-b »

idle wrote: Wed Mar 29, 2023 10:05 pm welcome to PB, I'm sure you'll enjoy it.
Thanks! :)
Post Reply