USB Serial change the name of the port on a mac

sampsonij

New Member
MacAxePad software issue with the usbserial port name - Compiler bug

I have a MAC with a working USB serial interface lead. The lead uses the PL2303 drive but the name of the port under the MAC OS is /dev/tty.usbserial
Note the fact that this is NOT /dev/tty.usbserial-xxxxxx

As I stated this port works perfectly well with lots of other applications and I can use it as a terminal to the device I have running, so I know it is not a port or cable issue.

Both the standalone command line compilers and the MAC AXEPAD will not support this, they are hard coded to support /dev/tty.usbserial-xxxxx etc.
Could the code be changed such that you can fully specify the name of the port i.e. /dev/tty.usbserial? this is a simple change however it is stopping me use the applications.

The other way is somehow renaming the driver such that there is a linked name to the real port. Does anyone know how to do this?





Below is an output from my machine showing the drivers

xxx-macbook-pro-2:~ <user>$ ls -l /dev/tty.*
crw-rw-rw- 1 root wheel 9, 0 24 Feb 10:39 /dev/tty.BTGPS-SPPslave-1
crw-rw-rw- 1 root wheel 9, 4 24 Feb 10:39 /dev/tty.Bluetooth-Modem
crw-rw-rw- 1 root wheel 9, 8 24 Feb 10:39 /dev/tty.Bluetooth-PDA-Sync
crw-rw-rw- 1 root wheel 9, 6 24 Feb 10:39 /dev/tty.Ejs-Dial-UpNetworking-1
crw-rw-rw- 1 root wheel 9, 2 24 Feb 10:39 /dev/tty.Photosmart330series-Ser-1
crw-rw-rw- 1 root wheel 9, 20 24 Feb 11:32 /dev/tty.usbserial


If you change the name of the port in the .ini file it does not seem to make a difference. This seems to be a simple change to the software and I am happy to Alpha/Beta test new code


More information
The command line compilers suffer the same issue


Output follows from my mahine
PICAXE-18X Enhanced Compiler. Version 0.6
Copyright (c) 1996-2009 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Compiled successfully.
Memory used = 19 out of 2048 bytes.

Searching for hardware on /dev/tty.usbserial.

line# 0 col# 0

Error: Hardware not found on /dev/tty.usbserial!


You can see that the compiler puts an extra. in the name of the ouput device!!!

using the MacAXEpad, the port is detected using the USB Setup button but the compiler has the same issue i.e. it puts the extra. in the serial port name.
Using the MacAXEpad you can open a terminal to the port and receive information from a pre-programmed device
 
Last edited:

Technical

Technical Support
Staff member
This is already possible in both cases.

Compiler:
There is no hard coding. SImply enter the full port string at the command line e.g.
picaxe08m -c/dev/tty.usbserial test.bas

MacAXEpad
Look in the axepad help (pad001.pdf datasheet), it explains where to find the axepad.ini configuration file on a Mac.
Open this file in a text editor, locate the /dev/tty.usbserial- header string and change it to /dev/tty.
Then use the text usbserial in the box where you normally type the number - so the full string becomes 'header' + 'number' as '/dev/tty.usbserial'
Don't forget to restart MacAXEpad after editing the ini file.
 
Last edited:

sampsonij

New Member
Reply to post - Compiler still having issues

I tried using the command line as per below

./picaxe18x -c/dev/tty.usbserial t2.bas

PICAXE-18X Enhanced Compiler. Version 0.6
Copyright (c) 1996-2009 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Compiled successfully.
Memory used = 19 out of 2048 bytes.

Searching for hardware on /dev/tty.usbserial.

line# 0 col# 0

Error: Hardware not found on /dev/tty.usbserial!






As you can see it does not find the hardware.
The hardware in question is the prebuilt AXE110P board with a PICAXE_18X chip


Using the MacAxepad, I managed to get the ini file changed such that I could communicate via the terminal application of the package. I also used the usbsetup button under options/port and the package find the port.



Use MacAxepad you get the following after Program is selected

PICAXE-18X Enhanced Compiler. Version 0.6
Copyright (c) 1996-2009 Revolution Education Ltd
All rights reserved.
www.picaxe.co.uk

Compiled successfully.
Memory used = 19 out of 2048 bytes.

Searching for hardware on /dev/tty.usbserial.


Then the error message stating that the "hardware cannot be found"


Additioanlly you cannot put usbserial in the box on the GUI for the port as there are to many letters. You can put it in the ini but it still does not work
 
Last edited:

Technical

Technical Support
Staff member
This is hardware issue, not the cable. We have tested here prolific cables on the mac and they worked fine, both with compiler and macaxepad.

There is no extra . in the port name, that is just the full stop at the end of the error sentence! Your messages prove the port is being found and opened, but the hardware is not being found. If there was a problem with the port you would get a port cannot be opened, not hardware not found, error message.

So forget about the cable and focus on the hardware, power supply etc etc. See the download checklist in part 1 of the manual.
 
Last edited:

sampsonij

New Member
Still having issues

So if it is not the prolific cable as you stated, and I am using a purchased serial D9 to 3.5mm cable from tech-supplies plus a prebuilt AXE110P card I fail to see where the hardware issue is.

The cabling layout is as follows

MAC --- USB/Serial --- Serial to 3.5mm cable --- Run port on AXE110P


The unit can be programmed via a windows machine using exactly the same cabling, I have just moved it to a test machine. The PSU is a battery box supplied with the kit and 3 new Alkaline batteries. The same setup works on the windows machine.


Using the compiler or MacAXEPad fails. Macaxepad will not report the firmware version of the chip, however using a Windows machine I can get the firmware version.

The windows machine is one that I borrowed and is not my machine so I cannot use it on a regular basis

Is there a command I can send from my terminal emulator to test the communication of the AXE110P through the cabling and computer? This would prove the communication path and help to solve the issue.
 

hippy

Technical Support
Staff member
Is there a command I can send from my terminal emulator to test the communication of the AXE110P through the cabling and computer? This would prove the communication path and help to solve the issue.
The comms path is half-proven as you report data can be received from a pre-programmed PICAXE.

To test the comms path to the PICAXE you can unplug the 3.5mm jack to the PICAXE, protect the tip (0V) so you do not short to it and carefully and gently connect sleeve and ring together with a piece of wire, crocodile clip or similar.

Anything sent from the Terminal window of MacAXEpad or other terminal emulator should be echoed back and displayed.
 

sampsonij

New Member
I have now written a simple piece of code as shown below.
When I connect to the datalink port I basically get the information as typed back from the picaxe circuit via the cable on to my mac or the test windows machine.
This was the intention of the code and proves the cabling, port, code and circuit. It obviously does not prove the programming port but that was proven via the Windows PC i used to download the code.

The only difference now is the application used to try and program the device


Code example - Read serial in, echo back to the machine
The low, high bit was to just flash a led on the board to test everything was working.
main:


serin 6,N2400,b1
high 2
low 3
pause 50
high 3

serout 7,N2400,(b1)

goto main
 

Technical

Technical Support
Staff member
The only conclusion then is that there is an issue with the prolific driver installed on your Mac, possibly supprting basic serial comms but not supporting the required RS232 'break signal'.

The bottom line is that the only USB adapter we officially support on the Mac system is the AXE027, using the ftdi driver. Out of interest we have tested here a prolific USB010 cable and it did work on our system (macaxepad and compilers), but we have no control over the different prolific driver versions and hence cannot state whether it will or not work on various Mac hardware. The ftdi driver will.

This article does indicate there are different issues with different versions of the prolific drivers

http://www.planet-rcs.de/article/mac_serial_port/
 
Last edited:

sampsonij

New Member
I have ordered a new cable.
I must say that I have not had any issues with this cable before and I use the latest drivers.

I will update the forum when I have tested the new cable
 

arubli

New Member
prolific and macaxepad

Hi

I've got a similar problem. I am on mac running 10.6.3

I installed the prolific adaptor, and I can use it with Zterm. It does not work on macaxepad.

it seems that macaxepad looks for a device starting with dev/tty.usbserial....

the driver software installed this : dev/tty.PL2303-00002006

somebody said something about editing the axepad.ini file, but I am not able to find it.

any suggestions ?

thanx in advance

Alex
 

Technical

Technical Support
Staff member
Look in the axepad help (pad001.pdf datasheet), it explains where to find the axepad.ini configuration file on a Mac.

A simpler option is to just type

#com /dev/tty.PL2303-00002006

as the top line of your BASIC program. This overrides the system setup.
 
Last edited:

arubli

New Member
Look in the axepad help (pad001.pdf datasheet), it explains where to find the axepad.ini configuration file on a Mac.

A simpler option is to just type

#com /dev/tty.PL2303-00002006

as the top line of your BASIC program. This overrides the system setup.
Thanx, it works now

(wish I knew how to find, those special files with the search command in the mac )

best regards

Alex
 
Top