[Solved] No USB connection to brewpi

Have a new BrewPi Spark v2. It beeps twice when plugged into the computer, but I cannot see it on the USB port. Running OS X 10.10.4 with a virtual linux box for running BrewPi. Am I missing something here? I can’t do much without it even being recognizing via USB.

You cannot see it on the host either?

Try a different USB cable and make sure the cable is pushed in well.
Before shipping, I have flashed the firmware via USB, so it should work. Unless it broke afterwards of course.

Perfect. My USB cable was not going far enough in. Fixed that issue. Now just trying to update to the latest firmware, and it is not quite happy.

parallels@ubuntu:~/brewpi-tools$ sudo python updater.py
######################################################

Welcome to the BrewPi Updater!

######################################################

Checking whether the update script is up to date
/home/parallels/brewpi-tools is up-to-date.

*** Updating BrewPi script repository ***

Stopping running instances of BrewPi
You are on branch master
The latest commit in /home/brewpi is 1e891039180d12a2c382702220cf238e40a4fb15 on Thu, 31 Dec 2015 13:07:46
The latest commit on origin/master is 1e891039180d12a2c382702220cf238e40a4fb15 on Thu, 31 Dec 2015 13:07:46
Your local version of /home/brewpi is up to date!

*** Updating BrewPi web interface repository ***
You are on branch master
The latest commit in /var/www is 3418ec082d881463aa3ef80984930c50fef70bd3 on Thu, 03 Dec 2015 18:02:58
The latest commit on origin/master is 3418ec082d881463aa3ef80984930c50fef70bd3 on Thu, 03 Dec 2015 18:02:58
Your local version of /var/www is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n]:y
Stopping any running instances of BrewPi to check/update controller…

Checking current firmware version…
Jan 07 2016 21:29:11 Opening serial port
Found BrewPi v0.2.11 build 0.2.11-0-ga28c22d, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Current firmware version on controller: 0.2.11

Checking GitHub for latest release…
Latest version on GitHub: 0.4.2

Version on GitHub is newer than your current version, downloading new version…
Downloading latest firmware…
downloading https://github.com/BrewPi/firmware/releases/download/0.4.2/brewpi-0.4.2-photon.bin
Updated system firmware for the photon found in release 0.4.0
downloading https://github.com/BrewPi/firmware/releases/download/0.4.0/system-part1-0.4.7-photon.bin
downloading https://github.com/BrewPi/firmware/releases/download/0.4.0/system-part2-0.4.7-photon.bin
Downloaded new system firmware to:

/home/brewpi/utils/downloads/0.4.0/system-part1-0.4.7-photon.bin and

Latest firmware downloaded to /home/brewpi/utils/downloads/0.4.2/brewpi-0.4.2-photon.bin

Updating firmware over Serial…

**** Photon Program script started ****
Settings will be restored if possible
Devices will be restored if possible
Jan 07 2016 21:29:17 Opening serial port
Checking old version before programming.
Checking current version: Found BrewPi v0.2.11 build 0.2.11-0-ga28c22d, running on a Particle Photon with a V2 shield on port /dev/ttyACM0

Requesting old settings from Photon…
Saved old settings to file settings-Jan-07-2016-21-29-20.json

For the Photon, updating over Serial is not supported.

Falling back to DFU and trying to automatically reboot into DFU mode and update your firmware.

If the Photon does not reboot into DFU mode automatically, please put it in DFU mode manually.
Running command: sudo /usr/bin/python /home/brewpi/utils/flashDfu.py --autodfu --noreset --file=/home/brewpi/utils/downloads/0.4.2
Will automatically reboot newly detected photons into DFU mode
Using local files instead of downloading a release.

Using dfu-util binary at /home/brewpi/utils/downloads/dfu-util
Detecting DFU devices
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

Did not find any DFU devices.
Is your Photon or Spark Core running in DFU mode (blinking yellow)?
Waiting until a DFU device is connected…
Found new serial port connected: (’/dev/ttyACM0’, ‘Particle Photon’)
Putting Photon in DFU mode
/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

/home/brewpi/utils/downloads/dfu-util: 1: /home/brewpi/utils/downloads/dfu-util: Syntax error: word unexpected (expecting “)”)

I think I know what causes this. The script has automatically downloaded dfu-util for ARM, but you are running on ubuntu x86/x64.

Try installing dfu-util through apt-get. If dfu-util is found on the system, we do not download the arm version. See the TODO on line #133 :slight_smile:

