Re: [Soekris] net4801 + openbsd + serial device

2008-04-29 Thread Chris Cappuccio
While we're at it, there is no RJ-45.  It's RJ48.  RJ45 is 8 pin, 2 conductor.  
What everyone calls RJ45 should have been a variant of RJ48.

der Mouse [EMAIL PROTECTED] wrote:
  This converter uses an DB-9 based serial device,
 
 It's a trivial thing in one sense...but surely this should be DE-9.
 I've never seen a DB-9 and doubt they exist; what's commonly miscalled
 a DB-9 is actually a DE-9.  The letter after the D indicates the shell
 size, and the DB shell is the 25-pin size.  (The other sizes: DA is the
 15-pin size used for peecee game ports and AUI Ethernet; DC is a 37-pin
 size that isn't used for much in my experience; DD is the three-row
 50-pin size used for SCSI by the Sun-3s.  I'm sure each has plenty of
 other uses, too.  I don't know why the letters aren't in order; I
 speculate the DE size was an afterthought.)
 
 Not that this is a reflection on you; it's a very common mistake - even
 many vendors of D-shell hardware make it, and I used to make it myself
 until I got the terminology straight in my head.
 
 /~\ The ASCII der Mouse
 \ / Ribbon Campaign
  X  Against HTML [EMAIL PROTECTED]
 / \ Email! 7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 ___
 Soekris-tech mailing list
 Soekris-tech@lists.soekris.com
 http://lists.soekris.com/mailman/listinfo/soekris-tech

-- 
Too many clocks, not enough time (Al. Einstein)
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-29 Thread Chris Cappuccio
http://en.wikipedia.org/wiki/Registered_jack

der Mouse [EMAIL PROTECTED] wrote:
  While we're at it, there is no RJ-45.  It's RJ48.  RJ45 is 8 pin, 2
  conductor.  What everyone calls RJ45 should have been a variant of
  RJ48.
 
 I thought what's usually called RJ45 isn't RJ-anything because the RJ
 stuff is for particular ways of putting POTS pairs on those connectors,
 and thus if you're not doing POTS over the lines it's not RJxx.  (Well,
 it might be fair to speak of RJ45 - or RJ48 - _connectors_, as in, the
 connectors appropriate for RJwhatever, ut then put them to another use,
 much as one could speak of a DB25 as being an RS232 connector even if
 one then uses it for a parallel port or something.)
 
 Is my impression of RJ wrong?
 
 /~\ The ASCII der Mouse
 \ / Ribbon Campaign
  X  Against HTML [EMAIL PROTECTED]
 / \ Email! 7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 ___
 Soekris-tech mailing list
 Soekris-tech@lists.soekris.com
 http://lists.soekris.com/mailman/listinfo/soekris-tech

-- 
Too many clocks, not enough time (Al. Einstein)
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread jmc
--- Uffe Jakobsen [Sun, Apr 27, 2008 at 01:09:50PM +0200]: --- 
 
 Hi,
 
 jacco wrote:
  
  The part of the graphing script communicating with the device is this:
  
  printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
  dd if=/dev/tty of=/root/tmp/output bs=1 count=31 
  
  The result I get:
  
  [EMAIL PROTECTED] 36 ~# ./test.sh
  x11x00x00x00xB6x00x00x00xC7
  [EMAIL PROTECTED] 37 ~# dd: /dev/tty: Input/output error
  1+0 records in
  1+0 records out
  1 bytes transferred in 6.744 secs (0 bytes/sec)
  
 
 Looking at the script part that you've provided in your email and looking at 
 the supplied output
 I would say that you use the wrong tty device.
 
 The output that was supposed to go to the solar-device is output to your own 
 terminal.
 Now I'm not that familiar with OpenBSD but /dev/tty is usualy the system 
 concole device on most unix'es
 
 On Solaris/BSD's serial-devices/-ports are usually called something like 
 /dev/cua?? /dev/ttyd?

i use /dev/tty00 for directly connected serial consoles.
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread Stuart Henderson
On 2008-04-27, jacco [EMAIL PROTECTED] wrote:
 printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
 dd if=/dev/tty of=/root/tmp/output bs=1 count=31 

See man 4 tty


___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread Jed Clear
On Sun, 27 Apr 2008, Uffe Jakobsen wrote:
  The part of the graphing script communicating with the device is this:
 
  printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
  dd if=/dev/tty of=/root/tmp/output bs=1 count=31 
 
  The result I get:

 Looking at the script part that you've provided in your email and looking at 
 the supplied output
 I would say that you use the wrong tty device.

 The output that was supposed to go to the solar-device is output to your own 
 terminal.
 Now I'm not that familiar with OpenBSD but /dev/tty is usualy the system 
 concole device on most unix'es

 On Solaris/BSD's serial-devices/-ports are usually called something like 
 /dev/cua?? /dev/ttyd?

 But maybe someone on this list that know OpenBSD better that I can help you 
 with that actual device naming for serial devices on OpenBSD ?

In FreeBSD, /dev/tty is what ever tty you're presently logged in on, won't
even be a serial port at all if you're SSH'd in.  You need something like
/dev/ttyd0 (FreeBSD) to specify the first serial port.

You probably also need to get OpenBSD to take the getty off that serial
port.  Not sure how far OpenBSD has diverged from FreeBSD, but in FreeBSD
you'd edit /etc/ttys and find the line with ttyd0 and change the keyword
on to off, save, then kill -1 1.  One thing concerns me is that I've
never run a Unix with no console device enabled, even if it was just an
unconnected serial port.

Another alternative is that there is a second serial port on the 4801.
You just need to bring it out to a DB9.  Beware there are two different
2x5 to DB9 wirings, beyond the usual DCE/DTE problems, and the
nomenclature is horribly inconsistent.  I went through all that to hook up
my GPS18, getting the wrong cable the first try.  I updated the Soekris
wiki on this, so check there to avoid my mistakes. ;-)

-Jed
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread Uffe Jakobsen

Hi,

jacco wrote:
 
 The part of the graphing script communicating with the device is this:
 
 printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
 dd if=/dev/tty of=/root/tmp/output bs=1 count=31 
 
 The result I get:
 
 [EMAIL PROTECTED] 36 ~# ./test.sh
 x11x00x00x00xB6x00x00x00xC7
 [EMAIL PROTECTED] 37 ~# dd: /dev/tty: Input/output error
 1+0 records in
 1+0 records out
 1 bytes transferred in 6.744 secs (0 bytes/sec)
 

Looking at the script part that you've provided in your email and looking at 
the supplied output
I would say that you use the wrong tty device.

The output that was supposed to go to the solar-device is output to your own 
terminal.
Now I'm not that familiar with OpenBSD but /dev/tty is usualy the system 
concole device on most unix'es

On Solaris/BSD's serial-devices/-ports are usually called something like 
/dev/cua?? /dev/ttyd?

But maybe someone on this list that know OpenBSD better that I can help you 
with that actual device naming for serial devices on OpenBSD ?

HTH

/Uffe

___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread jacco

On 27 apr 2008, at 13:09, Uffe Jakobsen wrote:


 Hi,

 jacco wrote:

 The part of the graphing script communicating with the device is  
 this:

 printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
 dd if=/dev/tty of=/root/tmp/output bs=1 count=31 

 The result I get:

 [EMAIL PROTECTED] 36 ~# ./test.sh
 x11x00x00x00xB6x00x00x00xC7
 [EMAIL PROTECTED] 37 ~# dd: /dev/tty: Input/output error
 1+0 records in
 1+0 records out
 1 bytes transferred in 6.744 secs (0 bytes/sec)


 Looking at the script part that you've provided in your email and  
 looking at the supplied output
 I would say that you use the wrong tty device.

 The output that was supposed to go to the solar-device is output to  
 your own terminal.
 Now I'm not that familiar with OpenBSD but /dev/tty is usualy the  
 system concole device on most unix'es

 On Solaris/BSD's serial-devices/-ports are usually called something  
 like /dev/cua?? /dev/ttyd?

 But maybe someone on this list that know OpenBSD better that I can  
 help you with that actual device naming for serial devices on  
 OpenBSD ?

