FlexBASIC mount "/host", _vfs_open_Host()
Rsadeika
Posts: 3,837
in Propeller 2
Not sure if this can be expanded to run some commands on the "host" system.
In particular, since I am using the FlexBASIC clock program, it would be nice to somehow be able to have an auto update of the time/date part of the clock program, with a new start up of a program. This would come in very handy for people that are running FlexProp on Linux/Raspberry Pi systems.
Once FlexProp has the WiFi part working for the P2, I wonder if the mount "host" could be used for any system that is available on your LAN. And of course maybe get a time/date update via the WiFi, for the stand alone P2 setups.
Ray
Comments
WiFi should work fine for the P2. Getting the date/time from a time server is easy enough done with the WiFi module.
Writing the code in BASIC should not be to difficult.
Mike
I just installed the latest FlexProp, and did the Ports in FlexGUI, still not showing the IP for the attached WiFi module. So, I am not sure how, within a FlexBASIC program, you could have access to the WiFi module. I guess I need some specific instructions for doing that.
Ray
So what you want to do is load programs from FlexProp to the P2 using the WiFi module.
That function is not there yet. A loader program is needed for that to work.
The other functions such as get the time from a time server using the WiFi module are there.
If you would like I can build you a C# program that will find your WiFi module and send the code to it.
Mike
The file server is only that, a file server. It cannot run any commands on the remote system, and I have no plans to add that feature -- for one thing it would have to be platform specific, the commands would be different on Mac, Linux, and Windows.
If you want to have some kind of way to read the date/time, write the date and time into a file on the PC side, then read that file from the P2. You could automate that with a batch file.
As for WiFi support, I would be happy to accept patches to loadp2 to add that feature. I don't have WiFi hardware for my P2 so I can't test this myself.