I got there…the problem is apt-get installs only dfu-util 0.5, and the script requires at least 0.7. I guess i need to build it from source?

http://dfu-util.sourceforge.net/releases/dfu-util-0.7-binaries/

Here are all the binaries. The script should check arm vs i386 and download the correct one. But you can download it manually for now.

ok, i guess i do not know how to install those binaries

nevermind…got it. had to read back through some old threads. Thanks Elco…updated to 0.4.2.

Sorry if I’m resurrecting a dead thread, but apparentely there is no way for a newcomer to post a new topic…

I’ve just purchased a BrewPi kit.
Spent some time reading the docs (confusing!!!) after some trial & error, now it seems to work fine on my desktop PC ( VirtualBox with a Debian 8 installation on it).
Only issue I’m having is a loud and continuous beep that I quit by an “echo ‘a’ > /dev/ttyACM0” command, as suggested in this forum.

However, my plan is to have it working with an Acer Aspire One netbook with the same Debian 8 OS.
And here come the troubles.
Installation of brewpi software gives no problem, but after connecting the spark to the netbook and starting linux, the spark begin to beep and keeps resetting.
Not a continuous beep. One beep. Pause.Two beeps.Pause and so on.

After linux bootup has finished, the spark continues to beep. It then stops after some minutes.
The web server doesn’t detect the board.
“sudo ls /dev/ttyA*” returns nothing.

lsusb returns
Bus 005 Device 003: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 034: ID 2b04:c006
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0c45:7403 Microdia Foot Switch
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

usb-devices command returns

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 34 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2b04 ProdID=c006 Rev=02.00
S: Manufacturer=Particle
S: Product=Photon with WiFi
S: SerialNumber=00000000050C
C: #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)

Here is an excerpt from the output of the dmesg command, that looks interesting:


[ 28.028120] usb 2-1: new full-speed USB device number 3 using uhci_hcd
[ 28.214177] usb 2-1: New USB device found, idVendor=2b04, idProduct=c006
[ 28.214191] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 28.214200] usb 2-1: Product: Photon with WiFi
[ 28.214209] usb 2-1: Manufacturer: Particle
[ 28.214217] usb 2-1: SerialNumber: 00000000050C
[ 28.218422] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 28.218492] cdc_acm 2-1:1.0: ttyACM1: USB ACM device
[ 31.644207] usb 2-1: USB disconnect, device number 3
[ 31.646305] cdc_acm 2-1:1.0: failed to set dtr/rts
[ 32.572100] usb 2-1: new full-speed USB device number 4 using uhci_hcd
[ 32.762195] usb 2-1: New USB device found, idVendor=2b04, idProduct=c006
[ 32.762210] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 32.762220] usb 2-1: Product: Photon with WiFi
[ 32.762228] usb 2-1: Manufacturer: Particle
[ 32.762236] usb 2-1: SerialNumber: 00000000050C
[ 32.767926] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 32.767991] cdc_acm 2-1:1.0: ttyACM2: USB ACM device
[ 36.108191] usb 2-1: USB disconnect, device number 4
[ 36.110257] cdc_acm 2-1:1.0: failed to set dtr/rts
[ 37.120135] usb 2-1: new full-speed USB device number 5 using uhci_hcd
[ 37.305218] usb 2-1: New USB device found, idVendor=2b04, idProduct=c006
[ 37.305236] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 37.305249] usb 2-1: Product: Photon with WiFi
[ 37.305260] usb 2-1: Manufacturer: Particle
[ 37.305270] usb 2-1: SerialNumber: 00000000050C
[ 37.309435] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 37.309504] cdc_acm 2-1:1.0: ttyACM3: USB ACM device
[ 40.572868] usb 2-1: USB disconnect, device number 5
[ 40.574313] cdc_acm 2-1:1.0: failed to set dtr/rts

This sequence continues until it reach ttyACM33, then stops ( it seems to happen in sync with the beeps).
So the board is someway detected by the OS, but it looks like there is a communication/protocol issue. Apparentely, the system retries 33 times, then gives up.
So I’m stuck. The USB cable should be fine, as it is working when connecting the spark to my desktop. The spark is powered by the 12V power supply, so it shouldn’t be a power issue.
I searched the forum but was unable to find any hint.

Please advice

Replying to myself…
After some research I found the solution in a Ubuntu forum.
It was the ModemManager service that was interfering.
sudo systemctl disable ModemManager.service
cured the issue.
Hope it may help anybody with similar issues…

thanks for posting the solution! will help others figure it out.