Tachyon 5.6 - Easynet: Wrong output fo ifconfig
Prop1Tach
Posts: 7
Hi,
We have build EASYNET in the following way:
1 - Load EEPROM with kernel (TACHYON5r6.SPIN with PropellerTool (6MHZ))
2 - Paste EXTEND.FTH
( SYSTEM REBOOTS WHEN DONE )
3 - FORGET TOOLS (HIT THE ENTER TWICE)
4 - Paste EASYFILE.FTH (&27.24.26.25 SDPINS ( SD8 ))
5 - RECLAIM
6 - Paste EASYNET.FTH (&17.20.19.18 WIZPINS ( P8 ))
7 - Paste FTP.FTH
8 - Paste HTTP.FTH
Afterwards we changed gateway and sip as follows:
&192.168.040.006 GATEWAY
&192.168.040.201 SIP
Then we get the following output from ifconfig:
The position of the run time is wrong. It starts one position to late.
There are no values for TXRD, TXWR, RXRD, RXSZ and IR.
The status is '14 14', but it should be something like '14 LISTEN'.
We have build EASYNET in the following way:
1 - Load EEPROM with kernel (TACHYON5r6.SPIN with PropellerTool (6MHZ))
2 - Paste EXTEND.FTH
( SYSTEM REBOOTS WHEN DONE )
3 - FORGET TOOLS (HIT THE ENTER TWICE)
4 - Paste EASYFILE.FTH (&27.24.26.25 SDPINS ( SD8 ))
5 - RECLAIM
6 - Paste EASYNET.FTH (&17.20.19.18 WIZPINS ( P8 ))
7 - Paste FTP.FTH
8 - Paste HTTP.FTH
Afterwards we changed gateway and sip as follows:
&192.168.040.006 GATEWAY
&192.168.040.201 SIP
Then we get the following output from ifconfig:
ifconfig --> NETWORK STATUS: LINK *UP* HARDWARE: WIZnet W5500 V4 SRC IP &192.168.40.201 MASK &255.255.255.0 GATEWAY &192.168.40.6 MAC 02.FF.C5.24.6C.54. SKT HH:MM:SS MODE PORT DEST TXRD TXWR RXRD RXWR RXSZ IR STATUS IP ADDR #1 02:04:02 TCP 21 0 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0 #3 02:04:02 TCP 10001 0 0000.0000.0000.0000.0000. 00 14 14 &0.0.0.0 #4 02:04:02 TCP 80 60246 0000.0000.0000.0000.0000. 00 14 14 &192.168.40.171 ok
The position of the run time is wrong. It starts one position to late.
There are no values for TXRD, TXWR, RXRD, RXSZ and IR.
The status is '14 14', but it should be something like '14 LISTEN'.
Comments
The reason that the status was not displaying LISTEN is simply because these more handy but verbose messages were removed for taking up code space, however I have restored them for diagnostic purposes. The second 14 in your output was simply printing the value rather than the label and IP.
Maybe not related to your testing but I had performed a RECLAIM on HTTP and FTP modules and inadvertently removed the necessary ?FTP and ?HTTP headers since they were marked private and were reclaimed. I fixed up a couple of other minor things and posted a new binary just for the IoT5500+P8 module. You can download the latest version from the Dropbox V5 binaries folder or just download the attached version I just tested.
The RD/WR values are simply there for diagnostics and due to W5500 quirks and IIRC you can't actually read these registers unless the socket connection is established. Tachyon maintains shadow registers which are updated when it writes to the physical register.
From my source notes:
Here's an FTP output:
and the ifconfig:
... ifconfig -->
and a diagnostic look at the FTP socket registers:
"I get invalid propeller image! this is very bad "
I try the one on dropbox and on you comment.
Building manual works
We have meanwhile changed my comment from yesterday.
Now it is better readable.
I have downloaded the binary of your comment from today.
But I get
Checksum Error!
Byte 5 (Checksum) is incorrect.
when I try to open EASYNET-IOT.binary with the Propeller Tool.
When I download EXTEND.FTH, EASYFILE.FTH, EASYNET.FTH, FTP.FTH and HTTP.FTH
and paste them manually, building works also here.
Changing gateway and sip with
&192.168.040.006 GATEWAY
&192.168.040.201 SIP
I can use telnet in a teraterm window with IP 192.168.040.201 and port 10001.
In that window I can use forth for instance
1 2 + .
But after a while the teraterm window disappears.
I can also use http in a firefox window to read the contents of a file on the sd card.
With
192.168.40.201/EASYFILE.FTH
I get the contents of the that file in firefox.
Although the whole contents is already there,
it is still loading for the file until a timeout is reached.
During that time I can read the next file with
192.168.40.201/EASYNET.FTH
I get the contents of that file,
but every time it is still loading although the contents is already there.
If you use Filezilla for FTP be sure to use site manager to setup the server as plain FTP as quickconnect does not do this.
For simple FTP try typing ftp://<your ip> into your browser and it should list the files and from there you can download any files.
I can also download files from the SD card with simple FTP and Filezilla.
But when I upload a small file (00189513.HTM) with Filezilla,
the file has in the end a size of 67108864 and is not readable any more on the SD card.
It may have to do with the same problem I mentioned yesterday,
that I can use http in a firefox window to read the contents of a file on the sd card.
With
192.168.40.201/EASYFILE.FTH
I get the contents of the that file in firefox.
Although the whole contents is already there,
it is still loading for the file until a timeout is reached.
The 3rd problem, which I also mentioned yesterday, is,
why a telnet session in teraterm (with IP 192.168.040.201 and port 10001) disappears after a while.
Does anyone know, what has to be done to solve one or more of those porblems?
I will check what this timeout is on Firefox. The FTP side looks fine and I can click on a file in the directory listing and it loads up fine.
The telnet session has a timer on it but we can change that easily. You can even just type in "0 contmr TIMEOUT" to prevent this background from timing out and executing a disconnection request.
On the other hand, Filezilla downloads the file and closes correctly.
Uploading a File using Filezilla ends quickly and normally, but shows a 64MB file size. This file can not be accessed on a Windows computer.
The FTP STOR command calls FMAKE$, but I see for some reason I decided to create a 64MB file by default. Not a big deal when you have Gigabytes to work with. Originally I made it 1MB but if you start storing a larger file it then has to allocate clusters which I only like to do with the newly created file to keep all the files unfragmented. So perhaps I may change that default to a user specified default otherwise 1MB, but I will need to check why it zapped the MBR. In fact, on TAQOZ the filesystem can't write to the MBR unless it has special permissions.
"0 contmr TIMEOUT"
the telnet session is not timed out any more.
Today I have downloaded the changed sources from DropBox
and have tested the upload of a file of size 5 KB with filezilla onto the SD card again to find out,
if the situation has changed meanwhile.
Now the uploaded file has a size of 1048576 instead of 67108864 last week.
This is the output of the serial session in a tera term window:
If I try again for some times, then I get the following output: The original file has a size of 5109.
The file is still not readable on a Windows system.
An od -b on a linux system shows:
It seems, that the contents of the original file is not uploaded to the destination file on the SD card.
BTW, Preallocating 1MB is not a waste, it is just practical. Even if we were to create 1,000 files then that would still only take up 1GB on the card and the smallest card I can buy is 16GB. However I will look at some other ways of doing this by creating new files at the end of the used memory and letting them grow while STOR is saving to it.