Re: [Flashforth-devel] ff-shell3.py question
Brought to you by:
oh2aun
From: Mikael N. <mik...@fl...> - 2024-07-06 05:16:26
|
So I added the close() and open() to serial_open(config) and it works just fine on linux, maybe then also on OSX. Like this: try: config.ser = serial.Serial(config.port, config.rate, timeout=0.5, writeTimeout=1.0, rtscts=config.hw, xonxoff=config.sw) config.ser.close() config.ser.open() Does that help ? Mikael On 2024-07-06 02:50, Mark Ennamorato wrote: > Hi sorry..somewhat frustrated at the moment im sure there is something > dumb i am doing / not doing but.. > > I *cannot* get the ff-shell3.py shell working at all .. M1 Mac, python > 3.9.0 > > USB serial on /dev/tty.usbmodem13201 > > I changed tried running the ff-shell3.py with ‘python3 ff-shell3.py > /dev/tty.usbmodem13201’ and get the dreaded “No such file or directory: > /dev/tty.usbmodem13201’ even though I can connect to it with screen no > issues. > > So them I was looking at the code and see its got a serial port object > “class Config(object)” and it so i changed default serial port to > /dev/tty.usbmodem13201’ in it but still same issue. > > hmm…. this should not be so difficult. > > so i played with some simple python code inside the repl. just using > see = serial.Serial(PORT, BAUD) using same port /dev/tty.usbmodem13201 > and then ser.open() and I get “serial port is already open” .. so i do > ser.close() first them ser.open() and it works, it sees my serial port > just fine. > > so why isn’t the ff-shell3.py seeing my serial port ?? > > TIA > Mark > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |