Tying serial ports together
hinv
Posts: 1,255
Hi
I am trying to tie in a 3.3v serial port to the console so that everything that comes in the serial port goes up to the serial console(usb on propdongle) and visa versa.
Right now, I have a main loop that looks like:
The problem is I don't get a character one way without getting a character the other way because usbser.rx waits for a character.
I am sure somebody has done this before. Any hints?
Thanks,
Doug
I am trying to tie in a 3.3v serial port to the console so that everything that comes in the serial port goes up to the serial console(usb on propdongle) and visa versa.
Right now, I have a main loop that looks like:
repeat wireser.tx(usbser.rx) usbser.tx(wireser.rx)
The problem is I don't get a character one way without getting a character the other way because usbser.rx waits for a character.
I am sure somebody has done this before. Any hints?
Thanks,
Doug
Comments
It's been a while since I've done communication code, but I *think* the above
should work without stopping and waiting..
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I used
If I didn't use the later repeat, it dropped a lot more characters coming back from the router I am connecting to. It still drops way too much, but it is a little better with the repeat in there. If I knew how, I would set the serial port on the router (wgt634u running openwgt) to something a little slower, and hopefully fix the dropped character problem. I will also try upping the buffer size to 256 characters instead of 64 to see if that helps. BTW, thanks to whoever modified BB_FullDuplexSerial as I get to make this change.
It could be my terminal also as I am using propTerminal in "Normal-Terminal Mode", and hyperterm is not available. Next I will try on a real os ie Linux where I have tools to work with(except on the prop side)
because 0 is a valid value that can be sent
Jimmy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
With your example would I be using 5 cogs?
Thanks,
Doug