Ok, that cleared a bit for me, tty is indeed the terminal, not an  
serial device port on OpenBSD. It should be something like /dev/cua00,  
but that doesn't work either:

[EMAIL PROTECTED] 13 ~# ./test.sh
x11x00x00x00xB6x00x00x00xC7dd: /dev/cua00: Device busy

Please forgive me, since I'm a Mac user, I'm not too familiar with  
this stuff.


Here's my dmesg output, booting OpenBSD on the soekris:

OpenBSD 4.2 (GENERIC) #375: Tue Aug 28 10:38:44 MDT 2007
 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by National Semi (Geode by NSC  
586-class) 267 MHz
cpu0: FPU,TSC,MSR,CX8,CMOV,MMX
cpu0: TSC disabled
real mem  = 133787648 (127MB)
avail mem = 121737216 (116MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/50/29, BIOS32 rev. 0 @ 0xf7840
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc8000/0x9000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Cyrix GXm PCI rev 0x00
sis0 at pci0 dev 6 function 0 NS DP83815 10/100 rev 0x00, DP83816A:  
irq 10, address 00:00:24:c6:15:08
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
sis1 at pci0 dev 7 function 0 NS DP83815 10/100 rev 0x00, DP83816A:  
irq 10, address 00:00:24:c6:15:09
nsphyter1 at sis1 phy 0: DP83815 10/100 PHY, rev. 1
sis2 at pci0 dev 8 function 0 NS DP83815 10/100 rev 0x00, DP83816A:  
irq 10, address 00:00:24:c6:15:0a
nsphyter2 at sis2 phy 0: DP83815 10/100 PHY, rev. 1
ppb0 at pci0 dev 10 function 0 TI PCI2250 PCI-PCI rev 0x02
pci1 at ppb0 bus 1
sis3 at pci1 dev 0 function 0 NS DP83815 10/100 rev 0x00, DP83816A:  
irq 5, address 00:00:24:c4:d8:f0
nsphyter3 at sis3 phy 0: DP83815 10/100 PHY, rev. 1
sis4 at pci1 dev 1 function 0 NS DP83815 10/100 rev 0x00, DP83816A:  
irq 11, address 00:00:24:c4:d8:f1
nsphyter4 at sis4 phy 0: DP83815 10/100 PHY, rev. 1
gscpcib0 at pci0 dev 18 function 0 NS SC1100 ISA rev 0x00
gpio0 at gscpcib0: 64 pins
NS SC1100 SMI rev 0x00 at pci0 dev 18 function 1 not configured
pciide0 at pci0 dev 18 function 2 NS SCx200 IDE rev 0x01: DMA,  
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: SanDisk SDCFH-1024
wd0: 1-sector PIO, LBA, 977MB, 2001888 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
geodesc0 at pci0 dev 18 function 5 NS SC1100 X-Bus rev 0x00: iid 6  
revision 3 wdstatus 0
ohci0 at pci0 dev 19 function 0 Compaq USB OpenHost rev 0x08: irq  
11, version 1.0, legacy support
isa0 at gscpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio1 at nsclpcsio0: 29 pins
gscsio0 at isa0 port 0x15c/2: SC1100 SIO rev 1:
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
usb0 at ohci0: USB revision 1.0
uhub0 at usb0: Compaq OHCI root hub, rev 1.00/1.00, addr 1
biomask fbc5 netmask ffe5 ttymask ffe7
pctr: no performance counters in CPU
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a swap on wd0b dump on wd0b
WARNING: NVRAM century is 19 but RTC year is 2008


And part of my /etc/ttys:

console /usr/libexec/getty Pc vt220   off secure
ttyC0   /usr/libexec/getty Pc vt220   on  secure
ttyC1   /usr/libexec/getty Pc vt220   on  secure
ttyC2   /usr/libexec/getty Pc vt220   on  secure
ttyC3   /usr/libexec/getty Pc vt220   on  secure
ttyC4   /usr/libexec/getty Pc vt220   off secure
ttyC5   /usr/libexec/getty Pc vt220   on  secure

Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread der Mouse
 This converter uses an DB-9 based serial device,

It's a trivial thing in one sense...but surely this should be DE-9.
I've never seen a DB-9 and doubt they exist; what's commonly miscalled
a DB-9 is actually a DE-9.  The letter after the D indicates the shell
size, and the DB shell is the 25-pin size.  (The other sizes: DA is the
15-pin size used for peecee game ports and AUI Ethernet; DC is a 37-pin
size that isn't used for much in my experience; DD is the three-row
50-pin size used for SCSI by the Sun-3s.  I'm sure each has plenty of
other uses, too.  I don't know why the letters aren't in order; I
speculate the DE size was an afterthought.)

Not that this is a reflection on you; it's a very common mistake - even
many vendors of D-shell hardware make it, and I used to make it myself
until I got the terminology straight in my head.

/~\ The ASCII   der Mouse
\ / Ribbon Campaign
 X  Against HTML   [EMAIL PROTECTED]
/ \ Email!   7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread The Fungi
On Sun, Apr 27, 2008 at 06:19:21PM +0200, jacco wrote:
[...]
 Here's my dmesg output, booting OpenBSD on the soekris:
[...]
 usb0 at ohci0: USB revision 1.0
 uhub0 at usb0: Compaq OHCI root hub, rev 1.00/1.00, addr 1
[...]

Was that before or after attaching the USB dongle? If before,
connect it, wait a few seconds, and then recheck the end of your
dmesg buffer. I think a reference to the device should show up
(though it's been a while since I played with one). Something like
(this example would be one using a PL-2303 series controller chip):

uplcom0 at uhub0 port 2
uplcom0: Prolific Technology Inc. USB-Serial Controller, rev 1.10/3.00, addr 2
ucom0 at uplcom0

The ucom driver (see its manpage) is the primary (only?) kernel
driver with which to interact with USB serial ports from the /dev
filesystem. Per that manpage, you'll be wanting to attach to
something like cuaU0 or ttyU0 ('U' for USB), assuming your
hardware is actually supported. The SYNOPSIS section of the manpage
also lists the hardware drivers for the various supported devices
which might provide ucom interfaces, one of which you'll hopefully
see in place of my uplcom example above.

If the dmesg output you provided was well after attaching the
device, then it might simply not be supported by the OpenBSD release
you're running, or the necessary driver could be disabled by default
in the GENERIC kernel (often the case with known-buggy/developmental
drivers). Check the KERNEL MODIFICATION section of the config
manpage for instructions on checking and enabling drivers (though
keep in mind they're usually not disabled without good reason).
-- 
{ IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657);
SMTP([EMAIL PROTECTED]); IRC([EMAIL PROTECTED]); ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER([EMAIL PROTECTED]);
MUD([EMAIL PROTECTED]:6669); WWW(http://fungi.yuggoth.org/); }
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread William Estrada
Jacco,

  Looking at the solget script, it uses '/dev/tty/1' as the input/output 
device, have you tried this?

  Also, you could use a serial breakout box to see any traffic.

  You should include line 322 in your test.sh.

# Configure serial port
stty -hupcl -clocal ignbrk -icrnl -ixon -opost -onlcr -isig -icanon
-iexten -echo -echoe -echok -echoctl -echoke 9600 -crtscts $PORT

Please keep us posted about your progress.

-- 
William Estrada
[EMAIL PROTECTED]
Mt-Umunhum-Wireless.net ( http://Mt-Umunhum-Wireless.net )
Ymessenger: MrUmunhum

 Message: 1
 Date: Sun, 27 Apr 2008 12:20:45 +0200
 From: jacco [EMAIL PROTECTED]
 Subject: [Soekris] net4801 + openbsd + serial device
 To: soekris-tech@lists.soekris.com
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

 Hello,

 I recently bought an net4801 for using it to graph the output with  
 RRDTool for my solarpanel converter. This converter uses an DB-9 based  
 serial device, for talking to the unit itself. This works under  
 Windows XP using an usb serial converter on 9600baud. Now I want to  
 use the unit with the soekris, but Whatever I try, somehow I can't get  
 the software (shell script) to talk to the serial device

 More info:

 http://www.mastervolt.com/download.php?id=3018

 http://sourceforge.net/projects/solget/

 What I need, is a way to check what tty the device is on, and if it  
 does sent signals, and at what rate.

 The part of the graphing script communicating with the device is this:

 printf \x11\x00\x00\x00\xB6\x00\x00\x00\xC7  /dev/tty
 dd if=/dev/tty of=/root/tmp/output bs=1 count=31 

 The result I get:

 [EMAIL PROTECTED] 36 ~# ./test.sh
 x11x00x00x00xB6x00x00x00xC7
 [EMAIL PROTECTED] 37 ~# dd: /dev/tty: Input/output error
 1+0 records in
 1+0 records out
 1 bytes transferred in 6.744 secs (0 bytes/sec)

 --
 jacco

___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech


Re: [Soekris] net4801 + openbsd + serial device

2008-04-27 Thread Karl O. Pinc

On 04/27/2008 03:05:38 PM, William Estrada wrote:

  Now I want to
 
  use the unit with the soekris, but Whatever I try, somehow I can't
 get
  the software (shell script) to talk to the serial device

I'm jumping into the middle of this without looking at details,
but I did just setup a soekris box with OpenBSD.
In my case the soekris serial port (com0) is /dev/console.  You want
to look at /etc/ttys to setup the serial device, and probably
use a terminal class defined in /etc/gettytab.  I came
up with a /etc/ttys line like:

console /usr/libexec/getty std.9600 vt220   on secure

I've got /etc/boot.conf with:
stty com0 9600
set tty com0

You may not want the console on the serial port (or maybe
you're using the second serial port, uh, jp4?).
In that case /etc/ttys should have the console
line off.   Anyhow, you'll either be using /dev/tty00 (or
/dev/tty01), if the serial device is doing the initiation and
the talking, or, more likely, your script is doing the talking
and you want to use /dev/cua00 (or /dev/cua01).  See man 4 tty.

The other trick is to begin by using minicom (in ports)
to talk to your device manually.  Start by turning all flow control
off and then add back what you need.  You can also do something
like ttys -a  /dev/cua00 to see what the settings are on a
particular serial port.  Something like cat -  /dev/tty00 
can also be handy, as can tip.

RS232 gets grody quick.  I suspect I can use rtscts at the
end of the /etc/ttys line along with a null modem cable
that swaps rts and cts when connecting to my PC to use
the RTS line for hardware flow control, hardware flow
control almost always being the best choice.  I've not
fully tested this yet, but I do notice the the OpenBSD
boot program does not like this.  Only one char gets
echoed and the rest buffer on the soekris until I turn
off hardware flow control in minicom.  (Or maybe
it's a DTR/DCD issue.  *sigh*.)

This looks exactly like the error you're getting, so
there's probably a hardware flow control issue.
Seems to me you want hardware flow control off.
(/etc/ttys line has softcar?)

Karl [EMAIL PROTECTED]
Free Software:  You don't pay back, you pay forward.
  -- Robert A. Heinlein
___
Soekris-tech mailing list
Soekris-tech@lists.soekris.com
http://lists.soekris.com/mailman/listinfo/soekris-tech