Yes, some C# code part is unreachable as I did not include a break from the forever loop.
You could test if user typed "$$exit" etc and then move on to close socket.
Did you disable the 10second timeout in the Wifi Serial Terminal.spin
just insert a ' before the or
until word[@spi_buffer][3] == $1885 or ((cnt - i) => clkfreq*10) '10sec timeout
I will try work on a wifi version that is a drop in replacement for parallax serial terminal,
so people that don't want top dabble in C# can use a terminal program with the use of a tcp-to-com program.
Thanks for responding!
Ah, I'll add a test for a user exit and break out of the while loop. Of course, I need to get past the first response from tcp4 before that will work :-)
Yes, I disabled the 10 second timeout for my tests.
Yes, a WiFi terminal app would be great. Of course, I'm using Mac OS X so something that compiles for Win/Unix/Linux/Mac OS X would be even better :-)
I'll add some debug code into the spin code and keep trying.
what about telnet?
Isn't that a wifi-terminal program?
as far as I know it exists in Windows, Linux and Mac and can emulate different standard terminals like vt-100 etc.
am I missing something?
Yeah, I think the thing is that the app will be more than a terminal and will be customizable for specific communication between the computer and the Prop. I would wrap the terminal aspect in a UI that suited my needs. Was thinking of web-based access to my bot, when I first started playing with the Quick WiFI, so that's there as as well.
On the other hand, it may be better to build a Prop-based controller and use another Quick WiFi. Let the Props communicate!
Yes building a custom gui using C# or Vbasic to interact with the Quick-WiFi is the way to go.
As I don't have a Apple I can not help you there, but the rule is to Ping-Pong Reads and Writes back and forth.
Reads are blocking (for now) so you have to send something and just agree on how to end the conversation.
Add a around a 1/5 second pause in between read/writes in your C# code as to make sure you don't miss anything.
With your code as a sample and some help from: http://www.ibm.com/developerworks/linux/tutorials/l-sock/index.html I put together a server-side example that builds on Mac OS X as well as Linux (well, Raspian on Raspberry Pi). I'm a noob with sockets and needed the tutorial :thumb:
Probably not the best example, but it works for me... With a little more work it should handle multiple clients (right now set to 5, max). It gets a little out of synch with the Prop-side code so I'll update as needed. It just echo's what was sent and allows sending a response.
Sure, I just started selling them.
for a non-QuickStart I recommend the generic breakout version.
I ship worldwide (same shipping cost)
But are you planning to use Texas instruments C library?, I don't know if anyone got that ported/working on a Arduino?
Here is a video of the new 1.05 Spin driver and with tcp5 https://skydrive.live.com/redir?resid=6D7787B33D967B1A!1051
Shows that you type in a 5 digit binary that LED P16-P20 will display, if you want to do something else with this data it's easy.
I need to understand this before I purchase. I am thinking of getting the non QS version. So, I can connect this to my Prop and then my Prop will be viewable via my wireless network??? Is this a correct assumption or am I off base? I have an AEK secured wireless network, will it allow me to connect through this? Will my Propeller then be able to be controlled and or programmed wirelessly? Is there a web app within the device? Like I said, I just need to clarify before I purchase. I will be getting one no matter what just to support your product but I want to make sure I know what I am going to use it for first!!!
>then my Prop will be viewable via my wireless network???
From the Prop side in Spin you tell what SSID and Server (IP local or worldwide) and port number.
What the Server does is something you have to custom create (in C# etc) or you could use a tcp-to-com redirector and type in text by hand.
I will create a winform C# example in free Visual-studio-express that I will put up, as the examples so far are Command window.
Now you will send data (it's raw data but ascii code will also work) in a ping-pong fashion as tcp-read is blocking on both sides you have to take turns sending and agree on how to end.
OBJ
wifi : "Wifi Serial Terminal"
VAR byte MyData
PUB Main
DIRA[16..20]~~ 'LEDs output
wifi.Start(22) 'start cog,pingroup starts at P22
wifi.linkstart 'init (SSID have been saved in nvram as a profile)
wifi.buffsize 'get buffsize.
wifi.event 'declare event flags
wifi.flag(4) 'wait for dhcp flag to be set
wifi.socket(192,168,1,120,3001) 'socket on the pc
repeat until MyData==$FF
wifi.send(string("Ready"))
wifi.read(@MyData)
OUTA[16..20] := MyData 'LEDs on/off
wifi.close_socket(0)
OUTA[16..20]~ 'LEDs all off
repeat
Mine showed up in the mail today. I need to set aside some play time! Is there a link to the driver code someplace? It sure is a nice tiny little package to add WiFi to a Quickstart!
I too would like to see the driver code and the board design, if that is okay with you. Being able to make our own would not only alleviate your order demand, but allow us to have more than one per person. If you are trying to make a business out of this, that is fine and I am more than willing to pay. If that is the case then when will we be able to buy more than one?
Yes soon, I will write a new driver from scratch.( I already made a new driver for msp430 but is for work)
It will allow 4 tcp connections at the same time etc.
Comments
Thanks for responding!
Ah, I'll add a test for a user exit and break out of the while loop. Of course, I need to get past the first response from tcp4 before that will work :-)
Yes, I disabled the 10 second timeout for my tests.
Yes, a WiFi terminal app would be great. Of course, I'm using Mac OS X so something that compiles for Win/Unix/Linux/Mac OS X would be even better :-)
I'll add some debug code into the spin code and keep trying.
dgately
Isn't that a wifi-terminal program?
as far as I know it exists in Windows, Linux and Mac and can emulate different standard terminals like vt-100 etc.
am I missing something?
Enjoy!
Mike
.
Yeah, I think the thing is that the app will be more than a terminal and will be customizable for specific communication between the computer and the Prop. I would wrap the terminal aspect in a UI that suited my needs. Was thinking of web-based access to my bot, when I first started playing with the Quick WiFI, so that's there as as well.
On the other hand, it may be better to build a Prop-based controller and use another Quick WiFi. Let the Props communicate!
dgately
As I don't have a Apple I can not help you there, but the rule is to Ping-Pong Reads and Writes back and forth.
Reads are blocking (for now) so you have to send something and just agree on how to end the conversation.
Add a around a 1/5 second pause in between read/writes in your C# code as to make sure you don't miss anything.
For a tcp to com redirector: (set it in server mode)
http://www.hw-group.com/products/hw_vsp/index_en.html
With your code as a sample and some help from: http://www.ibm.com/developerworks/linux/tutorials/l-sock/index.html I put together a server-side example that builds on Mac OS X as well as Linux (well, Raspian on Raspberry Pi). I'm a noob with sockets and needed the tutorial :thumb:
Probably not the best example, but it works for me... With a little more work it should handle multiple clients (right now set to 5, max). It gets a little out of synch with the Prop-side code so I'll update as needed. It just echo's what was sent and allows sending a response.
echoServer.c.zip
dgately
for a non-QuickStart I recommend the generic breakout version.
I ship worldwide (same shipping cost)
But are you planning to use Texas instruments C library?, I don't know if anyone got that ported/working on a Arduino?
Here is a video of the new 1.05 Spin driver and with tcp5
https://skydrive.live.com/redir?resid=6D7787B33D967B1A!1051
Shows that you type in a 5 digit binary that LED P16-P20 will display, if you want to do something else with this data it's easy.
From the Prop side in Spin you tell what SSID and Server (IP local or worldwide) and port number.
What the Server does is something you have to custom create (in C# etc) or you could use a tcp-to-com redirector and type in text by hand.
I will create a winform C# example in free Visual-studio-express that I will put up, as the examples so far are Command window.
Now you will send data (it's raw data but ascii code will also work) in a ping-pong fashion as tcp-read is blocking on both sides you have to take turns sending and agree on how to end.
I too would like to see the driver code and the board design, if that is okay with you. Being able to make our own would not only alleviate your order demand, but allow us to have more than one per person. If you are trying to make a business out of this, that is fine and I am more than willing to pay. If that is the case then when will we be able to buy more than one?
https://skydrive.live.com/#cid=6D7787B33D967B1A&id=6D7787B33D967B1A%21141
Use this link for 2 units of PropQuickWifi
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EVKJRA3LREPTE
And this link for 2 units of WiFi-Breakout
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LJA7LYLMN5SGY
This product will not be complete open source until 100 units been sold. (80 to go)
It will allow 4 tcp connections at the same time etc.
As there is now an un-official protocol explanation (I no longer have to wonder in the dark)
http://processors.wiki.ti.com/index.php/CC3000_Protocol
I will also release the schematic.