Welcome, Guest

Author Topic: usb-serial cable : how to connect nootbok  (Read 10726 times)

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
usb-serial cable : how to connect nootbok
« on: September 29, 2012, 07:21:03 PM »
EDIT:

Hello

i have a notebook and olinuxino-micro without ethernet (no network access) and this cable usb-serial :


I buy original sdcard (archlinux), i plug usb cable on GND/RX/TX.

At the first time power on, how can i remote olinuxino via ssh (or other) ?

I have not found tutorial and i can't use video cinch (RCA)

thanks
« Last Edit: September 29, 2012, 07:29:39 PM by Oclistediscussion »

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #1 on: September 29, 2012, 07:42:30 PM »
Add :

i'm user of ssh and debian. I know use it.

I don't know just how remote.

i must modify sdcard, install ssh (rootfs...) ?

thanks





dpwhittaker

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #2 on: September 29, 2012, 08:02:30 PM »
You have pictured a usb-serial-m (male pins), but I hope you actually have a usb-serial-f (female headers), which you have plugged into the pins next to the power supply (red-RX, green-TX, blue-GND).  If you do actually have the usb-serial-m, you can plug it into CON2 (RCA side, RCA end = pin 1), pins 4 (blue-GND), 13 (red-RX), and 14 (green-TX).

Once you get that set up, you need a serial terminal emulator.  If your notebook runs linux, I recommend picocom.  minicom is often recommended, but it doesn't handle full-screen apps like nano and vi well, so its difficult to work with.  picocom is a little less user friendly, but works like a charm.

I use:

picocom -b 115200 -d 8 -p n --send-cmd "sz -y" --receive-cmd "rz -y" /dev/ttyUSB0

This says, connect to ttyUSB0, at 115200 bps, 8 data bits, no parity.  Set your send command to sz -y and your receive command to rz -y.

This lets you see what is coming from DUART pins.  This also gives you the ability to transfer files from your computer to the olinuxino.  Simply type in "rz" at the command prompt after you've logged in and changed to the directory you want the file to go, then hold down Ctrl and hit A, then S.  It will ask you for a file from your notebook.  Type in the path (relative to whatever directory you were in before you started the picocom session, or absolute, i.e. /home/yourlogin/yourfile), and hit enter.  sz on your local computer then takes over the link and sends the file to rz on the olinuxino, which then saves it to your current directory, with the same name as the file had on your local machine, overwriting if it is already there (leave of -y if you don't want this to be the default behavior).  You can use rz -y on the olinuxino only when you want to overwrite if you leave the -y off the sz command in your picocom command line.

To make this easier, I use:

alias microcom='picocom -b 115200 -d 8 -p n --send-cmd "sz -y" --receive-cmd "rz -y" /dev/ttyUSB0'

Put this line at the bottom of your ~/.bashrc file, and you can just run "microcom" from the command line to instantly connect to your olinuxino.

If you use windows, you'll have to use a program like putty.  It has a serial configuration option, use 115200, 8 data bits, no parity, 1 stop bit in its configuration.  I'm not sure if there is any equivalent to ZMODEM file transfers with putty.

Eventually, you'll want to get a WIFI dongle to give the micro more connectivity options, the ability to download more packages, etc.  Then you would be able to use more standard communication practices like SSH and FTP.  Until then, though, the above practices will get you started.

EDIT: You probably don't have picocom and rz/sz installed on your notebook.  Since you are a debian user, you can just:

sudo apt-get install picocom lrzsz

to grab it, then proceed with the instructions above.

To get rz/sz on your olinuxino, download the package from mirror.archlinuxarm.org:

http://mirror.archlinuxarm.org/arm/community/lrzsz-0.12.20-4-arm.pkg.tar.xz

Then copy this file somewhere on the SD card.  Plug in the SD Card to the olinuxino, then when you boot and get logged in through picocom, cd to the folder where you put it, and use pacman to install it:

pacman -U lrzsz-0.12.20-4-arm.pkg.tar.xz
« Last Edit: September 29, 2012, 08:13:39 PM by dpwhittaker »

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #3 on: September 29, 2012, 10:10:20 PM »
You have pictured a usb-serial-m (male pins), but I hope you actually have a usb-serial-f (female headers), which you have plugged into the pins next to the power supply (red-RX, green-TX, blue-GND).  If you do actually have the usb-serial-m, you can plug it into CON2 (RCA side, RCA end = pin 1), pins 4 (blue-GND), 13 (red-RX), and 14 (green-TX).

Thanks a lot, i've got usb-serial-m and i plug like usb-serial-m.
With pins 4, 13, 14 thak work fine.


Quote

Once you get that set up, you need a serial terminal emulator.  If your notebook runs linux, I recommend picocom.  minicom is often recommended, but it doesn't handle full-screen apps like nano and vi well, so its difficult to work with.  picocom is a little less user friendly, but works like a charm.

I use:

picocom -b 115200 -d 8 -p n --send-cmd "sz -y" --receive-cmd "rz -y" /dev/ttyUSB0

This says, connect to ttyUSB0, at 115200 bps, 8 data bits, no parity.  Set your send command to sz -y and your receive command to rz -y.


115200 is the maximum ? If yes -> i'll do ssh via ethernet usb adaptator because i put all sources (c++, php) on local networks at home for save the flash/sdcard.


Quote

