| Author |
Message |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
 Serial Bridge vs Serialport X
Just got in a boat load of Xbee modules and eager to play!
Serialport X is nice that it is a native Intel. But there isn't too many options/commands.
What I' like it to 'pull in' a line at a time (once the ASCII 10 and/or 13 as the EOL char or some other ASCII char) then deal with it. The read x# of chars can be a bugger on a random length packet with others packets right behind it.
(yeah I know, standard packets, but not everything in life will fit nicely into a square box)
|
| Mon Jun 08, 2009 5:20 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11683 Location: Texas
|
 Re: Serial Bridge vs Serialport X
Serial Bridge let's you read individual bytes, N bytes, or all bytes. It doesn't have a built-in EOL parser though, so in this case you would probably want to loop reading individual bytes comparing the byte to the EOL character. Untested pseudo code like this:
- Code: Select all
set incomingLine to "" while True: set incomingByte to read byte from source ABC if incomingByte is EOL character then process incomingLine here set incomingLine to "" else set incomingLine to incomingLine & incomingByte end if end while
_________________
|
| Tue Jun 09, 2009 9:33 am |
|
 |
|
CharlieParker
Joined: Apr 10, 2006 Posts: 236 Location: Lower Hudson Valley
|
FYI, I tested SerialPortX but found it unusable because of a memory leak.
It's now been confirmed that OS 10.6 won't run on PPC hardware. Anyone heard for sure if emulation will be gone?
|
| Wed Jun 10, 2009 7:28 am |
|
 |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
CharlieParker wrote:FYI, I tested SerialPortX but found it unusable because of a memory leak.
It's now been confirmed that OS 10.6 won't run on PPC hardware. Anyone heard for sure if emulation will be gone?
Hey Charlie, where did yo see the memory leak? I'm looking under Activity Monitor at Script Editor. (didn't see anything for serialport x)
|
| Fri Jun 12, 2009 2:49 pm |
|
 |
|
CharlieParker
Joined: Apr 10, 2006 Posts: 236 Location: Lower Hudson Valley
|
IIRC, Script Editor was using over 1 GB of memory after about 12 hours of calling serialport bytes available and serialport read once per second. It may not be an issue for you.
|
| Sat Jun 13, 2009 10:20 am |
|
 |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
Just reg'd Serial Bridge.
When I run a script in/from the script editor, it locks the script editor. ie: I can't stop the running script, edit or create a new script, etc. I need to go offline then I get everything back. If I make it an app over a script, will that stop this?
Can a port automatically be started?
|
| Mon Oct 19, 2009 3:42 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11683 Location: Texas
|
anode wrote:When I run a script in/from the script editor, it locks the script editor. ie: I can't stop the running script, edit or create a new script, etc. I need to go offline then I get everything back. If I make it an app over a script, will that stop this?
Inside the main connection dialog/window where you select the port, set the baud rate, etc, you can edit the AppleScript used. Once you make an edit and compile, do not run it from the Script Editor. Instead, save it and switch back to Serial Bridge and press the Reload Script button. That will reload and relaunch the script as a separate process which Serial Bridge owns (and will quit when SB is terminated). That script will also automatically be launched when SB is launched.
_________________
|
| Tue Oct 20, 2009 7:08 am |
|
 |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
I have a conflict of some sorts.
I had moved a script over to Serial Bridge from Serial Port X (seems to run more reliable with hangs)
Everything was fine until I got a Mimo USB touchscreen display. (figured I'd use it as a kisok)
With Serial Bridge, on first reboot after touch drivers installed, it all worked for about 20 minutes or so. After that, the touchscreen stopped responding.
After a couple reboots, Serial Bridge won't run. It shows in the dock, but has the app not responding message.
First thing I figured was the USB-Serial driver conflicting with the touchscreen driver. But For grins, I went back to the Serial Port X script and thats working.
|
| Wed Oct 28, 2009 6:05 pm |
|
 |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11683 Location: Texas
|
Describe how far visually into the launch process Serial Bridge gets.
Also try this:
1) Force quit Serial Bridge (if it is running or hung).
2) Delete this file:
- Code: Select all
/Library/Preferences/Serial Bridge Prefs.sbPref
3) Restart your Mac.
4) Run Serial Bridge.
Does it hang?
_________________
|
| Thu Oct 29, 2009 8:40 am |
|
 |
|
anode
Joined: May 27, 2007 Posts: 689 Location: NC
|
Sorry Matt, I may have jumped the gun. (must be the getting old/impatience aspect of life. I used to be able to go days struggling before asking for help)
The little utility (for the touch screen driver) will/can hang the touchscreen driver. That in turn *might* hang serial bridge. (I think the tinkering caused the probs)
But as of 6:30 PM Thu, its all been working with serial bridge from about 10:00pm last night.
But so far, all is OK, but have that uneasy feeling.
(maybe its a boot order issue? One driver/app before another? just thinking out loud; seen that before on the PC/dark side)
edit: Oh for the visual aspect, just the bouncing dock icon, but don't sweat anything yet. I'll get more detailed info for next round, if theres one.
support wrote:Describe how far visually into the launch process Serial Bridge gets. Also try this: 1) Force quit Serial Bridge (if it is running or hung). 2) Delete this file: - Code: Select all
/Library/Preferences/Serial Bridge Prefs.sbPref
3) Restart your Mac. 4) Run Serial Bridge. Does it hang?
|
| Thu Oct 29, 2009 4:29 pm |
|
|