#macOS serial problems

1 messages · Page 1 of 1 (latest)

amber mantle
#

starting a thread

quartz talon
#

i'm here

amber mantle
#

what version of Mu? could you give me a screenshot?

quartz talon
#

after getting yelled at now I know how to get here

amber mantle
#

did you already install stuff with brew?

quartz talon
#

i think i installed pip

amber mantle
#

Shut down Mu. In a Terminal window, do screen /dev/cu.usbmodem148301

quartz talon
#

sorry could not find PTY
goes back to tterminal window

#

sound like CPython is not there even though the board thinks it is

amber mantle
#

The CIRCUITPY drive is showing?

quartz talon
#

yup

#

if i dbl click reset it goes back to the boot drive

amber mantle
#

leave it in CIRCUITPY.

quartz talon
#

it is

amber mantle
#

I think macos is bolloxed up. Easiest thing is to unplug the board and reboot macos. Can you come back after that?

#

Then try screen again

#

I think something else is grabbing the tty

#

are you using a USB hub or anything like that?

quartz talon
#

sure, just an aside; I get the ESP32 Pico running CPython last night......

amber mantle
#

or try a different USB port if you have one (my macbook air only has one)

quartz talon
#

using SEVERAL hubs

#

for all my SSDs and keyboards, backup drives

amber mantle
#

btw, we don't use "CPython" for CIrcuitPython, because "CPython" is the name for regular Python (Python implemented in C), so it would be confusing if we called it circuiptyhon

#

try to get it connecting closer to the actual port on the machine

quartz talon
#

my bad. just saw someone on the forums using it

amber mantle
#

it's an easy thing to do, but the name is already taken 😦

quartz talon
#

hmmmm, could always try using my Air

amber mantle
#

I am just using a USB-C to USB-A adapter and a regular cable

quartz talon
#

I have to gram the extender hub because my Air only has USB-C

amber mantle
#

I have had trouble with poor quality USB-C to USB-A hubs. I got one from Amazon that was terrible.

quartz talon
#

I use 2 SSDs with all my virtual instruments so I need the 2 USB-C ports but my little keyboard is regular USB3

#

hooked up and can see the board all by itself

#

screen did the same thing on th Air

amber mantle
#

I'm looking for a flash eraser for the nRF

quartz talon
#

I'm here. Plugged the Pico into the iMac. Gonna see if I can get some things working on tat board

amber mantle
quartz talon
#

hang on gonna get discord running on the Air, if I remember the silly password

#

so unmount circuitpy and mount the boot, THEN copy the file

amber mantle
#

you are not unmounting really, you are starting the bootloader

#

always copy UF2's into the "fake" ...BOOT drive

quartz talon
#

UH-OH

#

And the boot went away and thr NeoPixel iis flaSHING RED

amber mantle
#

there are UF2-copying problems on early versions of Ventura. What version is running on the Air?

#

Try it on the iMac instead.

quartz talon
#

Sonoma 14.3

amber mantle
#

it's fixed in 14.4

quartz talon
#

scuse, 14.2.1

amber mantle
#

Apple is constantly breaking small FAT filesystem support.

quartz talon
#

on the iMac, didn't get a Finder error but the Neo is flashing red

amber mantle
#

don't worry, just try loading the circuitpython UF2

quartz talon
#

still flashing red, drive is not back

amber mantle
#

double-click to get the BOOT drive. unplug and plug back in if needed

quartz talon
#

dbl click, mounted boot. now copy the circuitpython uf2?

amber mantle
#

right

quartz talon
#

CIRCUITPY came back but still only has boot_out.txt on it

amber mantle
quartz talon
#

print("Hello world")?

amber mantle
#

is there one there already?

quartz talon
#

no I'm just so used to seeing it

amber mantle
#

try writing code.py with anything in it; doesn't matter what

quartz talon
#

I put it on the CIRCUIT

#

PY drive

amber mantle
#

unplug the board and plug it back in. Is it still there?

quartz talon
#

yup

#

think I know where this is going

amber mantle
#

ok, now edit it to be:

import storage
storage.erase_filesystem()
#

if you're lucky, it will run and then erase CIRCUITPY (and erase that). You should end up with a fresh CIRCUITPY with a code.py with hello-world

quartz talon
#

boy, aren't you just special! what's scary is I thought something like that.

#

yup. now back to the original problem. Why can't I mount it with the browser

amber mantle
#

so only boot_out.txt, no new code.py and other stuff?

quartz talon
#

no everything is ther! sorry, my twisted humor... where is the .toml format? I fogot where I put it?

amber mantle
#

you don't need settings.toml for nrf, since it doesn't do wifif

quartz talon
#

duh

#

so its ok if its blank

amber mantle
#

right

quartz talon
#

so how do i connect with serial?

amber mantle
#

try again now, it may work

quartz talon
#

nope tried with screen got the same no PYT

amber mantle
#

that is very odd. I wonder if something on both your macs is interfering. Do you have a Windows or Linux machine (e.g. RPi) to try?

