[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Newbie help with simple C program, USB device under Debian



Oleg Verych wrote:
27-09-2007, Nick Lidakis:
Sending this again as it did not seem to get to the list when I first sent it this morning.

Oh, man, are you serious?

First. No one interested in you prev. email sending failures, right.
Because this is a noise, not information.
No one /is /interested in your /previous /email sending failures, right.

I just thought I would fix that for you since you seem to be a graduate of the Sum Dum Dik school of English.

I'm truly sorry. That was a bit harsh. Perhaps some mothers can not afford a proper tutor of English Perhaps she was working long hours for low wage, doing her best I am sure, at some Czechoslovakian sailor wanna hump-hump bar?

No worries. You are forgiven.


I am need of some help with a USB device under Debian; trying last night
multiple times to no avail.

Second. Debian is a software distribution. What system are using is
possible to see, after `uname -a`:

#v+
olecom@flower:/tmp$ uname -a
Linux flower 2.6.18-4-amd64 #1 SMP Fri May 4 00:37:33 UTC 2007 x86_64 GNU/Linux
olecom@flower:/tmp$
#v-

See Linux? That means, that a guy, talking to your hardware is Linux, not
Hurd or FreeBSD, alright.
You think I would take advice from someone who named their Debian box /flower/? Pffft...

I have a Dallas Semiconductor Thermochron temperature data logger that I
am trying to set. The data logger (DS1921G-F5) is attached to a USB
bridge (DS1921G-F5). I downloaded their linux utilities which consist of
two simple C programs: One to set a "mission"  and the other to download
the datat logged:

thermo21.c  thermo21.h  thermodl.c  thermoms.c

The readme states:

Stop. If this info is available on-line, please give an URL. If this is
closed NDA stuff, and you are newbie driver programmer, then you'd better
I said it was a readme that was enclosed with the simple C programs enclosed.

And your sentence should have been /a URL.

/ Here's a little guide for you sweet cheeks:


       "Remember, using a or an depends on the sound that begins the
       next word. So...

   * a + singular noun beginning with a consonant: /a boy; a car; a
     bike; a zoo; a dog/
   * an + singular noun beginning with a vowel: /an elephant; an egg;
     an apple; an idiot; an orphan/
   * a + singular noun beginning with a consonant sound: a user (sounds
     like 'yoo-zer,' i.e. begins with a consonant 'y' sound, so 'a' is
     used); a university; a unicycle

If the noun is modified by an adjective, the choice between a and an depends on the initial sound of the adjective that immediately follows the article:

   * a broken egg
   * an unusual problem
   * a European country (sounds like 'yer-o-pi-an,' i.e. begins with
     consonant 'y' sound)"





keep it away. :)
I'll just keep you away?

/These utilities are used to download (thermodl) and
mission (thermoms) a DS1921G Thermochron iButton.  The
DS1921Z/DS1921H are not supported with this application.

THERMODL:

usage: thermodl 1wire_net_name <output_filename> </Fahrenheit>
  - Thermochron download on the 1-Wire Net port
  - 1-wire_net_port required port name
    example: "COM1" (Win32 DS2480B),"/dev/cua0"
    (Linux DS2480B),"1" (Win32 TMEX)

Seem, like very old doc. I've just prepared a snip from current doc,
which, you can find in the upload directory of my server:
/Seems like a very old doc.  /There is no comma required.


#v+
olecom@flower:/tmp$ grep -m7 -B7 -A12 cua <linux-2.6.22-rc4/Documentation/devices.txt
| tail -n20 >serial-devices.txt
olecom@flower:/tmp$ chmod o+r serial-devices.txt
#v-


Again, that flower thing just makes me laugh. Are /you/ serious? Why not just be more descriptive and call the box pansy? Perhaps change your user name to fancy pants?


  - <output_filename> optional output filename
  - </Fahrenheit> optional Fahrenheit mode (default Celsius)
  - version 1.03

Required on the command line is the 1-Wire port name:

example:  "COM1"                (Win32 DS2480B)
          "/dev/cua0"           (Linux DS2480B)

OK. The main idea, that they are using standard serial port (rs232)
interface for communication here.

          "1"                   (Win32 TMEX)
          "\\.\DS2490-1"        (Win32 USB DS2490)
          "{1,5}"               (Win32 DS2480B multi build)
          "{1,6}"               (Win32 USB DS2490 multi build)
          "{1,2}"               (Win32 DS1410E multi build)

And unknown Windows magic here.

/When the device is plugged in dmesg shows:

usb 1-10: new full speed USB device using ohci_hcd and address 6
PM: Adding info for usb:1-10
PM: Adding info for No Bus:usbdev1.6_ep00
usb 1-10: configuration #1 chosen from 1 choice
PM: Adding info for usb:1-10:1.0
PM: Adding info for No Bus:usbdev1.6_ep81
PM: Adding info for No Bus:usbdev1.6_ep02
PM: Adding info for No Bus:usbdev1.6_ep83

Is that all? His *is* the actual information. But there's no hint, that
you've cut it too late or too early. So, more output is needed.

Still trying to decipher that... Whatever that is.

In /dev I have:

usbdev1.1_ep81
usbdev1.6_ep83
usbdev1.6_ep02

One usb device with two endpoints(dmesg shows three). One with one (i
guess). Doc might say about what to use and how to use (but not that
you've quoted here). Try to look at sources. They provide sources for
Linux most of the time. Because Linux have stable API nonsense feature.
And those dude on Linux like to read sources.

Trying something like: /sh thermodl /dev/usbdev1.1_ep81 t.txt  /results
in an error.

Are you fan of the slash (i.e. `/')? Slash in UNIX-like OSes is
directory separator. It is *not* an option separator, like in the DOS.

`/sh' means loading for execution file `/sh', i.e. root directory, file
`sh'. But somehow shell got loaded and took the input, let's see.

/thermodl.c: line 1:

Hgm. C file. Sources of the C language file.
This must be almost all you need!

//------------------------------------------------------------------: No
such file or directory
thermodl.c: line 2: syntax error near unexpected token `('
thermodl.c: line 2: `// Copyright (C) 2000 Dallas Semiconductor
Corporation, All Rights 'eserved.

The shell does not like text of the sources of the C langage from that
file. :-\

/Any hints on how to call the device?

``The data logger (DS1921G-F5)''?

_____:)

How did you manage to type that reply... That is, with your head so far up your butt?

No worries. I received a reply off list that is pushing me in the right direction; just enough hints to make me work for the prize.


Sincerely,

Nick



Reply to: