Seb, guys... what do you think about my last message? I think we need
a "usb_serial_port_open" variable.

Matt.

On Oct 2, 9:53 am, mattschinkel <[email protected]> wrote:
> I dislike this (usb_cdc_line_status() ==  0x00). I think we need
> something more readable.
>
> It should look like this instead:
>
> -- wait till USB device has been connected and serial port has been
> opened by the HOST
> While (usb_serial_port_open == FALSE)  loop
>    usb_serial_flush() -- poll USB at all times
> end loop
>
> Can we create an inline pseudo var?
>
> Matt.
>
> On Oct 2, 4:14 am, Sebastien Lelong <[email protected]>
> wrote:
>
> > Hi Matt,
>
> > Thanks for this ! I tried again, with these new updates:
>
> > 2010/10/2 mattschinkel <[email protected]>
>
> > > I tested it on windows. Once you plug in usb and open the port via
> > > your PC, the PIC will send you 1,2,3,0xC0,5,6,0xDB,8,9,0x0A via slip.
> > > Slip will encode it and you will receive it on your PC encrypted like
> > > this: C0 01 02 03 DB DC 05 06 DB DD 08 09 0A C0
>
> > OK, this is what I have.
>
> > What's pretty interesting here is you actually receive chars whereas I
> > don't. I originally wrote the same code, checking CDC line status and send
> > SLIP packet *before* forever loop, but I've never received anything. Under
> > Linux, when device is getting recognized and configured, CDC line status
> > becomes != 0. Though I don't have the serial port opened. As a consequence,
> > I don't receive anything when I open the port, as the code is already in the
> > forever loop. It may be related to CDC ACM kernel driver ?...
>
> > > Then when you send back C0 01 02 03 DB DC 05 06 DB DD 08 09 0A C0 from
> > > your PC to your PIC. The PIC will decode the data and send back to the
> > > PC on the serial port (not via slip procedures). You will get 01 02 03
> > > C0 05 06 DB 08 09 0A
>
> > I get garbage chars but it finishes with this.
>
> > Using your code (replacing target and pragmas with include jaluino_medium),
> > I also receive the exact same garbage chars, then the SLIP packet. Weird.
> > I'd need to test it under Windows to be sure it's coming from PC system.
>
> > > Your serial_data_available works, please add it to usb_serial. Thanks,
> > > I was waiting for this. I have this procedure in my sample, buildbot
> > > will fail unless it is removed. you can remove it or let me know.
> > > Maybe you can add a SLIP 18f4550_slip_poll_usb_serial.jal sample, or
> > > whatever PIC you are using.
>
> > OK
>
> > Cheers,
> > Seb

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to