Menu

Raspberry Pi sees no serial ports

mwhalen
2015-12-30
2016-01-05
  • mwhalen

    mwhalen - 2015-12-30

    I have a Raspberry Pi 2 (the one with four USB ports) and I haven't been able to get ADTPro 2.0.x (0 or 1) to see any serial ports. I'm using a no-name USB/Serial adapter that I have used in the past without issue on this same Pi, so I don't have any reason to believe it's not working now.

    I'm using Ivan's Raspple II.

    [ 1133.823035] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
    [ 1133.925931] usb 1-1.5: New USB device found, idVendor=067b, idProduct=2303
    [ 1133.925955] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 1133.925973] usb 1-1.5: Product: USB-Serial Controller
    [ 1133.925990] usb 1-1.5: Manufacturer: Prolific Technology Inc.
    [ 1133.927584] pl2303 1-1.5:1.0: pl2303 converter detected
    [ 1133.932245] usb 1-1.5: pl2303 converter now attached to ttyUSB0
    

    I notice in startup script there is a check for USB/Serial devices and I am not getting the error listed in the script.

    The pull-down setup Serial shows no ports and clicking connect produces an error:

    http://i.imgur.com/xdjIzgF.png

    Any thoughts?

     
  • mwhalen

    mwhalen - 2015-12-31

    I've made progress.

    I had to take a detour due to some shenanigans that happened at SourceForge exactly when I ran a2cloud-update last night but I finally got a working ADTPro. I was still back at the same situation, though, no serial ports in the list.

    I’ve since discovered the headless options. If I run:

    $ adtpro.sh headless serial ttyUSB0

    Then ADTPro runs without issue. I've made a disk successfully!

    Looking at the script for ADTPro, it would seem that the conditions miss the possibility of finding one on ttyUSB*.

    FWIW: I am running a Raspberry Pi 2. My USB/Serial adapter is a no-name, but it’s using a PL2303 chipset and it works. I’ve also tested adding an elif and putting /dev/ttyUSB0 in there (IOW, directly specifying my port).

    if [[ $1 == "serial" ]]; then
            if [[ $2 ]]; then
                serialPortName="$2"
                [[ ${serialPortName:0:5} == "/dev/" ]] && serialPortName=${serialPortName:5}
                if [[ ! -c /dev/$serialPortName ]]; then
                    echo "Serial port $serialPortName not found." 1>&2
                    usageExit
                fi
            elif [[ -c /dev/ttyUSBlower ]]; then
                serialPortName=ttyUSBlower
            elif [[ $(ls -1 /dev/ttyUSBlower_hub* 2> /dev/null | wc -l) -gt 0 ]]; then
                serialPortName=$(ls -1 /dev/ttyUSBlower_hub* 2> /dev/null | head -1 | cut -c 6-)
            elif [[ $(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | wc -l) -gt 1 ]]; then
                serialPortName=$(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | head -1 | cat -c 6-)
            else
                echo "No eligible USB-to-serial adapter found." 1>&2
    
     

    Last edit: mwhalen 2015-12-31
  • David Schmidt

    David Schmidt - 2016-01-02

    Glad to hear you got it worked out. But where does the shell script come from that you modified? Is it mine, or is it Ivan's?

     
    • mwhalen

      mwhalen - 2016-01-03

      I ... uh ... don't know? It's the adtpro.sh I referenced above.

      /usr/local/adtpro/adtpro.sh

      Looking at the entire script, it seems to be more geared toward processing any headless options that may be entered at the command-line, figuring out the OS on which the user is running the script, and making appropriate adjustments. However, since running adtpro.sh without arguments launches the GUI in an open x-session, it must also launch the GUI.

      I'm not adept at reading BASH scripts so much, so I don't completely understand what it's doing. (I think I'd really have to figure out the variables and then how the program itself is launched not to mention what some of the utilities are doing therein.)

      Anyway, I am curious why the serial ports don't show up in the GUI. Have any ideas on that? Now that I have it running headless, I am more curious than in need of a solution. As mentioned before, I run the same script to launch the GUI as I do the headless options.

      Cheers,

      Mike...

       
  • David Schmidt

    David Schmidt - 2016-01-05

    Well, I ask because I don't recognize the code... I suspect it's part of the A2CLOUD component of Raspple II. We may need IvanX to weigh in here. I don't regularly use Pi machines, so I'd need another set of eyes to debug the script you're using.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.