Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - neil

Pages: 1 ... 5 6 [7] 8 9 ... 30
91
utFAT / utReadFile/utWriteFile return code
« on: January 08, 2015, 05:31:22 AM »
Hi Mark,
  if a utReadFile(..) command doesnt return UTFAT_SUCCESS, can I assume that no data was read, and the file position hasnt moved, so another read would continue from the same position within the file? The same with utWriteFile, if it doesnt return UTFAT_SUCCESS , can I assume no data was written and the file position hasnt changed, so another attempt will continue from the same place?

I ask the above, as mentioned in a previous post, there is a possibility that the SD cards internal processor may be busy when a request is made, thus preventing the command to return success.

Best Regards
Neil

92
utFAT / MANAGED_FILES
« on: November 14, 2014, 06:29:32 PM »
Hi Mark,
  I have just upgraded to the latest uFat and noticed MANAGED_FILES isnt defined , but see UTFAT_MANAGED_MODE defined as #10 in the .h file.  Does this mean I havent been using managed mode?

Do I have to #define MANAGED_FILES too?  If so, what is the value after it represent?


What is the difference between MANAGED_FILES/MANAGED_FILE_COUNT  and UTMANAGED_FILE_COUNT ?

Thanks

Neil

93
utFAT / Re: GET_SDCARD_WP_STATE() no prototype
« on: November 14, 2014, 06:11:46 PM »
Thanks Mark

Regards
Neil

94
utFAT / GET_SDCARD_WP_STATE() no prototype
« on: November 14, 2014, 05:55:01 PM »
Hi Mark,
  I have loaded the latest uFAT, and during compiling I get no prototype for  GET_SDCARD_WP_STATE(), what should this be?  I am not using write protect, so do I just do a #define GET_SDCARD_WP_STATE() 0?

Regards
Neil

95
utFAT / Re: returning UTFAT_DISK_READ_ERROR during a write.
« on: July 22, 2014, 02:06:31 PM »
Hi Mark,
  As this happens only occasionally , is it possible that some cards (we buy them off the internet in batches) have a slower read/write times than others? Or do you find all about the same?

Regards
Neil

96
utFAT / Re: returning UTFAT_DISK_READ_ERROR during a write.
« on: July 19, 2014, 08:34:27 PM »
Hi Mark,
  Thanks for the reply.  I downloaded your latest version of ufat, but got some errors building my project. I haven't had time to see what they were, so I reverted back to the version before it.  Anyway, I noticed in your latest version that CommandTimeout = 20000. As the last version it was set to 5000, do you think me setting mines to 20000 is a too large value?

Best Regards
Neil

97
utFAT / Re: returning UTFAT_DISK_READ_ERROR during a write.
« on: July 18, 2014, 04:22:31 PM »
Hi Mark,
  Thanks for the quick reply.

I dont have  MAX_POLL_COUNT   in fnSendSD_command(), and I was sure I had the latest SD card files. The updated entry at the top of mass_storage.c file is: 


    11.09.2013 Reduce sector reads when seeking and correct partial sector read when data is in local {59} utFAT1.13


Regards
Neil

98
utFAT / returning UTFAT_DISK_READ_ERROR during a write.
« on: July 18, 2014, 02:04:32 PM »
Hi Mark,
  I have a few hundred units out in the field and working well, but occasionally I get a UTFAT_DISK_READ_ERROR (-4) error returned from a utWriteFile(..) command.  It doesn't always happen to the same units , but they all have the same firmware. I have one file for collecting data ,with 2 file handles (FileStruct) opened on it, one for writing and the other for reading .  I have set the read to UTFAT_MANAGED_MODE so its always updated on every write. I have looked through my code but cant see any problems, it can run for days, collecting data every minute before it happens.

Regards
Neil

99
µTasker general / Enabling/Disabling Serial port
« on: June 17, 2014, 03:16:30 PM »
Hi Mark,
   Throughout my application I wish to simply switch off/on the RX side of a serial port, but also keep all settings as before (baud rate,handshaking etc..).  Can I simply use the lines:
   fnDriver( SerialPortID,RX_ON, 0 );   
            and
   fnDriver( SerialPortID,RX_OFF, 0 );   

  Regards
   Neil

