• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Serial comm in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serial comm in Cocoa?


  • Subject: Re: Serial comm in Cocoa?
  • From: Oftenwrong Soong <email@hidden>
  • Date: Thu, 15 Oct 2009 18:06:43 -0700 (PDT)

Thanks Louis... I'm studying the code right now.

-Soong



----- Original Message ----
From: Louis Demers <email@hidden>
To: Oftenwrong Soong <email@hidden>
Sent: Thu, October 15, 2009 5:58:02 PM
Subject: Re: Serial comm in Cocoa?

I use 2 C routines I found on the net and adapted.

Here is some code I use, quickly ripped out of one of my app, i.e. not re-tested.








On 15-Oct-09, at 20:12 , Oftenwrong Soong wrote:

> Hi All,
>
> What is the Cocoa-fied way to communicate via a serial port?
>
> Using a kext to support the Prolific PL2303 chip and a shell utility like cu, it is possible to communicate via many USB-based serial ports. (For those who need it, the kext is at sourceforge.net/projects/osx-pl2303.) I am writing a Cocoa app that needs to communicate interactively with a device using an in-house message protocol, as opposed to just sending a file across a link. (If it were the latter case, I would just spawn a process using NSTask and send the file across.)
>
> I have written such an app under Windows before. In the .NET framework, there is a class SerialPort that makes it easy. You can do everything, including set the baud rate, parity, data bits, stop bits, etc.
>
> I hope there is something similar in Cocoa (but I couldn't find it).
>
> Thanks all,
> Soong
>
> ps, Since I mentioned the kext, I'd like to point out that if you use VMware Fusion, it is my experience that while this kext is loaded, a virtual machine cannot connect to the serial port. In this case, I unload the kext using kextunload, and then it works fine. There was a discussion about this at http://communities.vmware.com/message/1073355.
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

Louis Demers eng.
www.obzerv.com



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Serial comm in Cocoa? (From: Oftenwrong Soong <email@hidden>)

  • Prev by Date: Re: Programming Style: Method Definition with or without a semicolon.
  • Next by Date: Re: Programming Style: Method Definition with or without a semicolon.
  • Previous by thread: Re: Serial comm in Cocoa?
  • Next by thread: Re: Serial comm in Cocoa?
  • Index(es):
    • Date
    • Thread