GP2X Usb Gadget Serial Drivers For Gp2x


kounch

Still Fresh
Joined
Dec 20, 2005
Messages
84
Website
Visit site
Cool!
Works perfectly with OS X 10.4 and minicom or ZTerm. No need to install a new driver as it is automatically loaded as /dev/tty.usbmodem01.
 

taras

Mega Pandora mania
Joined
Jun 17, 2003
Messages
934
Location
Scotland
Website
taras.net
Can someone do a proper guide to this for complete idiots (me) please?

The Wiki guide for serial comms tells you to set up a HyperTerminal connection, which I've done, but HyperTerminal wants a phone number and stuff like that. That's the level I'm talking about.
 

luteijn

Member
Joined
Dec 23, 2005
Messages
253
Age
47
Location
The Hague, NL
Website
luteijn.xs4all.nl
Can someone do a proper guide to this for complete idiots (me) please?

The Wiki guide for serial comms tells you to set up a HyperTerminal connection, which I've done, but HyperTerminal wants a phone number and stuff like that. That's the level I'm talking about.

I think those are not GP2X specific questions and are answered all over the web...
Why put it in the wiki, as the people who are supposed to be using the instructions are supopsed to do basic things like this, to be able to benefit from it?

It's like when you're in carpenter school, and they tell you to use a hammer of a specific type to nail in a nail of a specific size in a block of wood. You're not supposed to have to ask 'ehm, excuse me, what are these funny looking scribblies on the jars with nails in them?' when you see the sizes written on the jars. Or, 'Eh I got the jar with the symbol you told me meant 'size six', how do I open a jar?' You'd be kicked out of carpenter school, and told to go have a basic education, then come back, even if you had a lot of talent for carpenting. Carpenting schools are not there to learn you how to read or open a jar.

Anyway, here's some more instructions, hopefully you can figure it out now:
open up hypertrm, at the new conenction prompt, type a dummy name, like asdf, press ok, on the next dialogue, set the 'connect using' line to the com-port your gp2x is connected to (in my case com5, if you can't figure this out, (which would be the equivalent of having to ask 'what is a hammer, and which side do I hold it?)), press ok, don't bother messing with the speed settings on the next dialogue, just press ok again.


P.
 
Last edited by a moderator:

Puck2099

Certified Guru
Joined
Oct 22, 2004
Messages
422
Location
Madrid, Spain
Website
www.gp32wip.com
I'm making a configuration to add USB serial support to my Gentoo kernel, I have read Mindstab.net guide where it says that I must have the usbserial and cdc_acm modules loaded, but I don't know if I have the correct modules in my kernel.

Making the "make menuconfig" I have find the following options:

- USB Serial Converter Support
- USB Generic Serial Driver
- Serial Gadget (with CDC ACM support)

Are they the ones I need? :unsure:

Thanks a lot :)
 

BradN

Member
Joined
Jun 22, 2003
Messages
577
Puck2099, in general there's no harm in just compiling all the possible drivers in, and you can often find which one actually picks up the device if you run "dmesg" after you connect it :)
 

taras

Mega Pandora mania
Joined
Jun 17, 2003
Messages
934
Location
Scotland
Website
taras.net
Thanks for the reply, luteijn. Unfortuantely, I can't select COM5 or whatever because it doesn't show up in HyperTerminal, hence my confusion...

In reply to your stuff which can basically be summed up as: "Why are you asking stupid questions, moron? Why haven't you learned everything already?" - the answer is because this is me learning now. I'd rather not go out and buy HyperTerminal for Dummies because I have better things to do with my time - I only treat computing as a hobby, you see.

edit: it wasn't showing up because my 2X wasn't being detected by the computer. A reboot solved this...

edit again..

Can't be bothered learning to dev for the gp2x actually, it's so much more difficult (to me anyway) than the gp32 that it's not worth it. time to play tetris again.
 

timbobsteve

Member
Joined
Oct 4, 2005
Messages
301
Puck2099:

Can you use the standard 2.6 / 2.4 versions of those modules or do we have to download some modified source to get these modules working with 2X?

I am currently building a distro for deving on the 2X and would love to know how to add USB Serial Support to the kernel.
 

CyberAxe

Member
Joined
Nov 18, 2005
Messages
206
how do you do stuff like copy rename and so forth files? the linux commands are alien to this die hard DOS user

anyone got a list of the available commands and their dos/cmdprompt counterparts?
 

BBTroll

