Discussion Topic |
|
This thread has been locked |
Messages 1 - 16 of total 16 in this topic |
Ed Hartouni
Trad climber
Livermore, CA
|
|
Topic Author's Original Post - Oct 18, 2009 - 05:16pm PT
|
I have a little project going on which I need to access a USB - serial device... I've got the driver and it seems to at least find the device...
...anyone got an example of Mac OS X code (10.5) I'm mostly a C conversant programmer but I can fake FORTRAN in any language... I guess I could do objective C if forced to...
Failing a code example, anyone point to a good reference for post 10.4 programming on the Mac? I'm trying to avoid Cocoa but it seems that Carbon is becoming obsolete...
|
|
scottpedition
climber
|
|
Oct 18, 2009 - 05:36pm PT
|
See the source for gpsbabel. If I recall correctly, it uses libusb on Mac OS X and there's pretty straightforward code for talking to a variety of GPS devices through USB serial adapters (see the mac subdirectory of the source tarball). Haven't looked at it since trying to get Garmin working over USB several years ago, but it should be a good starting point.
Scott
|
|
Jan
Mountain climber
Okinawa, Japan
|
|
Oct 18, 2009 - 07:25pm PT
|
I thought people owned Mac so they didn't have to mess with code. Whatever happened to plug and play?
|
|
stevep
Boulder climber
Salt Lake, UT
|
|
Oct 18, 2009 - 07:30pm PT
|
Plug and pray is Windows.
And as bad as Windows compatibility is, Apple is much worse.
|
|
Jaybro
Social climber
Wolf City, Wyoming
|
|
Oct 18, 2009 - 07:30pm PT
|
Dr Ed is way beyond that...
|
|
TradIsGood
Chalkless climber
the Gunks end of the country
|
|
Oct 18, 2009 - 09:41pm PT
|
Seems like you would need an API of some sort to read from / write to it unless the API basically mapped it as a file system so that you could use finder and regular i/o.
You could try bringing up terminal and see if it is a device known to bash.
|
|
WBraun
climber
|
|
Oct 18, 2009 - 10:04pm PT
|
Ed
Do you need a com port emulator or terminal software where you can change port and flow settings for Mac Os x?
Or are you looking for code only? What is your usb hardware chip?
Check out Jan Axelson's site. The serial & usb guru.
http://www.lvr.com/usbchips.htm
What exactly do you need to do?
|
|
Ed Hartouni
Trad climber
Livermore, CA
|
|
Topic Author's Reply - Oct 18, 2009 - 10:41pm PT
|
just trying to write a bit of code to read out a GPS logger that doesn't have a Mac software interface...
I have a driver that seems to connect...
...what would be nice is to have an application to much around in the USB serial interface to examine registers and such... via the device driver
thanks so far, helpful links and comments
|
|
Shack
Big Wall climber
Reno NV
|
|
Oct 18, 2009 - 10:44pm PT
|
Ed
Check this page out...
http://developer.apple.com/sdk/
7th from the bottom you'll find this link:
Mac OS X USB Software Development Kit (SDK) 1.8.7 (DMG)
This SDK provides everything you need to get started writing USB kernel extensions, and accessing USB User Clients from User Space. The SDK includes sample code and documentation.
an below that is:
Universal Serial Bus (USB) DDK (DMG)
Info on writing Mac OS USB device drivers
hope it helps
|
|
Ed Hartouni
Trad climber
Livermore, CA
|
|
Topic Author's Reply - Oct 19, 2009 - 12:58am PT
|
Shack, I have downloaded the entire Developers SDK for 10.5, which is cool and includes the IOKit stuff...
also found
/Developer/Applications/Utilities/USB\ Prober
which does some of the things I want to do... cool
Werner, got the gpsbable code and also the app which ran but didn't know what to do with my particular device... but also found the spec sheet for the USBserial interface, and the chip set description from the same company on their GPS device... so I'm guessing the OEM put the stuff together and sold it as a device...
It wasn't a lot, and if I can't figure it out I'll either return it or sell it to one of you Windows people... for a reduced price...
|
|
WBraun
climber
|
|
Oct 19, 2009 - 01:12am PT
|
Ed believe it or not I've been working on the com1 serial port on and off for 3 days now in redboot and firmware on an embedded board.
I'm ready to jump off El Cap with no parachute now.
Blah .....
|
|
Ed Hartouni
Trad climber
Livermore, CA
|
|
Topic Author's Reply - Oct 19, 2009 - 01:53am PT
|
let's do it together, jump that is
|
|
monolith
climber
Berkeley, CA
|
|
Oct 19, 2009 - 02:01am PT
|
Ed, if your device shows up in the /dev directory, then you can probably use freads and fwrites for I/O.
|
|
Jaybro
Social climber
Wolf City, Wyoming
|
|
Oct 19, 2009 - 02:04am PT
|
Ed, Werner and Don Juan?
|
|
Jan
Mountain climber
Okinawa, Japan
|
|
Oct 19, 2009 - 02:13am PT
|
Don't you guys dare jump! We need you around here.
|
|
Messages 1 - 16 of total 16 in this topic |
|
SuperTopo on the Web
|