Hi,
I plugged the micro USB port on the BBB into my USB hub. The USB hub is
currently attached to a windows PC but the same fault happens when the USB
cable is plugged into my mac book running OSX.

        Which, since there is no FTDI chip on the BBB, is effectively an
emulated serial port... The USB-serial driver responds to I/O operations as
if it were a serial port, but things like baud rate are mostly meaningless
-- the driver moves bytes from the client buffer to the USB buffer, and USB
transfers at (if USB2.0 full speed -- 480kbps; ignoring the breaks caused
by USB packet size AND that the host computer has to poll the USB device to
ask for each packet of data; effective throughput being closer to 250kbps).
I haven't noticed that you are using USB serial gadged driver.What Dennis wrote is true.

Here you can see the source code of USB serial gadged driver: http://elixir.free-electrons.com/linux/v4.3.5/source/drivers/usb/gadget/function/u_serial.c

Presented baudrate for tty is fixed to 9600:

|
/* 9600-8-N-1 ... matches defaults expected by "usbser.sys" on
* MS-Windows.  Otherwise, most of these flags shouldn't affect
* anything unless we were to actually hook up to a serial line.
*/ gs_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
gs_tty_driver->init_termios.c_ispeed =9600;
gs_tty_driver->init_termios.c_ospeed =9600;
tty_set_operations(gs_tty_driver, &gs_tty_ops);
|

​
Change of baud rate is not handled anywhere, data are transferred at full USB speed.

The easiest solution is to do a simple handshake:

On PC:

|import  serial.tools.list_ports

    # connect to the BBB serial port on Windows
    x = serial.Serial('COM9')
    while  True:
            x.write(b"\r\n")
            x.flush()
            received = x.readline()
            print(received)
|

​
On BBB:

|import  serial.tools.list_ports

    x = serial.Serial('/dev/ttyGS0')
    while  True:
            received = x.readline()
            x.write(b"DATA\r\n")
            x.flush()|


The BBB app must be run as first... I do not know much about python, maybe it's ok ;)

The Second solution with baudrate emulation without RS232/USB converter:
On BBB enable ttyO1 and ttyO2. Connect Tx  pins with Rx..
Install ser2net and configure it on port ttyO2.
Run your app on ttyO1

On windows install http://www.eterlogic.com/Products.VSPE.html and connect it to ser2net port.


And you have "simple" baud rate emulator ;)

BTW:

Why you want to use RS232, i would choose TCP ,UDP or WebServer..

if you want, can I send you, ready to use modular web server in java.. jetty+vaadin+netbeans lookup


ArSi


--
For more options, visit http://beagleboard.org/discuss
--- You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/590C3512.2030202%40chello.sk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to