Member
Joined
Sep 30, 2005
Messages
160
DOS -> Unix/Linux

dir -> ls
cd -> cd
cd.. -> cd .. (note the space)
del -> rm
copy -> cp
move -> mv
rename -> use mv
cls -> clear
/? (the help dialog) -> -h , -help, or --help

Just remember that Unix people are lazy, and have removed the vowels from most commands.

Stuff to remember:

Tab will auto-complete any excecutable in your path or file/folders.

Your current directory is not part of your path. If you want to run an excecutable in the current directory use ./excecutable.

Files don't have to be named .exe or .gpe to be excecutables.

*.* will not select all files. * will.

edit: added more stuff
 

gfoot

Member
Joined
Nov 15, 2005
Messages
218
Edit: I wouldn't actually recommend using aliases, because you'll probably just find it more confusing as the options to the commands are different anyway. But still...

If you want to add aliases, make a file on your sd in the directory you start in, to act as a kind of script, and add the aliases there. The traditional name for this is .profile.

Code:
alias dir='ls -l'
alias move=mv
alias copy=cp
...
export PS1='\w> '

Then you need bash to source the file - either do it by hand after starting bash, with either "source .profile" or, shorter, ". .profile" (note the space). Or add it to the bash command line in the script you're running to start bash in the first place - I guess you can use either the --rcfile or --init-file options to bash, e.g.:

Code:
bash --init-file /mnt/sd/.profile < /dev/ttygs0 > /dev/ttygs0 2>&1

It's probably better to just make /mnt/sd be your home directory though, which is a good thing for quite a lot of reasons:

Code:
export HOME=/mnt/sd
bash -l < /dev/ttygs0 > /dev/ttygs0 2>&1

Then bash should automatically source the file, as this is how normal Unix logins work. Note the -l option I added to the bash line - not sure if it's needed or not.

I'm afraid I haven't tested any of this though, I don't have my gp2x with me at the moment.
 

CyberAxe

Member
Joined
Nov 18, 2005
Messages
206
i'm using the
Code:
bash --init-file /mnt/sd/.profile < /dev/ttygs0 > /dev/ttygs0 2>&1
method since it allows me to use one script to load to bash and another just to enable usb serial and exit to menu

seems to work perfectly without the -l option

thanks again
 

gfoot

Member
Joined
Nov 15, 2005
Messages
218
OK. I'd strongly recommend setting your home directory to something on the SD card though, as various apps (including bash) will store config data there - e.g. command line history. You don't really want that wasting write cycles on your nand.
 

critical

Certified Guru
Joined
Apr 4, 2005
Messages
666
Website
www.handheldhacker.com
Thank you so much for providing this, gfoot. It prevented many hours of banging my head against a brick wall yesterday... you just can't beat printf() to the console (except gdb, of course).
 

jan_europa

Still Fresh
Joined
Dec 2, 2005
Messages
17
OK. I'd strongly recommend setting your home directory to something on the SD card though, as various apps (including bash) will store config data there - e.g. command line history. You don't really want that wasting write cycles on your nand

what would be the best method?

something like $HOME=/mnt/sd/whatever/

but, in a self-made script or where...

I think GP2X linux create / points to a $HOME directory...but...I really
don't know and I trying to compile a port that include that variable
 

luteijn

Member
Joined
Dec 23, 2005
Messages
253
Age
47
Location
The Hague, NL
Website
luteijn.xs4all.nl
critical posted on Feb 13 2006 at 11:15 AM said:
you just can't beat printf() to the console (except gdb, of course).

Which I hope you're using now that you got the serial connection working...

P.
 
Last edited by a moderator:

techFreak

Member
Joined
Dec 10, 2005
Messages
487
Location
Istanbul, TR
Website
Visit site
I'm sorry guys, I'm to busy to read all 58 post. Is this about Serial Connection over USB? If so I did my setup it works fine on WinXP with HyperTerminal... I also got ZModem working but it's soo soo slow. It takes 2 mins to send 8K. Am I doin something wrong or totaly in the wrong topic?
 

gfoot

Member
Joined
Nov 15, 2005
Messages
218
There do seem to be speed issues at the moment - others in other threads have had varying speeds with zmodem. I've been doing my testing by connecting directly using libusb to send data from the host, and the best I can do is about 50 kilobytes per second, by throttling the host and sending 512-byte packets. If I try to send the packets more frequently, they get corrupted en route. So it might be worth reducing the data rate in hyperterminal - maybe you're flooding the link.
 
Top