Pages: [1] 2 3   Go Down
Author Topic: Arduino not ready on startup (ubuntu)  (Read 2092 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi,

ich have a problem with my arduino. i have a web server and connected both together. it´s work but when i restart i must disconnect and connect them from the usb port. how can i solve this problem?

Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i have a web server and connected both together. it´s work but when i restart i must disconnect and connect them from the usb port.

Restart which? The server or the Arduino? Be more specific about the server.

You should post your code. My crystal ball is in the shop for repairs.  smiley-wink
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry for that smiley-razz

i have a ubuntu 10.11 running on the server. my problem is that the connection between arduino and ubuntu doesn´t exist, if i reboot the system. i must reconnect the arduino manualy by hand (from usb port) to get the USB0 device back.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i have a ubuntu 10.11 running on the server. my problem is that the connection between arduino and ubuntu doesn´t exist, if i reboot the system.
Reboot what system? The Ubuntu server? That will break any connections with the server. If you are connected when that happens ( I test by pulling the ethernet cable out on a large download), you will probably lock in the "while(client.connected())" loop. I can probably help you with that.

Are you using a persistent connection? Or just a port 80 web server?

You might want to try this code. It downloads Google home page every 10 seconds.
http://arduino.cc/forum/index.php/topic,99629.msg754629.html#msg754629
If you get about halfway through the download and pull the ethernet cable out, it will freeze. If you read this post, there is a fix for that type freeze.
http://arduino.cc/forum/index.php/topic,102879.msg778413.html#msg778413
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sry for my english if you dont understand me but what i mean is not the connection between the internet and my arduino. What I mean is that ubuntu does not recognize my arduino when I booted up again. if i pull out and hook up again than ubuntu recognize it. I want that ubuntu recognizes this board automatically.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What I mean is that ubuntu does not recognize my arduino when I booted up again.
Is the Ubuntu server also connected to the usb port of the Arduino? Is that what you mean? When you reboot the Ubuntu server (that also connects to the usb port of the Arduino), the usb connection is broken?

If you mean as an ethernet connection, why should the Ubuntu server recognize it? If you reboot the server, it will terminate all connections. If your Arduino code can't handle that by closing the stale connection and reconnecting when the server is restarted, then that is a personal programming problem. Maybe, as I suggested a few posts ago, you should post your code.
Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sry for my english if you dont understand me but what i mean is not the connection between the internet and my arduino. What I mean is that ubuntu does not recognize my arduino when I booted up again. if i pull out and hook up again than ubuntu recognize it. I want that ubuntu recognizes this board automatically.

Is the Arduino not listed if you run lsusb?
..or is it just assigned another device name like /dev/ttyUSB1 instead of /dev/ttyUSB0 or whatever it was before the reboot?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i think it´s not listed but i will look when I get back from school. thats what i´m talking about smiley-razz
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is what i get:

Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

but i can´t see the port USB0 in the arduino ide only if i reconnect the usb
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5367
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should look in the "dev" directory. You should see a listing of all the serial devices. Look in there and see if the listing changes when you lose contact. It will be a tty entry. The Mega shows ttyACM0 (or sometimes ttyACM1 if I disconnect and reconnect it too fast).

Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check if the serial port has been detected by the system after reboot:
Code:
ls /dev/ttyUSB*

if not, do you get any errors in /var/log/dmesg during boot?
Since your system detects the device you should have some information from when it installs the device.
Try searching dmesg for FTDI
« Last Edit: May 07, 2012, 01:44:25 pm by perhof » Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Mega shows ttyACM0 (or sometimes ttyACM1 if I disconnect and reconnect it too fast).

The FT232 based boards show up as ttyUSB0, ttyUSB1 etc but just as the Atmega8U2 boards they will change number if you re-plug it before the old one has been fully deleted.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[   19.393632] usbcore: registered new interface driver usbserial
[   19.393766] USB Serial support registered for generic
[   19.394022] usbcore: registered new interface driver usbserial_generic
[   19.394030] usbserial: USB Serial Driver core
[   19.407334] USB Serial support registered for FTDI USB Serial Device
[   19.407499] ftdi_sio 5-2:1.0: FTDI USB Serial Device converter detected
[   19.407648] usb 5-2: Detected FT232RL
[   19.407654] usb 5-2: Number of endpoints 2
[   19.407660] usb 5-2: Endpoint 1 MaxPacketSize 64
[   19.407665] usb 5-2: Endpoint 2 MaxPacketSize 64
[   19.407671] usb 5-2: Setting MaxPacketSize 64
[   19.410980] usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB0
[   19.411044] usbcore: registered new interface driver ftdi_sio
[   19.411051] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver


this is what i get
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

but nothing on arudino ide only if i reconnected it
Logged

Värmland, Sweden
Offline Offline
Sr. Member
****
Karma: 9
Posts: 261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's looking good. And that's from the reboot?
Logged

Pages: [1] 2 3   Go Up
Jump to: