I have a model 3 that for the past few months I have been using as an Arduino programmer. The Arduino Uno has been connected to the Pi and reading temperatures and then sending the data serially to the Pi which (using a Python program) commits the data to a MySQL database. It has worked fine.
I decided that it was time to connect a hard drive so that the database does not have to be stored on the SD card. I could not get the HD to show up (in the dmesg) until I unhooked the Arduino. Then the HD showed up (as /dev/sda) and I was able to mount it (as /mnt/hd). That worked fine.
Now I cannot get the Arduino to work. With or without the HD connected there is no /dev/ttyUSB0 that the Arduino used to be connected to. Also in the Arduino IDE the select serial port is greyed out.
What do I need to do to get both devices working?
Thanks,
JP.
Re: USB Issues, HD, Arduino
Well, the hard drive is working just fine mounted at /mnt/hd.
So, I guess the problem is now reduced to how do I get a serial port (was ttyUSB0 before this adventure began) working so that I can program Arduino and transmit data serially as before?
So, I guess the problem is now reduced to how do I get a serial port (was ttyUSB0 before this adventure began) working so that I can program Arduino and transmit data serially as before?
- DougieLawson
- Posts: 42217
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: USB Issues, HD, Arduino
What's the format on the HD filesystem?
If it's not ext4 then reformat it as ext4. Because otherwise you WILL get troubles with MySQL file locking and Linux security.
Get the blkid with sudo blkid /dev/sda
Add a line item in /etc/fstabso that it mounts at a known mount point during boot up. We're using blkid as that means it doesn't matter if the drive appears as /dev/sda1, /dev/sdb1 or even /dev/sdq1, it will still mount.
If it's not ext4 then reformat it as ext4. Because otherwise you WILL get troubles with MySQL file locking and Linux security.
Get the blkid with sudo blkid /dev/sda
Add a line item in /etc/fstab
Code: Select all
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /srv ext4 defaults,noatime 0 1
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: USB Issues, HD, Arduino
Do an :
ls /dev
in a terminal.
I've just plugged in an Arduino and it lists as
ttyACM0
Maybe the assignments have changed for you.
Do an ls before inserting the Arduino then after and check differences.
ls /dev
in a terminal.
I've just plugged in an Arduino and it lists as
ttyACM0
Maybe the assignments have changed for you.
Do an ls before inserting the Arduino then after and check differences.
Re: USB Issues, HD, Arduino
Drive is formatted ext4 and is now set up as suggested and mounts and works fine.
Nothing changes in the /dev/tty*'s when I boot with Arduino connected vs without.
And I have just noticed that with the UUID... in fstab and no hd connected the RPi will not boot up?
Nothing changes in the /dev/tty*'s when I boot with Arduino connected vs without.
And I have just noticed that with the UUID... in fstab and no hd connected the RPi will not boot up?
- DougieLawson
- Posts: 42217
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: USB Issues, HD, Arduino
Unplug your arduino, plug it back in then look at dmesg you should see something likewhich is from my Chinese clone Nano.
Or something likewhich is from my Uno.
Code: Select all
[ 8925.584948] usb 1-1.2.4: USB disconnect, device number 6
[ 8925.587997] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 8925.588175] ch341 1-1.2.4:1.0: device disconnected
[ 8930.909438] usb 1-1.2.4: new full-speed USB device number 7 using dwc_otg
[ 8931.043130] usb 1-1.2.4: New USB device found, idVendor=1a86, idProduct=7523
[ 8931.043154] usb 1-1.2.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 8931.043165] usb 1-1.2.4: Product: USB2.0-Serial
[ 8931.045425] ch341 1-1.2.4:1.0: ch341-uart converter detected
[ 8931.058910] usb 1-1.2.4: ch341-uart converter now attached to ttyUSB0
Or something like
Code: Select all
[ 8930.139974] usb 1-1.3: USB disconnect, device number 4
[ 8934.272997] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[ 8934.418189] usb 1-1.3: New USB device found, idVendor=2341, idProduct=0001
[ 8934.418214] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 8934.418224] usb 1-1.3: Product: Arduino Uno
[ 8934.418234] usb 1-1.3: Manufacturer: Arduino (www.arduino.cc)
[ 8934.418244] usb 1-1.3: SerialNumber: 64935343633351C06280
[ 8934.436224] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: USB Issues, HD, Arduino
All is working now, thanks guys.
This is kind of embarrassing, I had a bad USB cable. Funny thing is that it worked with the HD but not the UNO. It was brand new right out of the bag, but from you know where.
Thanks again,
JP.
This is kind of embarrassing, I had a bad USB cable. Funny thing is that it worked with the HD but not the UNO. It was brand new right out of the bag, but from you know where.
Thanks again,
JP.