Prop-SD-server and Prop-SD-client
msrobots
Posts: 3,709
One of KYE's examples used 2 objects to acsess 2 files. So this was born.
It is an offspin of another project i am working on. It started as proof of concept but runs stable and nice.
What do you need ? OK:
sd-server is SIMPLE.
1 Prop-board, sd, 8 free pins, 7 free cogs. - well the server does nothing else anymore. just connects 4 clients.
sd-client needs 1-prop-board, 2 free pins 1 cog and 600 longs you can connect 4 clients to one server.
What do you get ?
all sd-clients share sd-filesystem (KYE's SD-Driver). The server does also provide a shared HUB-ram area for the clients.
each client can have 3 files open at the same time. Full directory support on FAT32 all goodys of KYEs Driver.
communication between clients and server use JDCogSerial so speeds over 345600 baud are possible between props
sdServerDemo.zip
sdClientDemo.zip
sdclientCMDtools.zip
sd-server-demo is server - sd on 0-3 clients on 4/5 6/7 8/9 30/31 - no GUI - server has none
sd-client-demo is client - run up to 4 at the same time ... 2 pins to server - PST menu with client-tests on 30/31
sdclientCMDtools are 3 executable for windows and c-source.
lsdirsd.exe <port> <baud> <sdpath> lists files in sdpath
copytosd <port> <baud> <localpathfile> <sdpathfile> copys file from local filesystem to prop-SD-server
copyfromsd <port> <baud> <sdpathfile> <localpathfile> copys file from prop-SD-server to local filesystem
i still work on documentation but by now everything works nice.
enjoy !
Mike
It is an offspin of another project i am working on. It started as proof of concept but runs stable and nice.
What do you need ? OK:
sd-server is SIMPLE.
1 Prop-board, sd, 8 free pins, 7 free cogs. - well the server does nothing else anymore. just connects 4 clients.
sd-client needs 1-prop-board, 2 free pins 1 cog and 600 longs you can connect 4 clients to one server.
What do you get ?
all sd-clients share sd-filesystem (KYE's SD-Driver). The server does also provide a shared HUB-ram area for the clients.
each client can have 3 files open at the same time. Full directory support on FAT32 all goodys of KYEs Driver.
communication between clients and server use JDCogSerial so speeds over 345600 baud are possible between props
sdServerDemo.zip
sdClientDemo.zip
sdclientCMDtools.zip
sd-server-demo is server - sd on 0-3 clients on 4/5 6/7 8/9 30/31 - no GUI - server has none
sd-client-demo is client - run up to 4 at the same time ... 2 pins to server - PST menu with client-tests on 30/31
sdclientCMDtools are 3 executable for windows and c-source.
lsdirsd.exe <port> <baud> <sdpath> lists files in sdpath
copytosd <port> <baud> <localpathfile> <sdpathfile> copys file from local filesystem to prop-SD-server
copyfromsd <port> <baud> <sdpathfile> <localpathfile> copys file from prop-SD-server to local filesystem
i still work on documentation but by now everything works nice.
enjoy !
Mike
Comments
Any help there appriciated ... So:
Prop-SD-server runs 12 sd-driver from KYE. so full FAT32 support (I have a 8 gb card running).
1 cog sd-driver, 2 cogs sd-server.
each client-port uses one cog for JDCogSerial. each port can have its own baudrate
Still 2.600 LONGs free for common shared HUB-ram on the server.
Prop-SD-client is a simple FS-object. All clients share the same FileSystem on the server
needs 1 cog for JDCogSerial and offers standard file-access for up to 3 open files at the same time.
open read/write/append ... read file, bytes ... write file bytes (any buffersize...)
and read and write access to common shared HUBram on Prop-SD-server
sdclient.spin needs just 600 long. sd-client uses LOCKS so you can access one sd-client concurrently in more than one spin-cog, if needed.
PC-client-tools
hm. there is still one issue but they basically work. commandlinetools for windows/linux/mac?
copytosd
copyfromsd
lsdirsd
are working if you use a prop-plug and do not connect reset.
so you can for example connect 3 propeller-clients and one pc-client to one prop-sd-server and all have access to the sd-card.
For File-Locking support we need to talk to KYE ...
Mike
I updated the first Post so all files are together ...
enjoy!
Mike
I have just tried your SD card server, as I think it would be a perfect fit for a project I have been struggling with. All I want to do at this stage is send a text fie from my win7 machine to the prop.I am not sure what I am doing wrong and am hoping you can shed some light please.
I have your "Server" code loaded onto my prop board with my sd card on 0 - 3 I have commented the three unused ports from your example, as below. leaving just the 4th port - my pc on 31 and 30.
'SDS.AddPort(_RxPinMask1,_TxPinMask1,_Baudrate1) ' up to 4 Ports
'SDS.AddPort(_RxPinMask2,_TxPinMask2,_Baudrate2) ' uses JDcogSerial
'SDS.AddPort(_RxPinMask3,_TxPinMask3,_Baudrate3) ' one cog each
On my pc end I am running this command line - I am assuming I have a syntax error here, but not sure.
copytosd 3 115200 test1234.txt testcode.txt
Thanks for your help
Andrew
the portnumber of the commandline is the number of your comport aka 1 for com1: 14 for com14:
hope this helps
Mike
Thanks for that, I am using 3 for Com3.
Once I type in my copytosd 3 115200 test.txt test2.txt command, the command just hangs - nothing appears to happen.
If I type a lsdirsd 3 115200 I get a message pop up saying that lsdirsd.exe has stopped working.
Andrew
I have it working now - I had my rx and tx pin numbers around the wrong way.
Thanks heaps for your help.
Andrew
JDCogSerail claims 345600 but that works just Prop to Prop ...
In Linux (withot reset connected) dito max bitrate 230400.
But I still fight to move one of my spin-cogs to pasm ... not working yet but I hope the server wil be even faster then
enjoy!
Mike
FYI Beau has written a much faster (but uses 1 cog per connection) serial transfer routine between cogs. Keep this in mind for later, as it may be possible to crank your transfer speed up here.
I am working on a prop os using kyes driver as the basis. However, the sd driver by lonesock and others is faster. So later I propose to replace the pasm section with lonesocks pasm driver. It is not quite that simple as they provide different calling routines. This will likely speed up the sd card too.
Then of course there is overclocking. I use 6.5MHz (104MHz) on my pcb designs.
Keep up the excellent work!
I looked at Beau's HIspeed-driver, but was not able to get it running. (3-pin servo-cable for hi-speed-serial and 4 HB25 + 4 Motors around them seem to have problems with noise).
I do know fsrw but - do you have a link to what @Lonesock did ? By now it lookes like that the sd-card is slower than my sd-server/clients.
I looked at SPINX but all this needs to much cogs. but i would love to have access from pasm to some filesystem.
By now just that part is still spin.
I do have now 4 serial driver fro JDCogserial as connection to clients. just pasm and buffer inside of the cog so just 2 longs as interface in the hub. - that makes 4 cogs.
one (haha now PASM not SPIN) cog transfers data between the 4 serial-cogs and sd-cmd-buffers. and does the HUB-Get and HUB-Put.
one (in Spin) runs the cmds- on KYEs sd-driver.
and one (in PASM) is used BY KYEs sd-driver - that leaves one cog free ...
enjoy!
Mike