Page 1 of 1

GLK19264 +FreeBSD

Posted: Tue Mar 18, 2008 1:11 am
by rudivd
Hi all,

I was wondering if someone has a GLK19264-7T-1U-USB running with
freeBSD ? Which USB (serial) driver should I use, and do I have to hack
the vendor / product id in there ??

Thanks !
Rudi

Posted: Tue Mar 18, 2008 10:20 am
by Ray
we have never tried freebsd ourselves but I can share with you my linux experiences which probably will give you a push in the right direction.

The GLK19264-7T-1U-USB uses the FTDI USB->Serial Bridge so the regular FTDI driver should work (FTDI_SIO on linux but i think its called uftdi on freebsd, not sure) now the driver will not know about the vid/pid (0xb13d/0x127) by default but on linux there was a way to feed the driver new vid/pid to look for by running.

modprobe ftdi_sio vendor=0x1b3d product=0x0127

I'm not sure if a similar mechanism exists on freebsd else you will have no other option then to patch the driver yourself and add this pid/vid combination.

Now there was a second problem with the first batch of GLK19264-7T-1U-USB on linux , windows was fine linux was really unhappy, I'm not sure how this will effect freebsd but i'll give you the problem and the work around.

the FTDI Eeprom chip holds the settings for the vid/pid and some other settings one of them is the endpointsize (usb packet size) this was set to 0 on the first batch. now windows took this as 'lets take the default 64' while linux took the more strict route '0 sized packets it will be!' which naturally makes communication with the device a bit difficult.

The good thing however is that if you are plagued by this issue you can fix it without RMA'ing the unit.

To correct this you can use the FTDI Mprog application (on windows sadly) available here http://www.ftdichip.com/Resources/Utilities.htm

All you need to do is open Mprog, use Tools , Read and parse and write it straight back into the unit, Mprog will fix the error on its own. (How you do this is go to Tool, Read and Parse, then Save As. After saving, press Ctrl-P to program the FTDI chip.)

Since you are in MPROG anyhow at this point, if you don't feel like patching the freebsd FTDI driver and there is no modprobe alike available on freebsd you can try to change the VID/PID to 0x0403/0x6001 which is the FTDI default which with a bit of luck will be picked up by the freebsd driver without any patching.

Let me know how this works out for you!

Posted: Tue Mar 18, 2008 2:31 pm
by rudivd
Ray,

Thanks so much for the info, I will start working on it.
I think if I reset both the VID/PID (to ftdi default) and
the size (to 64) It will work, to get a short ans pragmatic
fix.

However, I will also try to publish
a patch for freebsd to support the display (and problably
some other MO displays) natively soon.

I'll keep you posted !

Thanks again!
Rudi

Posted: Tue Mar 18, 2008 2:57 pm
by Ray
If you are doing a patch I'll give you a heads up on our current pid's in use on our 0x1b3d vendor ID.

01xx - FTDI Based procucts. (so anything from pid 0x0100 till 0x01ff will always have an FTDI chip on it even though we do not know what future products we will release, if its FTDI based it will start with 0x01)

Currently the following products have a pid in this range

0127 - GLK19264-7T-1U-USB
012C - LK204-7T-1U-USB
0153 - MOU-Axxxx
0154 - XBoard -U series
0156 - VK202-25-USB
0157 - LK204-25-USB
0158 - VK204-25-USB

Posted: Wed Mar 19, 2008 1:56 am
by rudivd
Ray,

I just did the Mprog trick changing the default endpoint size to default
(64), that solved the problem that the linux ftdi_sio driver barked on
the display when I tried to connect.
At least now I have one UNIX (linux) box to work with. Next thing is
that I changed the vid/pid to default which gave me the ability to go
and test my software on FreeBSD as it was recognized as standard
ftdi, which works for me just now..

Now I will be playing a little and build a working app, then dig into the
driver stuff for freebsd and get it properly fixed with the correct vid/pid
and stuff...

Anyways, I like your display, they look nice :)

Rudi.

Posted: Sat Mar 22, 2008 1:15 pm
by rudivd
Ray,

Just a quick update. I reset the vid/pid and connect the display to a
FreeBSD machine and my mac, and started developing. The display
works great, just open the usb tty device that is dynamically created when
plugging in, then set the serialport (19200bd, n81) and go send bytes !

nice command language :) an ddition could be: draw circle :)

Probably will be releasing some source of the generic part of my
app that talks to your display in OpenSource.

Rudi

Posted: Sat Mar 22, 2008 4:35 pm
by Ray
I recently joined the company and haven't been involved in the design of the glk/glc series. I would agree that circle is a function I could imagine being there yet in the support system I have seen nobody requesitng it. So I guess it got killed cause nobody needs it and codespace is tight on the little micro processors we use. I'll see if i can bug one of the engineers next week to see if there's a fun story behind it but it doubt it.

If you want to add circles to your own code they are not that hard to do, see this article on wikipedia for the algorhitm and some pseudo code.