Thomas O Fredericks wrote:
I am creating an abstraction to ease the communication with an UBW (USB Bit Wacker: http://greta.dhs.org/UBW/index.html http://greta.dhs.org/UBW/index.html).
The abstraction uses comport to communicate with the device. It is considered as USB modem by the system. See the tail of dmesg when the device is plugged in to my Ubuntu machine:
[102406.169656] usb 1-5: new full speed USB device using ohci_hcd and address 8 [102406.381592] usb 1-5: configuration #1 chosen from 1 choice [102415.654264] usb 1-5: USB disconnect, address 8 [102416.484598 ] usb 1-5: new full speed USB device using ohci_hcd and address 9 [102416.706005] usb 1-5: configuration #1 chosen from 1 choice [102416.708971] drivers/usb/class/cdc-acm.c: This device cannot do calls on its own. It is no modem. [102416.708984] cdc_acm 1-5:1.0: ttyACM0: USB ACM device
The problem is as follows: The abstraction works fine in XP, but in Ubuntu, when I want to send more than three values (i.e. something like [77,65,49,42,13< ), comport complains that:
"[comport] write returned -1, errno is 11 Write error, maybe TX-OVERRUNS on serial line"
From an errno.h:
#define EAGAIN 11 /* Try again */
Maybe try sending the bytes one at a time slowly? I'm guessing that EAGAIN means the data has not been sent yet, it's still in the queue. I think it works in the XP version because write_serial() explicitly checks for an ERROR_IO_PENDING. But the result should be the same, the data gets sent anyway, the error is bogus. If that's the problem I'll fix it tomorrow in cvs.
Martin
Now, ttyACM0 is a weird device because it does not have a baud rate. It simply sends the data as fast as it can. So, this message DOES not make any sense.
I know it is not a problem with my configuration of Ubuntu because I was able to establish proper communication with Perl.
Anybody have a clue on how to solve this or modify comport? (I used a version I compiled from pd cvs and another from pd-extended and both failed).
Tom
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list