100
utFAT / UTFAT_MANAGED_MODE
« on: June 12, 2014, 11:54:11 AM »
Hi Mark,
   I have 4 file handles opening the same file, 2 write and 2 read. Do I set the UTFAT_MANAGED_MODE on ALL file handles or just the read?

At present I set only the files open for read to UTFAT_OPEN_FOR_READ | UTFAT_MANAGED_MODE , but want to make sure all file handles will be updated.

Best Regards
Neil

101
µTasker general / Re: cleaning up a socket with no connection
« on: April 21, 2014, 05:29:16 PM »
Hi Mark
  When i only reuse sockets that the state is marked TCP_STATE_CLOSED, all works well. A set of sockets are used every ten seconds, and if the socket cant be reused straight away i simply get the next free one, and within the next ten seconds any ones that werent available are now marked TCP_STATE_CLOSED and are available. Do you see any problems using this method, i cant see me needing any more sockets that are available in the pool.

regards
neil


102
µTasker general / Re: cleaning up a socket with no connection
« on: April 21, 2014, 10:55:54 AM »
Hi Mark,
   I am still having the same issues (after copying over tcp.c). I placed some messages on the screen and debugged the code and this is what is happening.

The first time around TCP_STATE_CLOSED is called and I mark the socket as to be used again (within my own code).  When I try to re-use the socket the TCP_STATE_CLOSED is called again , as within the fnTCP_Connect() function :

    if (!(ptr_TCP->ucTCP_state & (TCP_STATE_RESERVED | TCP_STATE_LISTEN | TCP_STATE_CLOSED))) { // are we in an invalid state?
#ifdef REUSE_TIME_WAIT_SOCKETS
          if (ptr_TCP->ucTCP_state & (TCP_STATE_FIN_WAIT_2 | TCP_STATE_TIME_WAIT)) {
            fnNewTCPState(ptr_TCP, TCP_STATE_CLOSED);
         ptr_TCP->event_listener(ptr_TCP->MySocketNumber, TCP_EVENT_CLOSED, ptr_TCP->ucRemoteIP, ptr_TCP->usRemport); <<<  gets called again.
        }
        else {
            return (SOCKET_STATE_INVALID);
        }

As I mark each socket to be reused within the TCP_STATE_CLOSED, getting called again, simply marks as re-use. I checked the value of ptr_TCP when TCP_STATE_CLOSED was called and when the above was called to make sure the pointer address was the same, and they were.

I assume this is the reason why my code always works when calling fnGetTCP_state(..) before reusing the socket.

 Looking at usOurPort parameter within fnTCP_Connect(..) function, should this be set to 1 if reusing a socket ? I noticed withing the fnTCP_Connect(..) function ,fnGetFreeTCP_Port() gets called if usOurPort=0. I tried setting to 1 , but still no luck.



Regards
Neil



103
µTasker general / Re: cleaning up a socket with no connection
« on: April 20, 2014, 08:34:49 PM »
Hi Mark

Thanks for that, I look forward on getting the password.

I looked at the latest patch SP9 and it says its 1.30 on the zip file header, is this actually 1.40?

regards
Neil

104
µTasker general / Re: cleaning up a socket with no connection
« on: April 20, 2014, 06:52:41 PM »
Hi Mark,
  I noticed the tcp.ip you attached earlier had changes in 2014, does the latest patch have these updates?  I tried downloading the patch, but cant find my password, can you check if it is still valid, if so please email it to my address?

Many Thanks

Best Regards
Neil

105
µTasker general / Re: cleaning up a socket with no connection
« on: April 20, 2014, 09:30:02 AM »
Hi Mark,
  I have an old tcp.c, the last update I have is 29/12/2009 {16}, which doesn't include re-using TCP_STATE_TIME_WAIT. I tried compiling your file , but got lots of errors (which I suspect because of old headers too).   Would it be possible to get a copy of the headers ?

Many Thanks

Regards
Neil

Pages: 1 ... 5 6 [7] 8 9 ... 30