#

this is not a problem we normally see

quartz talon
#

I'd rather grind glass in my eyes

amber mantle
#

sometimes you have to eat the sauerkraut

quartz talon
#

let me restart the imac

quartz talon
#

restarting, possible I got a flaky board???

amber mantle
#

I think the pty issue is a softwre problem

#

that's why I want you to try some completely different OS

#

to rule it in or out

quartz talon
#

Well raise my rent, you are the kid (Blazing Saddles)
screen came up just like it should

#

ctrl-D brings me into REPL

amber mantle
#

i'll let you go then, it's getting late here

#

update the OS on the Air if you can

quartz talon
#

so now where the heck was i a few hours ago?????

#

to What? 14.4?

amber mantle
#

to latest

#

is it an Intel Air?

quartz talon
#

Once again HUGE thanks!!! When you see my name again I think you're gonna run for the hills

#

NO M2 Air

#

64G RAM 512G SSD

amber mantle
#

at least to latest Ventura. Sonoma does slow writes to CIRCUITPY drives, but works. Sequoia we haven't tested yet for that, but it does work with CIRCUITPY.

#

I have an Intel air, so that's stuck on Ventura. and an M1 Mac Mini, which I keep up to date for testing purposes. Both of these are just for testing and support.

quartz talon
#

Ventura came BEFORE Sonoma. iMac can't go any further, just the Air

amber mantle
#

Ventura - need at least 14.4. Sonoma - use latest. Sequoia -it's too early to say

quartz talon
#

go to sleep or have abeer,I'll find out where you live and send you a case

amber mantle
#

unnecessary - I get paid for this

quartz talon
#

again, you make me jealous. I'm locked out of engineering at my age

#

Good Night sir. I'll start trying to get Bluetooth running under CircuitPython.

amber mantle
#

night!

quartz talon
#

tried to do the Bluefruit Dashboard with Web Bluetooth in Chrome. After installing the firmware as per the webpage, the board no longer mounts as CIRCUITPY.
screen /dev/cu.usbmodem148301
gives me a blank screen now, now more REPL.
Why do I listen to what is on the Adafruit website pages when I always wind up here trying to figure out how to fix the damage that following directions gets me into?

amber mantle
quartz talon
#

But the website says you can program using CircuitPython

#

And I also had the issue of not being able to copy anything onto the CIRCUITPY lib folder

amber mantle
quartz talon
#

So how do I get the drive mounting again as CIRCUITPY?

amber mantle
#

install the adafruit-circuitpython UF2. That will replace the dashboard firmware with CircuitPython. WHen you installed the dashboard firmware, you replaced CircuitPython

amber mantle
#

yes, so you need to put CPy back on the board. CircuitPython is "just another program", like the arduino dashboard is "just another program"

quartz talon
#

OK I'm there but how do I use Bluefruit Dashboard. Do I just continue along? Another thing. By reinstalling CircuitPython uf2 file I can now copy libraries from the bundle. Why couldn't I do it yesterday? I remeber reading somewhere about locking the code down on the board

amber mantle
quartz talon
#

well at least I am starting to get libs copied over per the webpage

amber mantle
#

once you set up the CPy version of the dashboard board software, you should be able to connect to it from the browser as you did with the Arduino verison.

#

Make sure you give plenty of time for things to copy. As I mentioned, Sonoma has an issue of copying to CIRCUITPY really slowly.

quartz talon
#

I'm on the iMac. I try to use the Air for just music stuff

amber mantle
#

is the iMac using ventura? Upgrade it to at least 14.4

quartz talon
#

can't. its stuck at Ventura. System update won't let it go higher than ventura. And I can't get the Air past Sonoma 14.2.1. Have to wait for Apple to send out OS updates for the Air. Told that the iMac (i7) was maxed

amber mantle
#

sorry, I'm getting version numbers mixed up. Make sure the Ventura machine is upgraded to the latest version

#

13.6.something

#

i think

#

you said it was 13.6.4?

quartz talon
#

yup

quartz talon
#

Apple has gone seriously downhill over the years. I still have a 512Ke that still works and was a developer since 1985 so I have ALL thhe old MacOSes on CD

amber mantle
#

