[PD] Trying to get comport to work in windows

Martin Peach martin.peach at sympatico.ca
Fri Aug 4 19:27:12 CEST 2006


Frank Barknecht wrote:
> Hallo,
> Martin Dupras hat gesagt: // Martin Dupras wrote:
>
>   
>> Hi,
>>
>> I'm trying to use a Spark Fun WiTilt (essentially a 3D accelerometer
>> attached to a bluetooth radio, see
>> http://www.sparkfun.com/commerce/product_info.php?products_id=254) with PD
>> 0.39.2extended-test4 on win XP.
>>
>> I know the device is connected and sending because I can see the correct
>> output if I connect to the device with hyperterminal.
>>
>> My device is on com port 12. If I try
>>
>> [comport 12 9600]
>>
>> I get the error: "[comport] invalid handle for COM".
>>
>> Is there any reason why comport should not see the port, when hyperterminal
>> can?
>>     
>
>
> You may need to recompile comport or use a different port: As default it only
> accepts up to 8 comports.
>
> Therse is this in comport.c:
>
> #define COMPORT_MAX 8
> static char *sys_com_port[COMPORT_MAX] =
> {
>   "COM1", "COM2", "COM3", "COM4",
>   "COM5", "COM6", "COM7", "COM8"
> };
>
>   
I think you have an older version of comport.

The sys_com_port array is not there. There is just this in the latest version of comport.c in cvs:

#define COMPORT_MAX 99
so you should be able to open COM1 through COM98.

Martin
> which you can try to change to something like: 
>
> #define COMPORT_MAX 12
> static char *sys_com_port[COMPORT_MAX] =
> {
>   "COM1", "COM2", "COM3", "COM4",
>   "COM5", "COM6", "COM7", "COM8"
>   "COM9", "COM10", "COM11", "COM12"
> };
>
> but I just guessed this, so no guarantees. 
>
> Ciao
>   






More information about the Pd-list mailing list