Hi,

just mention that sometimes happen that one removes the USB while the serial
port is still opened, and then the driver locks it and creates a new one-

Cheers!
Sergio

On Thu, Jun 16, 2011 at 2:55 PM, colum walsh <[email protected]> wrote:

> Hi Romain,
>
> the port changes while SerialForwarder is running. It takes a few hours to
> change port generally, i'll have a look at dmesg when the port changes
> again.
>
> SerialForwarder may cut out again, but shouldn't fail completely after
> adding the following file to /etc/udev:
>
>      #tinyos rules
>      ENV{ID_SERIAL_SHORT}=="M4AP419H", SYMLINK+="BaseMote"
>
> and pointing SerialForwarder to BaseMote:
>
>      java net.tinyos.sf.SerialForwarder -comm serial@/dev/BaseMote:telosb
>
> Thanks for the help,
> Colum
>
>
>
> On Thu, Jun 16, 2011 at 12:31 PM, Romain Bornet <[email protected]>wrote:
>
>> Hi,
>>
>> I don't think that your problem is related to your packet size but
>> most probably to linux drivers.
>>
>> >> I have one mote acting as a BaseStation, which randomly changes port
>> (/dev/ttyUSB0->/dev/ttyUSB1)
>> Do you mean that the port changes at runtime or between 2 executions
>> of SerialForwarder ?
>>
>> If the port changes at runtime, I would assume that the USB link gets
>> shortly broken and up again and thus the driver mounts the USB-serial
>> converter on another ttyUSB.
>>
>> There are ways to configure Linux/udev to always mount the same
>> hardware on the same ttyUSB port. I only have a link to a french blog
>> entry I could remember.
>>
>> http://www.lefinnois.net/wp/index.php/2009/04/15/ttyusb0-ttyusb2-non-ttyusb1-graaaahh-udev/
>>
>> Basically, you can force udev to mount a device to a fix port based on
>> its serial number.
>>
>> You can retrieve the serial number of your USB converter with:
>> $udevadm info -a -p  $(udevadm info -q path -n /dev/ttyUSB0)
>>
>> and then update your /etc/udev/rules.d accordingly.
>>
>> This is only part of the solution (will always mount the serial link
>> on the same ttyUSB port) but it does not explain why the device gets
>> disconnected and connected again... Have a look at the output of dmesg
>> to see if your Linux host really detects disconnects...
>>
>> In case of disconnection you should see something like:
>> [191876.912510] ftdi_sio 2-1.4.1:1.0: device disconnected
>>
>> and later again a connection
>>
>> [191886.215902] usb 2-1.4.1: new full speed USB device using ehci_hcd
>> and address 10
>> [191886.331193] usb 2-1.4.1: configuration #1 chosen from 1 choice
>> [191886.333078] ftdi_sio 2-1.4.1:1.0: FTDI USB Serial Device converter
>> detected
>> ...
>> [191886.333747] usb 2-1.4.1: FTDI USB Serial Device converter now
>> attached to ttyUSB0
>>
>> Hope this helps,
>>
>> Romain
>>
>> On Thu, Jun 16, 2011 at 12:27 PM, colum walsh <[email protected]>
>> wrote:
>> > Hi list,
>> >
>> > I have one mote acting as a BaseStation, which randomly changes port
>> > (/dev/ttyUSB0->/dev/ttyUSB1), causing SerialForwarder to stop working.
>> Has
>> > anyone else had this issue?
>> >
>> > My packet size is larger than standard, could that be the cause? Or
>> > something to do with linux drivers?
>> >
>> > I'm using tmote sky motes, tinyos-2.1.1, and Ubuntu Lucid.
>> >
>> >
>> > Thanks for your time,
>> > Colum
>> >
>> > _______________________________________________
>> > Tinyos-help mailing list
>> > [email protected]
>> >
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>> >
>>
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to