we would have used something called MTP (Media Transfer Protocol) for the filesystem, excep that it competed with iPods, so Apple didn't/doesn't support it (it's on windows and linux)

#

it is a lot safer than MSC, which is block-level access

quartz talon
#

yeah, Apple started going VERY proprietory after they went Intel. I used to be be a System Engineer. Went to the AT&T/Bell Labs/Bellcore people and showed them how to integrate Macs into their labs.

#

At that point I got involved with Digital Video and then moved over to SQL ETL and Data architecture, warehousing

#

At the point of getting Chrome configured. I'll holler if I get stuck again

#

board isn't showing up in web bluetooth dashboard. I disconnected and plugged it back in. code.py has the correct code:

SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries

SPDX-License-Identifier: MIT

Adafruit Service demo for Adafruit Feather Bluefruit Sense board.

Accessible via Adafruit Web Bluetooth Dashboard.

(As of this writing, not yet accessible via Bluefruit Playground app.)

#

restarting the iMac. See if that does anything

#

NOPE! Only way it shows anything at all is if I turn off

amber mantle
#

Could you click "Feedback? Corrections?" in the left sidebar and write up a short item?

quartz talon
#

sure, but I guess I'm back to being dead in the water......

amber mantle
#

well, there are other examples of using BLE UART, which I linked to somewhere above, or in the main thread

quartz talon
#

I remember them from the distant past so thanks for giving me the link again. IIRC the examples were way more than I needed but I'll have to revisit them. I only have today though until maybe next week. I'm part of the election process in Arizona which is going to be a nightmare over the next week or so. Working 14 hour days the 4th and 5th as a Judge in the local polling location and then doing adjudication at the main polling site the rest of the week so I'm likely to be mentally fried before I can get back. Of course that means I probably won't be annoying you (YAY) for a week or so.

amber mantle
#

good luck with all that!

quartz talon
#

really! I've got the phone numbers of 30 lawyers on my iPhone that I'm supposed to call if I see something strange! This whole state is STRANGE!!!

#

quick question, in the one example it say to put one piece of codse on the board and the other code on the iMac. I'm running into an indentation error. I assume I'm supposed to enter the code into Python3 on the iMac

amber mantle
#

I don't see any code ot use on the host, just to use the web app

#

Or are you talking about one of my links?

#

You have to read the whole guide from the beginning.

quartz talon
#

your links

amber mantle
#

and install bleak, and other libraries

quartz talon
#

no easy way to install the libraries on the iMac I guess

amber mantle
#

they are available via pip

#

but did I already discuss Python Mac versions with you or was that someone else?

quartz talon
#

probably me but I'm still lost with command line. trying to figure out how to get circup to run. I get command not found soI'm assuming I have to edit the PATH file and I have very little idea how to do that or where it is

amber mantle
#

what does python3 --version say on the computer in question?

quartz talon
#

python 3.13.0

amber mantle
#

and which python3

quartz talon
#

/usr/local/bin/python3

amber mantle
#

and pip3 list

quartz talon
#

jbanko@JoesiMac-5 python % pip3 list
Package Version


Adafruit-Blinka 8.50.0
adafruit-blinka-bleio 4.1.2
adafruit-circuitpython-ble 10.0.9
adafruit-circuitpython-busdevice 5.2.10
adafruit-circuitpython-connectionmanager 3.1.2
adafruit-circuitpython-requests 4.1.8
adafruit-circuitpython-typing 1.11.1
Adafruit-PlatformDetect 3.75.0
Adafruit-PureIO 1.1.11
appdirs 1.4.4
binho-host-adapter 0.1.6
bleak 0.22.3
certifi 2024.8.30
charset-normalizer 3.4.0
circup 2.0.4
click 8.1.7
findimports 2.5.1
idna 3.10
pip 24.3.1
pyftdi 0.55.4
pyobjc-core 10.3.1
pyobjc-framework-Cocoa 10.3.1
pyobjc-framework-CoreBluetooth 10.3.1
pyobjc-framework-libdispatch 10.3.1
pyserial 3.5
pyusb 1.2.1
requests 2.32.3
semver 3.0.2
toml 0.10.2
typing_extensions 4.0.1
update-checker 0.18.0
urllib3 2.2.3

#

yay! so now I get :
Trying to connect...
Connected
Eval:

amber mantle
#

ok, type 1+2

quartz talon
#

3
eval:

amber mantle
#

i think that is right 🙂

quartz talon
#

let me ask you another question:
do you feel like you're dragging a 3 year old kicking and screaming by the hand when you deal with me?

amber mantle
#

well, I think it would be good to take deeper breaths and maybe step away from time to time

#

i have no doubt you can figure it out.

quartz talon
#

thats what my therapist says about my election involvement. You're both right but I have a tenacious attitude that gets me into to much troublr.

#

last question and then I have to go look at some election requirement stuff and WILL be walking away from this stuff for a while, maybe a day.
Got a link to, or a good book on comng up to speed on unix easily?

amber mantle
#

on macos, or on linux?

quartz talon
#

macos

#

its BSD Unix 5.x on the mac isn't it

amber mantle
#

well, it's derived from that. But you want to learn cp, PATH, etc. ,etc.

#

my 95yo father and mac user likes tidbits for information

quartz talon
#

95? i'm 75

amber mantle
#

for macos, learning command line is often couched as "learning Terminal",

#

I just did a websearch for learn macos command line. THere are a number of elementary guides, but for a more comprehensive overview, I think you need a book.

quartz talon
#

got a VERY OLD very thin book on command line for macos when they first went to unix core. don't know how relevant or if i can even find it.
Anyway, thanks for all the guidance. I'm going to drop off and prep for the polling stuff the next 2 days so you should get a breather from me