From: dave p. <dpe...@gm...> - 2023-01-13 12:52:00
|
Hi Stefan, Attached is a little programme slave_test to demonstrate pure slave aka device mode. It uses minor 0 in board mode. On the slave side run slave_test and on the master ibterm. On the slave side: *$ cc -o slave_test slave_test.c -lgpib$ ./slave_test Got helloGot byeGot quitslave done$ * On the master side: *$ ibterm -d 1Attempting to open /dev/gpib0pad = 1, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x0000ibterm>helloReply: helloibterm>byeReply: byeibterm>quitibterm><CTRL-D>ibterm: Done.$ * On Tue, 10 Jan 2023 at 17:11, Olejnik, Stefan <ste...@fl...> wrote: > I have the troubles with GPIB interface - National Instruments PCIe-GPIB. > Kernel driver TNT4882. Configuration is as a pure slave - just listen and > answer: > interface { > minor = 0 /* board index, minor = 0 uses /dev/gpib0, minor = > 1 uses /dev/gpib1, etc. */ > board_type = "ni_pci" > name = "violet" /* optional name, allows you to get a board > descriptor using ibfind() */ > pad = 1 /* primary address of interface */ > sad = 0 /* secondary address of interface */ > timeout = T10s /* timeout for commands */ > > eos = 0x0a /* EOS Byte, 0xa is newline and 0xd is carriage > return */ > set-reos = no /* Terminate read if EOS */ > set-bin = no /* Compare EOS 8-bit */ > set-xeos = no /* Assert EOI whenever EOS byte is sent */ > set-eot = yes /* Assert EOI with last byte on writes */ > > master = no /* interface board is system controller */ > } > > When I am using "ibtest" then write command returns TIMO: > : w > enter a string to send to your device: testString > sending string: testString > > [ 200.928468] tnt4882: write timed out > gpib status is: > ibsta = 0xc100 < ERR TIMO CMPL > > iberr= 6 > EABO 6: Operation aborted > > I have created test SW and find out, that if I am using "ibwrta/ibwait" > command twice, second try is always successful. First returns TIMO. > Reading is OK. > > On the other side is NI PC as a CIC. > > Thanks for any help.... > > ------------------------------ > > Please be advised that this email may contain confidential information. If > you are not the intended recipient, please notify us by email by replying > to the sender and delete this message. > _______________________________________________ > Linux-gpib-general mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-gpib-general > |