Re: HowTo gpio with com-port?

2009-04-03 Thread Per-Erik Persson
I spent some time trying to toggle the pins in the serial port in 
various ways.
The easiest way for me was to install pyserial and to control the pins 
in python takes only two or three lines of code.

This is neat if you just want to do some basic stuff.


Jan Klemkow wrote:

Hello,

I want to get some signals from a electronic circuit at my serial-port 
com0. I don't know how to attach the pin's from the serial port with 
the gpioctl tool. I think it my hardware is not supported, but I don't 
know exactly. In my dmesg there is nothing like this:


Please consider the environment before printing this email



Re: HowTo gpio with com-port?

2009-03-29 Thread Marc Balmer

Jan,

I want to get some signals from a electronic circuit at my serial- 
port com0. I don't know how to attach the pin's from the serial port  
with the gpioctl tool. I think it my hardware is not supported, but  
I don't know exactly. In my dmesg there is nothing like this:


"gpio0 at gscpcib0: 64 pins"

What could I do to get the signals from my circuit or to get support  
with gpio?


I am sorry, but doing this with the gpio framework is not possible.   
To make this
happen, it would require a small driver that wins over the standard  
serial port
driver during system auto configuration and that provides the modem  
control lines
as GPIO.  While I think such a driver would be fairly easy to write,  
it does not yet

exist to my best knowledge.

You can, however, open the serial port's tty device and query the  
modem control

signals.

- Marc Balmer

[...]



HowTo gpio with com-port?

2009-03-29 Thread Jan Klemkow

Hello,

I want to get some signals from a electronic circuit at my serial-port 
com0. I don't know how to attach the pin's from the serial port with the 
gpioctl tool. I think it my hardware is not supported, but I don't know 
exactly. In my dmesg there is nothing like this:


"gpio0 at gscpcib0: 64 pins"

What could I do to get the signals from my circuit or to get support 
with gpio?


thx
ciao, Jan

my dmesg:

OpenBSD 4.5-current (GENERIC.MP) #10: Tue Mar 24 06:45:46 CET 2009
r...@eva.hope:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 6000+ ("AuthenticAMD" 
686-class, 1024KB L2 cache) 3.05 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16

real mem  = 1072984064 (1023MB)
avail mem = 1029214208 (981MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/16/07, SMBIOS rev. 2.4 @ 
0xfbc00 (30 entries)

bios0: vendor American Megatrends Inc. version "P2.10" date 07/16/2007
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC OEMB HPET
acpi0: wakeup devices PS2K(S4) PS2M(S4) UAR1(S4) USB0(S4) MAC_(S5) 
AC97(S4) USB1(S4) USB2(S4) P0P1(S4)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 202MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 6000+ ("AuthenticAMD" 
686-class, 1024KB L2 cache) 3.05 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16

ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpihpet0 at acpi0: 2500 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (P0P1)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc/0xd000 0xcd000/0x1800
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "NVIDIA nForce3 250 PCI Host" rev 0xa1
agp at pchb0 not configured
pcib0 at pci0 dev 1 function 0 "NVIDIA nForce3 250 ISA" rev 0xa2
nviic0 at pci0 dev 1 function 1 "NVIDIA nForce3 250 SMBus" rev 0xa1
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
iic1 at nviic0
ohci0 at pci0 dev 2 function 0 "NVIDIA nForce3 250 USB" rev 0xa1: apic 2 
int 9 (irq 9), version 1.0, legacy support
ohci1 at pci0 dev 2 function 1 "NVIDIA nForce3 250 USB" rev 0xa1: apic 2 
int 3 (irq 3), version 1.0, legacy support
ehci0 at pci0 dev 2 function 2 "NVIDIA nForce3 250 USB" rev 0xa2: apic 2 
int 9 (irq 9)

usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "NVIDIA EHCI root hub" rev 2.00/1.00 addr 1
nfe0 at pci0 dev 5 function 0 "NVIDIA nForce3 LAN" rev 0xa2: apic 2 int 
9 (irq 9), address 00:19:66:47:22:e8

rlphy0 at nfe0 phy 1: RTL8201L 10/100 PHY, rev. 1
pciide0 at pci0 dev 8 function 0 "NVIDIA nForce3 250 IDE" rev 0xa2: DMA, 
channel 0 configured to compatibility, channel 1 configured to compatibility

wd0 at pciide0 channel 0 drive 0: 
wd0: 16-sector PIO, LBA, 38172MB, 78177792 sectors
wd1 at pciide0 channel 0 drive 1: 
wd1: 16-sector PIO, LBA48, 190782MB, 390721968 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 6
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  ATAPI 
5/cdrom removable

wd2 at pciide0 channel 1 drive 1: 
wd2: 16-sector PIO, LBA, 19544MB, 40026672 sectors
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
wd2(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 4
pciide1 at pci0 dev 10 function 0 "NVIDIA nForce3 250 SATA" rev 0xa2: DMA
pciide1: using apic 2 int 10 (irq 10) for native-PCI interrupt
wd3 at pciide1 channel 0 drive 0: 
wd3: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd3(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ppb0 at pci0 dev 11 function 0 "NVIDIA nForce3 250 AGP" rev 0xa2
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon 9800 Pro" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 2 int 11 (irq 11)
drm0 at radeondrm0
"ATI Radeon 9800 Pro Sec" rev 0x00 at pci1 dev 0 function 1 not configured
ppb1 at pci0 dev 14 function 0 "NVIDIA nForce3 250 PCI-PCI" rev 0xa2
pci2 at ppb1 bus 2
rl0 at pci2 dev 9 function 0 "Realtek 8139" rev 0x10: apic 2 int 9 (irq 
9), address 00:e0:7d:d3:74:23

rlphy1 at rl0 phy 0: RTL internal PHY
pchb1 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb2 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb3 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00: core 
rev JH-F3

isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using i