This lets you see what is coming from DUART pins.  This also gives you the ability to transfer files from your computer to the olinuxino.  Simply type in "rz" at the command prompt after you've logged in and changed to the directory you want the file to go, then hold down Ctrl and hit A, then S.  It will ask you for a file from your notebook.  Type in the path (relative to whatever directory you were in before you started the picocom session, or absolute, i.e. /home/yourlogin/yourfile), and hit enter.  sz on your local computer then takes over the link and sends the file to rz on the olinuxino, which then saves it to your current directory, with the same name as the file had on your local machine, overwriting if it is already there (leave of -y if you don't want this to be the default behavior).  You can use rz -y on the olinuxino only when you want to overwrite if you leave the -y off the sz command in your picocom command line.

To make this easier, I use:

alias microcom='picocom -b 115200 -d 8 -p n --send-cmd "sz -y" --receive-cmd "rz -y" /dev/ttyUSB0'

Put this line at the bottom of your ~/.bashrc file, and you can just run "microcom" from the command line to instantly connect to your olinuxino.


I know bashrc and other alias. But thanks for other beginners.

Quote

If you use windows, you'll have to use a program like putty.  It has a serial configuration option, use 115200, 8 data bits, no parity, 1 stop bit in its configuration.  I'm not sure if there is any equivalent to ZMODEM file transfers with putty.

Eventually, you'll want to get a WIFI dongle to give the micro more connectivity options, the ability to download more packages, etc.  Then you would be able to use more standard communication practices like SSH and FTP.  Until then, though, the above practices will get you started.

EDIT: You probably don't have picocom and rz/sz installed on your notebook.  Since you are a debian user, you can just:

sudo apt-get install picocom lrzsz

to grab it, then proceed with the instructions above.

To get rz/sz on your olinuxino, download the package from mirror.archlinuxarm.org:

http://mirror.archlinuxarm.org/arm/community/lrzsz-0.12.20-4-arm.pkg.tar.xz

Then copy this file somewhere on the SD card.  Plug in the SD Card to the olinuxino, then when you boot and get logged in through picocom, cd to the folder where you put it, and use pacman to install it:

pacman -U lrzsz-0.12.20-4-arm.pkg.tar.xz

thanks.

dpwhittaker

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #4 on: September 29, 2012, 10:59:39 PM »
115200 is the maximum ? If yes -> i'll do ssh via ethernet usb adaptator because i put all sources (c++, php) on local networks at home for save the flash/sdcard.

Yes, 115200 is the fastest you can get out of the serial port.  If you've got an ethernet or wifi usb adapter, either of those will be much faster.  You'll probably have to use the usb-serial cable to configure the system to use those, but then you'll have a much better overall connection.  The difficulty with most usb-ethernet adapters right now is finding a stable driver for them.  Let us know if you get yours working.

I know bashrc and other alias. But thanks for other beginners.

Yeah, this forum is the closest thing we have to a working wiki right now, so I'm trying to write down everything so it will be easy to copy into the wiki later once it gets up and running.

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #5 on: September 30, 2012, 12:52:27 AM »
115200 is the maximum ? If yes -> i'll do ssh via ethernet usb adaptator because i put all sources (c++, php) on local networks at home for save the flash/sdcard.

Yes, 115200 is the fastest you can get out of the serial port.  If you've got an ethernet or wifi usb adapter, either of those will be much faster.  You'll probably have to use the usb-serial cable to configure the system to use those, but then you'll have a much better overall connection.  The difficulty with most usb-ethernet adapters right now is finding a stable driver for them.  Let us know if you get yours working.


I don't know if my usb-ethernet works. Next week i'll work on it if i got the time. Now i work with serial port.
the best issue is olimex sold a usb-ethernet 100% compatible.

For info a lsusb :
Bus 001 Device 002: ID 9710:7830 MosChip Semiconductor MCS7830 10/100 Mbps Ethernet adapter



« Last Edit: September 30, 2012, 12:56:14 AM by Oclistediscussion »

dpwhittaker

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #6 on: September 30, 2012, 02:02:37 AM »
Linux does support that chipset, but it is not included in the standard kernel.  How do you feel about compiling your own kernel?

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #7 on: September 30, 2012, 10:18:28 AM »
Linux does support that chipset, but it is not included in the standard kernel.  How do you feel about compiling your own kernel?

Never compile anything.
The bester solution is to buy a usb-ethernet with a chip include in kernel (in france or europa web marchand)



Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #8 on: October 02, 2012, 10:24:46 PM »
Linux does support that chipset, but it is not included in the standard kernel.  How do you feel about compiling your own kernel?

I will load this module but i not founded MCS7830 in http://mirror.archlinuxarm.org/arm/

i suppose i need to recompile and activate module ?

I prepare a virtualmachine for do that :
http://olimex.wordpress.com/2012/07/05/building-debian-linux-distribution-for-imx233-olinuxino/






dpwhittaker

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #9 on: October 03, 2012, 05:57:24 AM »
Actually, the packages on mirror.archlinuxarm.org/arm are already binary packages.  They get installed directly to your modules folder, so you should be able to pacman -U package.pkg.tar.xz, plug in a MCS7830 adapter, and it just work.

Oclistediscussion

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: usb-serial cable : how to connect nootbok
« Reply #10 on: December 05, 2012, 10:23:49 PM »
Actually, the packages on mirror.archlinuxarm.org/arm are already binary packages.  They get installed directly to your modules folder, so you should be able to pacman -U package.pkg.tar.xz, plug in a MCS7830 adapter, and it just work.

Sorry, but i don't find the package with MCS7830
I download all .db.tar.gz and no "mcs" inside