Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » ADTPro Serial Connection in Linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
ADTPro Serial Connection in Linux [message #386066] Thu, 15 August 2019 20:33 Go to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
Hopefully someone here can help me. I want to use ADTPro over a serial connection under Manjaro Linux (Arch based). However ADTPro says it can't see any serial ports when I try. Does anyone know what commands and permissions I need to use serial under Manjaro?
Re: ADTPro Serial Connection in Linux [message #386067 is a reply to message #386066] Thu, 15 August 2019 20:55 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
> Hopefully someone here can help me. I want to use ADTPro over a serial connection under Manjaro Linux (Arch based). However ADTPro says it can't see any serial ports when I try. Does anyone know what commands and permissions I need to use serial under Manjaro?

It could be that you don't have permissions on the /dev/ttyXX device (probably /dev/ttyUSB0). I usually just run the ADTPro server as root using sudo.. I could probably fix this in a more elegant way though :)
Re: ADTPro Serial Connection in Linux [message #386068 is a reply to message #386067] Thu, 15 August 2019 21:01 Go to previous messageGo to next message
Tom Lake is currently offline  Tom Lake
Messages: 429
Registered: May 2012
Karma: 0
Senior Member
On Thursday, August 15, 2019 at 8:55:14 PM UTC-4, Bobbi wrote:
> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>> Hopefully someone here can help me. I want to use ADTPro over a serial connection under Manjaro Linux (Arch based). However ADTPro says it can't see any serial ports when I try. Does anyone know what commands and permissions I need to use serial under Manjaro?
>
> It could be that you don't have permissions on the /dev/ttyXX device (probably /dev/ttyUSB0). I usually just run the ADTPro server as root using sudo. I could probably fix this in a more elegant way though :)

Maybe

sudo chmod 666 /dev/ttyS0

Tom L
Re: ADTPro Serial Connection in Linux [message #386069 is a reply to message #386068] Thu, 15 August 2019 21:02 Go to previous messageGo to next message
Tom Lake is currently offline  Tom Lake
Messages: 429
Registered: May 2012
Karma: 0
Senior Member
On Thursday, August 15, 2019 at 9:01:09 PM UTC-4, Tom Lake wrote:
> On Thursday, August 15, 2019 at 8:55:14 PM UTC-4, Bobbi wrote:
>> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>>> Hopefully someone here can help me. I want to use ADTPro over a serial connection under Manjaro Linux (Arch based). However ADTPro says it can't see any serial ports when I try. Does anyone know what commands and permissions I need to use serial under Manjaro?
>>
>> It could be that you don't have permissions on the /dev/ttyXX device (probably /dev/ttyUSB0). I usually just run the ADTPro server as root using sudo. I could probably fix this in a more elegant way though :)
>
> Maybe
>
> sudo chmod 666 /dev/ttyS0
>
> Tom L

Or in your case

sudo chmod 666 /dev/ttyUSB0
Re: ADTPro Serial Connection in Linux [message #386072 is a reply to message #386069] Thu, 15 August 2019 22:38 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
Why usb0 and not ttyS0?
Re: ADTPro Serial Connection in Linux [message #386076 is a reply to message #386072] Fri, 16 August 2019 01:22 Go to previous messageGo to next message
Tom Lake is currently offline  Tom Lake
Messages: 429
Registered: May 2012
Karma: 0
Senior Member
On Thursday, August 15, 2019 at 10:38:48 PM UTC-4, Tempest wrote:
> Why usb0 and not ttyS0?

If you're using a USB to RS232 converter, it usually shows up as ttyUSB rather than ttyS

Tom L
Re: ADTPro Serial Connection in Linux [message #386079 is a reply to message #386066] Fri, 16 August 2019 02:11 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Greg Wildman

On Thu, 2019-08-15 at 17:33 -0700, Tempest wrote:
> Hopefully someone here can help me. I want to use ADTPro over a
> serial connection under Manjaro Linux (Arch based). However ADTPro
> says it can't see any serial ports when I try. Does anyone know what
> commands and permissions I need to use serial under Manjaro?

Not sure about Manjaro, but on the flavours I usually work with all is
needed is to be a member of the 'dialout' group. E.g.

usermod -a G dialout <your_username>

You can check to see what group your serial ports are in

ls -l /dev/ttyS* /dev/ttyUSB*

Dynamically added ports, like USB to serial cables, will also have
entries under /dev/serial. Helps when there are multilple and you want
to see which one is which.

steve@apple2:~$ ls -l /dev/serial/by-id
lrwxrwxrwx 1 root root 13 2019-08-16 18:10 usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port 0 -> ../../ttyUSB0

This tells me my USB to serial cable is plugged into /dev/ttyUSB0.

--
Greg
Re: ADTPro Serial Connection in Linux [message #386080 is a reply to message #386079] Fri, 16 August 2019 07:07 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
I actually have a serial port card for my computer. It's not usb.
Re: ADTPro Serial Connection in Linux [message #386081 is a reply to message #386080] Fri, 16 August 2019 07:38 Go to previous messageGo to next message
Tom Lake is currently offline  Tom Lake
Messages: 429
Registered: May 2012
Karma: 0
Senior Member
On Friday, August 16, 2019 at 7:07:41 AM UTC-4, Tempest wrote:
> I actually have a serial port card for my computer. It's not usb.

OK, then in that case it would be /dev/ttyS0.
I thought you had a converter.

Tom L
Re: ADTPro Serial Connection in Linux [message #386083 is a reply to message #386081] Fri, 16 August 2019 09:03 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
On Friday, August 16, 2019 at 7:38:11 AM UTC-4, Tom Lake wrote:
> On Friday, August 16, 2019 at 7:07:41 AM UTC-4, Tempest wrote:
>> I actually have a serial port card for my computer. It's not usb.
>
> OK, then in that case it would be /dev/ttyS0.
> I thought you had a converter.
>
> Tom L

Nah, I go full old school. Two serial ports and a parallel port. Comes in handy more often then you'd think.

ttyS0 has full RW permissions for everyone and I added my ID to the UUCP group (Arch's version of Dialout, although I made and added myself to Dialout too just in case). Still nothing. It works fine with Windows so maybe Linux just isn't seeing the card for some reason?
Re: ADTPro Serial Connection in Linux [message #386084 is a reply to message #386083] Fri, 16 August 2019 09:07 Go to previous messageGo to next message
David Schmidt is currently offline  David Schmidt
Messages: 890
Registered: October 2012
Karma: 0
Senior Member
On 8/16/19 9:03 AM, Tempest wrote:
> [...] Still nothing. It works fine with Windows so maybe Linux just isn't seeing the card for some reason?

The rxtx serial libraries (which are binaries that are specific to a
particular architecture) will be critical to "see" your hardware too. I
haven't heard anything in the thread yet about the output on the window
that starts up the jar - are there any complaints about rxtx? Maybe do
a little debug in the startup script to echo which version it's deciding
to pick up.
Re: ADTPro Serial Connection in Linux [message #386085 is a reply to message #386084] Fri, 16 August 2019 09:37 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
On Friday, August 16, 2019 at 9:07:15 AM UTC-4, schmidtd wrote:
> On 8/16/19 9:03 AM, Tempest wrote:
>> [...] Still nothing. It works fine with Windows so maybe Linux just isn't seeing the card for some reason?
>
> The rxtx serial libraries (which are binaries that are specific to a
> particular architecture) will be critical to "see" your hardware too. I
> haven't heard anything in the thread yet about the output on the window
> that starts up the jar - are there any complaints about rxtx? Maybe do
> a little debug in the startup script to echo which version it's deciding
> to pick up.

Yes it says it rxtx isn't installed. I assume those are available for Arch? I'll have to go install them and try again.
Re: ADTPro Serial Connection in Linux [message #386086 is a reply to message #386085] Fri, 16 August 2019 11:49 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Friday, 16 August 2019 09:37:53 UTC-4, Tempest wrote:
> On Friday, August 16, 2019 at 9:07:15 AM UTC-4, schmidtd wrote:
>> On 8/16/19 9:03 AM, Tempest wrote:
>>> [...] Still nothing. It works fine with Windows so maybe Linux just isn't seeing the card for some reason?
>>
>> The rxtx serial libraries (which are binaries that are specific to a
>> particular architecture) will be critical to "see" your hardware too. I
>> haven't heard anything in the thread yet about the output on the window
>> that starts up the jar - are there any complaints about rxtx? Maybe do
>> a little debug in the startup script to echo which version it's deciding
>> to pick up.
>
> Yes it says it rxtx isn't installed. I assume those are available for Arch? I'll have to go install them and try again.

I think rxrx is packaged with the ADT software, in the lib directory. (I certainly didn't install them as system wide packages on my Ubuntu machine.)

$ ls -l ADTPro-2.0.3/lib/rxtx/
total 12
drwxrwxr-x 2 bmanners bmanners 4096 Aug 4 20:48 ch-rxtx-2.2-20081207-win-x64/
drwxrwxr-x 6 bmanners bmanners 4096 Aug 4 20:48 rxtx-2.1-7-bins-r2/
drwxrwxr-x 10 bmanners bmanners 4096 Aug 4 20:48 rxtx-2.2pre2-local/
Re: ADTPro Serial Connection in Linux [message #386087 is a reply to message #386086] Fri, 16 August 2019 12:01 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
Is there actually an 'install' for ADTPro? I just copied the directory over from a previous Linux installation. Maybe something got missed? I might just delete the directory and re-download it again.

Another issue might be that my serial port isn't ttyS0. As this is a plugin card, it might be assigned to another serial id number. Is there a way to check and see which one it might be assigned to?
Re: ADTPro Serial Connection in Linux [message #386088 is a reply to message #386087] Fri, 16 August 2019 12:20 Go to previous messageGo to next message
David Schmidt is currently offline  David Schmidt
Messages: 890
Registered: October 2012
Karma: 0
Senior Member
On 8/16/19 12:01 PM, Tempest wrote:
> Is there actually an 'install' for ADTPro? I just copied the directory over from a previous Linux installation. Maybe something got missed? I might just delete the directory and re-download it again.

No install - it's just a directory. The RPI lib was added in 2.0.3 if
your version predates that. I have no idea what a 'Manjaro Linux' is,
so I have no idea what architecture it needs for rxtx.

Consider this PR - there is some trouble in selecting the appropriate
rxtx version for "oddbal" Linuxes:
https://github.com/ADTPro/adtpro/pull/74
Re: ADTPro Serial Connection in Linux [message #386089 is a reply to message #386088] Fri, 16 August 2019 12:43 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
Manjaro Linux is just a distro based on ARCH Linux which is one of the major Linux distros out there along with Debian.
Re: ADTPro Serial Connection in Linux [message #386157 is a reply to message #386067] Mon, 19 August 2019 16:07 Go to previous messageGo to next message
scott is currently offline  scott
Messages: 3379
Registered: February 2012
Karma: 0
Senior Member
In article <6ead04fa-9c57-4692-9ea0-39aa5e0621cf@googlegroups.com>,
Bobbi <bobbi.manners@gmail.com> wrote:
> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>> Hopefully someone here can help me. I want to use ADTPro over a serial
>> connection under Manjaro Linux (Arch based). However ADTPro says it
>> can't see any serial ports when I try. Does anyone know what commands
>> and permissions I need to use serial under Manjaro?
>
> It could be that you don't have permissions on the /dev/ttyXX device
> (probably /dev/ttyUSB0). I usually just run the ADTPro server as root
> using sudo. I could probably fix this in a more elegant way though :)

The better solution would be to see to which group your serial ports belong
(uucp is pretty common) and add yourself to that group:

sudo usermod -aG uucp my_username

Log out and log back in. You should now be able to use the serial ports
directly, without needing to use su or sudo.

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?
Re: ADTPro Serial Connection in Linux [message #386158 is a reply to message #386157] Mon, 19 August 2019 16:17 Go to previous messageGo to next message
Tom Lake is currently offline  Tom Lake
Messages: 429
Registered: May 2012
Karma: 0
Senior Member
On Monday, August 19, 2019 at 4:07:24 PM UTC-4, Scott Alfter wrote:
> In article <6ead04fa-9c57-4692-9ea0-39aa5e0621cf@googlegroups.com>,
> Bobbi <bobbi.manners@gmail.com> wrote:
>> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>>> Hopefully someone here can help me. I want to use ADTPro over a serial
>>> connection under Manjaro Linux (Arch based). However ADTPro says it
>>> can't see any serial ports when I try. Does anyone know what commands
>>> and permissions I need to use serial under Manjaro?
>>
>> It could be that you don't have permissions on the /dev/ttyXX device
>> (probably /dev/ttyUSB0). I usually just run the ADTPro server as root
>> using sudo. I could probably fix this in a more elegant way though :)
>
> The better solution would be to see to which group your serial ports belong
> (uucp is pretty common) and add yourself to that group:
>
> sudo usermod -aG uucp my_username
>
> Log out and log back in. You should now be able to use the serial ports
> directly, without needing to use su or sudo.
>
> _/_
> / v \ Scott Alfter (remove the obvious to send mail)
> (IIGS( https://alfter.us/ Top-posting!
> \_^_/ >What's the most annoying thing on Usenet?

How do you find which group the serial ports belong to?

Tom L
Re: ADTPro Serial Connection in Linux [message #386159 is a reply to message #386158] Mon, 19 August 2019 16:22 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Monday, 19 August 2019 16:17:26 UTC-4, Tom Lake wrote:
> On Monday, August 19, 2019 at 4:07:24 PM UTC-4, Scott Alfter wrote:
>> In article <6ead04fa-9c57-4692-9ea0-39aa5e0621cf@googlegroups.com>,
>> Bobbi <bobbi.manners@gmail.com> wrote:
>>> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>>>> Hopefully someone here can help me. I want to use ADTPro over a serial
>>>> connection under Manjaro Linux (Arch based). However ADTPro says it
>>>> can't see any serial ports when I try. Does anyone know what commands
>>>> and permissions I need to use serial under Manjaro?
>>>
>>> It could be that you don't have permissions on the /dev/ttyXX device
>>> (probably /dev/ttyUSB0). I usually just run the ADTPro server as root
>>> using sudo. I could probably fix this in a more elegant way though :)
>>
>> The better solution would be to see to which group your serial ports belong
>> (uucp is pretty common) and add yourself to that group:
>>
>> sudo usermod -aG uucp my_username
>>
>> Log out and log back in. You should now be able to use the serial ports
>> directly, without needing to use su or sudo.
>>
>> _/_
>> / v \ Scott Alfter (remove the obvious to send mail)
>> (IIGS( https://alfter.us/ Top-posting!
>> \_^_/ >What's the most annoying thing on Usenet?
>
> How do you find which group the serial ports belong to?
>
> Tom L

ls -l /dev/tty* and see which group owns them.
Re: ADTPro Serial Connection in Linux [message #386160 is a reply to message #386158] Mon, 19 August 2019 16:26 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
On Monday, August 19, 2019 at 4:17:26 PM UTC-4, Tom Lake wrote:
> On Monday, August 19, 2019 at 4:07:24 PM UTC-4, Scott Alfter wrote:
>> In article <6ead04fa-9c57-4692-9ea0-39aa5e0621cf@googlegroups.com>,
>> Bobbi <bobbi.manners@gmail.com> wrote:
>>> On Thursday, 15 August 2019 20:33:06 UTC-4, Tempest wrote:
>>>> Hopefully someone here can help me. I want to use ADTPro over a serial
>>>> connection under Manjaro Linux (Arch based). However ADTPro says it
>>>> can't see any serial ports when I try. Does anyone know what commands
>>>> and permissions I need to use serial under Manjaro?
>>>
>>> It could be that you don't have permissions on the /dev/ttyXX device
>>> (probably /dev/ttyUSB0). I usually just run the ADTPro server as root
>>> using sudo. I could probably fix this in a more elegant way though :)
>>
>> The better solution would be to see to which group your serial ports belong
>> (uucp is pretty common) and add yourself to that group:
>>
>> sudo usermod -aG uucp my_username
>>
>> Log out and log back in. You should now be able to use the serial ports
>> directly, without needing to use su or sudo.
>>
>> _/_
>> / v \ Scott Alfter (remove the obvious to send mail)
>> (IIGS( https://alfter.us/ Top-posting!
>> \_^_/ >What's the most annoying thing on Usenet?
>
> How do you find which group the serial ports belong to?
>
> Tom L

I've added myself to UUCP and it didn't seem to make any difference. Is that capital G a typo or did I not do the command correctly?
Re: ADTPro Serial Connection in Linux [message #386161 is a reply to message #386158] Mon, 19 August 2019 16:30 Go to previous messageGo to next message
scott is currently offline  scott
Messages: 3379
Registered: February 2012
Karma: 0
Senior Member
In article <35443ae9-7f13-42e1-9fe3-7c927fac67bd@googlegroups.com>,
Tom Lake <tomlake07@gmail.com> wrote:
> On Monday, August 19, 2019 at 4:07:24 PM UTC-4, Scott Alfter wrote:
>> The better solution would be to see to which group your serial ports belong
>> (uucp is pretty common) and add yourself to that group:
>>
>> sudo usermod -aG uucp my_username
>>
>> Log out and log back in. You should now be able to use the serial ports
>> directly, without needing to use su or sudo.
>
> How do you find which group the serial ports belong to?

ls -l /dev/tty*

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?
Re: ADTPro Serial Connection in Linux [message #386162 is a reply to message #386160] Mon, 19 August 2019 16:34 Go to previous messageGo to next message
scott is currently offline  scott
Messages: 3379
Registered: February 2012
Karma: 0
Senior Member
In article <3bbc500e-95a5-4e06-9c63-f6ec3663a9e7@googlegroups.com>,
Tempest <reichert2084@gmail.com> wrote:
> I've added myself to UUCP and it didn't seem to make any difference. Is
> that capital G a typo or did I not do the command correctly?

It's not a typo. Some distros use slightly different commands to manage
users and groups; what I presented works on Gentoo, at least.

Another approach would be to edit /etc/group...find the line starting with
uucp (or whatever group is appropriate) and add your username to the
comma-separated list of usernames at the end of the line. Log out and log
in again. This should work on any system.

_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( https://alfter.us/ Top-posting!
\_^_/ >What's the most annoying thing on Usenet?
Re: ADTPro Serial Connection in Linux [message #386165 is a reply to message #386066] Mon, 19 August 2019 19:29 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
No dice. I'm a member of uucp (the serial group) and I've given full permissions to the serial devices, but ADTPro doesn't seem to see any serial ports.
Re: ADTPro Serial Connection in Linux [message #386176 is a reply to message #386165] Tue, 20 August 2019 00:51 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

On Tuesday, August 20, 2019 at 9:29:58 AM UTC+10, Tempest wrote:
> No dice. I'm a member of uucp (the serial group) and I've given full permissions to the serial devices, but ADTPro doesn't seem to see any serial ports.

Does anything else like minicom see the serial ports?

A
Re: ADTPro Serial Connection in Linux [message #386196 is a reply to message #386176] Tue, 20 August 2019 17:54 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
That's a good idea, I'll try that.
Re: ADTPro Serial Connection in Linux [message #386237 is a reply to message #386176] Thu, 22 August 2019 20:23 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
On Tuesday, August 20, 2019 at 12:51:28 AM UTC-4, Anthony Adverse wrote:
> On Tuesday, August 20, 2019 at 9:29:58 AM UTC+10, Tempest wrote:
>> No dice. I'm a member of uucp (the serial group) and I've given full permissions to the serial devices, but ADTPro doesn't seem to see any serial ports.
>
> Does anything else like minicom see the serial ports?
>
> A

Minicom seems to see them:

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Jun 5 2018, 10:54:41.
Port /dev/ttyS0, 20:18:08


Also

[tempest@ATR8000 ~]$ sudo dmesg | grep tty
[sudo] password for tempest:
[ 0.456770] console [tty0] enabled
[ 4.531303] systemd[1]: Created slice system-getty.slice.
[ 5.388926] 0000:07:00.0: ttyS0 at I/O 0xbf00 (irq = 21, base_baud = 115200) is a 16550A
[ 5.421721] 0000:07:00.0: ttyS1 at I/O 0xbe00 (irq = 21, base_baud = 115200) is a 16550A


So it must be something with ADTPRO. I did install an RXTX package and that didn't seem to help.
Re: ADTPro Serial Connection in Linux [message #386238 is a reply to message #386237] Thu, 22 August 2019 20:55 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Thursday, 22 August 2019 20:23:26 UTC-4, Tempest wrote:
> On Tuesday, August 20, 2019 at 12:51:28 AM UTC-4, Anthony Adverse wrote:
>> On Tuesday, August 20, 2019 at 9:29:58 AM UTC+10, Tempest wrote:
>>> No dice. I'm a member of uucp (the serial group) and I've given full permissions to the serial devices, but ADTPro doesn't seem to see any serial ports.
>>
>> Does anything else like minicom see the serial ports?
>>
>> A
>
> Minicom seems to see them:
>
> Welcome to minicom 2.7.1
>
> OPTIONS: I18n
> Compiled on Jun 5 2018, 10:54:41.
> Port /dev/ttyS0, 20:18:08
>
>
> Also
>
> [tempest@ATR8000 ~]$ sudo dmesg | grep tty
> [sudo] password for tempest:
> [ 0.456770] console [tty0] enabled
> [ 4.531303] systemd[1]: Created slice system-getty.slice.
> [ 5.388926] 0000:07:00.0: ttyS0 at I/O 0xbf00 (irq = 21, base_baud = 115200) is a 16550A
> [ 5.421721] 0000:07:00.0: ttyS1 at I/O 0xbe00 (irq = 21, base_baud = 115200) is a 16550A
>
>
> So it must be something with ADTPRO. I did install an RXTX package and that didn't seem to help.

I find I have to run the ADTPro server as root or it doesn't see the serial ports, even if I have permissions on the /dev/ttyXX device. I have never really investigated why, I just sudo ./adtpro.sh and forget it ;)
Re: ADTPro Serial Connection in Linux [message #386241 is a reply to message #386238] Thu, 22 August 2019 22:56 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
Could it be that easy? I'll give that a shot.
Re: ADTPro Serial Connection in Linux [message #386248 is a reply to message #386238] Fri, 23 August 2019 03:05 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

> I find I have to run the ADTPro server as root or it doesn't see the serial ports, even if I have permissions on the /dev/ttyXX device. I have never really investigated why, I just sudo ./adtpro.sh and forget it ;)

Thats intriguing... ordinarily a chmod 766 or a 777 ought to do the trick.... might depend on how you installed ADTPro and who its user and group are set to though. Rather than just the /dev perms..
Re: ADTPro Serial Connection in Linux [message #386251 is a reply to message #386238] Fri, 23 August 2019 07:16 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
That works! It sees the serial ports. However I see this error now:

>> RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists


Any idea?
Re: ADTPro Serial Connection in Linux [message #386253 is a reply to message #386251] Fri, 23 August 2019 08:54 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

On Friday, August 23, 2019 at 9:16:17 PM UTC+10, Tempest wrote:
> That works! It sees the serial ports. However I see this error now:
>
>>> RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists
>
>
> Any idea?

delete it, unless you have something else using ttyS0... hmmm

ps xfa |grep ttyS0
lsof |grep ttyS0

most likely suspect will be some kind of getty... but if there is nothing deleting the lock file is fine.
Re: ADTPro Serial Connection in Linux [message #386254 is a reply to message #386251] Fri, 23 August 2019 08:57 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

On Friday, August 23, 2019 at 9:16:17 PM UTC+10, Tempest wrote:
> That works! It sees the serial ports. However I see this error now:
>
>>> RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists
>
>
> Any idea?

Seems to have lost my reply, this might be a duplicate...

ps xaf |grep ttyS0
lsof |grep ttyS0

The first will show if a running programme is using ttyS0, and second will tell you if it is open for some reason... if theres no response on either of those commands, just delete the lock file.
Re: ADTPro Serial Connection in Linux [message #386255 is a reply to message #386254] Fri, 23 August 2019 10:13 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Friday, 23 August 2019 08:57:56 UTC-4, Anthony Adverse wrote:
> On Friday, August 23, 2019 at 9:16:17 PM UTC+10, Tempest wrote:
>> That works! It sees the serial ports. However I see this error now:
>>
>>>> RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists
>>
>>
>> Any idea?
>
> Seems to have lost my reply, this might be a duplicate...
>
> ps xaf |grep ttyS0
> lsof |grep ttyS0
>
> The first will show if a running programme is using ttyS0, and second will tell you if it is open for some reason... if theres no response on either of those commands, just delete the lock file.

Glad the sudo thing worked. https://xkcd.com/149/

I should use strace (or ltrace maybe on Linux) to find out why the RXTX lib doesn't seem to find serial ports unless it is run as root. It doesn't seem to be the permissions on the device itself though.
Re: ADTPro Serial Connection in Linux [message #386257 is a reply to message #386255] Fri, 23 August 2019 12:52 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

> I should use strace (or ltrace maybe on Linux) to find out why the RXTX lib doesn't seem to find serial ports unless it is run as root. It doesn't seem to be the permissions on the device itself though.

Whoops. Didn't even think about sudo... so used to just running as root when it gets intensive.

I don't know the RXTX lib, it may be that the permissions on the lib are wrong... what does ls -la give you, who's the owner & group and just what are the permissions?
Re: ADTPro Serial Connection in Linux [message #386259 is a reply to message #386257] Fri, 23 August 2019 13:59 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Friday, 23 August 2019 12:52:46 UTC-4, Anthony Adverse wrote:
>> I should use strace (or ltrace maybe on Linux) to find out why the RXTX lib doesn't seem to find serial ports unless it is run as root. It doesn't seem to be the permissions on the device itself though.
>
> Whoops. Didn't even think about sudo... so used to just running as root when it gets intensive.
>
> I don't know the RXTX lib, it may be that the permissions on the lib are wrong... what does ls -la give you, who's the owner & group and just what are the permissions?

The ownership and permissions on the lib itself should be fine, since these are included as part of the ADTPro installation. It is probably something that RXTX is trying to open (other than the device node.) I may take a look at it later if nothing else comes up. The strace or ltrace tools should give a pretty good idea of what it is trying to do. (strace should all system calls, ltrace shows all calls to the C library.)
Re: ADTPro Serial Connection in Linux [message #386260 is a reply to message #386066] Fri, 23 August 2019 14:08 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
I'm used to starting ADTPro by just clicking on the .sh file. Can I somehow add something to the script that will run it automatically as root and maybe auto fill the password so I don't have to open up terminal to do it?

Interestingly Ethernet works just fine without SUDO.
Re: ADTPro Serial Connection in Linux [message #386261 is a reply to message #386260] Fri, 23 August 2019 14:17 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bobbi

On Friday, 23 August 2019 14:08:27 UTC-4, Tempest wrote:
> I'm used to starting ADTPro by just clicking on the .sh file. Can I somehow add something to the script that will run it automatically as root and maybe auto fill the password so I don't have to open up terminal to do it?
>
> Interestingly Ethernet works just fine without SUDO.

Yes I think it is just something to do with the RXTX lib, which is for serial only.

You can create a text file like this:

#!/bin/bash
sudo /home/myname/path/to/adtpro.sh

Call it adt or something, and then make it executable:

chmod +x adt

And you should be able to run that by clicking on it. This is assuming sudo is configured not to prompt for a password.
Re: ADTPro Serial Connection in Linux [message #386263 is a reply to message #386261] Fri, 23 August 2019 15:56 Go to previous messageGo to next message
Tempest is currently offline  Tempest
Messages: 435
Registered: November 2012
Karma: 0
Senior Member
>> This is assuming sudo is configured not to prompt for a password.

I didn't even know that was possible.
Re: ADTPro Serial Connection in Linux [message #386264 is a reply to message #386261] Fri, 23 August 2019 16:08 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

> Call it adt or something, and then make it executable:
>
> chmod +x adt
>
> And you should be able to run that by clicking on it. This is assuming sudo is configured not to prompt for a password.

did you mean chmod u+s? For set uid? as well as x.. I wonder..
Re: ADTPro Serial Connection in Linux [message #386268 is a reply to message #386264] Fri, 23 August 2019 17:40 Go to previous messageGo to previous message
Anonymous
Karma:
Originally posted by: Bobbi

On Friday, 23 August 2019 16:08:14 UTC-4, Anthony Adverse wrote:
>> Call it adt or something, and then make it executable:
>>
>> chmod +x adt
>>
>> And you should be able to run that by clicking on it. This is assuming sudo is configured not to prompt for a password.
>
> did you mean chmod u+s? For set uid? as well as x.. I wonder..

No +x is correct. It just needs to be executable, not setuid. The sudo does that!
Pages (2): [1  2    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: A 80' Apple II BBS
Next Topic: Users of VidHD
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 13 19:09:32 EDT 2019

Total time taken to generate the page: 0.01135 seconds