What do I need to install Flotilla and Rockpool on Ubuntu?

Thanks,

Is it the preferred method to remove the libs that I installed before installing the dev ones?

Cheers.

technically youā€™ll need the dev packages to build instead, but those are not going to interfere.

Alternatively you could also try the following and see if flotilla-i386 works after installing the correct boost libs for the binary:

Well Iā€™m sort of making progress nowā€¦Iā€™m getting a different error message, one related to libserialport.

./flotilla-daemon-vs/Flotilla/Debug/flotilla: error while loading shared libraries: libserialport.so.0: cannot open shared object file: No such file or directory

I followed the row by row instructions from above.

Do I need to specify extra prefixā€™s when configuring?

the problem is that libserialport does not (necessarily) end up in the correct directory unless you specify the correct PREFIX.

what you can do is:

sudo mv /usr/local/lib/libserialport.* /usr/lib/x86_64-linux-gnu/

then rebuild the flotilla daemonā€¦ it should work (at least it does for me in a VM running Ubuntu 64-bit).

weā€™ve pushed an amd64 build of flotilla-pre to the repoā€¦ though I think youā€™re almost there so you might want to try to relocate libserialport as above first. I havenā€™t figured out how to prefix the lib so that it goes in the right place directly, but Iā€™m hardly an expert. YMMV.

Excellent.

I have progress to report.

Deleted everything Flotilla related.

Followed Gadgetoidā€™s script above.

Built libserialport and them moved it as you suggested.

Built websocketpp

Built the flotilla-daemon under ~/flotilla-daemon-vs

Started it OK using ~/flotilla-daemon-vs/Flotilla/Debug$ ./flotilla -d and got the friendly message ā€˜Flotilla ready to set sailā€™.

Then got heap of:

Warning: Failed to open port /dev/ttyACM0

messages which I know is because the dock firmware needs updating.

Tried to update the dock firmware using ā€˜~/flotilla-pre/linux$ sudo ./update_firmwareā€™ and got the following:

Flotilla Firmware Updater
dock firmware file found

This update will break compatibility with older versions of flotillad
and change your Dockā€™s serial baud rate to 115200
Press CTRL+C now if youā€™re not sure, otherwiseā€¦ enjoy!

./update_firmware: 29: read: Illegal option -s

Please unplug your Flotilla Dock!
Plug in your Flotilla Dock now.
Updating should continue automatically.

Bus 001 Device 008: ID 03eb:2fe4 Atmel Corp. ATxmega32A4U DFU bootloader
./firmware/dfu-programmer: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory
./firmware/dfu-programmer: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory
Update finished, enjoy!
Please unplug/replug your Flotilla Dock before use!

So, Iā€™m guessing that I need libusb, so installed:
sudo apt-get install libusb-1.0-0-dev

And tried to update the dock again and got the same message as above.

The good news is that Rockpool launches and I can see my IP and the message ā€˜No docks connected!ā€™ which is an improvement.

Thanks for the help so far.

You might be able to just install dfu-programmer from apt. However it has a habit of not supporting the atxmega chips. Grumble!

Try:

sudo apt-get install dfu-programmer

Thereā€™s also a PPA with a possible more up to date version. But, if nothing else, installing from Apt might take care of the dependencies.

obviously, if you compiled the ship branch you will need to update the dock firmware, but I donā€™t think that is the problem hereā€¦ Iā€™d hazard that the current user is not part of the dialout group.

So, let me try to summarize, if you did:

git clone --depth=1 https://github.com/pimoroni/flotilla-daemon-vs

then you shouldnā€™t update the dock firmware.

If on the other hand you did:

git clone --depth=1 https://github.com/pimoroni/flotilla-daemon-vs -b ship

then you should update the firmware.

Iā€™d recommend using the ship branch + firmware, which is the latest, but more importantly the greatest!

incidentally the problem with the dfu-programmer provided in pre is that itā€™s a i386 build, so would need:

 sudo apt-get install libusb-1.0-0:i386

well, best guessā€¦ will try on a VM later (or maybe build a amd64 if the apt repo does not support the ATXmega).

Hi,

I checked what groups I was part of using groups.
I am part of the dialout group.

Iā€™m pretty sure that I compiled from ship, but just to be sure, deleted everything and re-did:
git clone --depth=1 https://github.com/pimoroni/flotilla-daemon-vs -b ship
And re-compiled using:
make CC=g++

Then added the dfu-programmer:
sudo apt-get install dfu-programmer
And tried to update the dock firmware.

No joy with updating the firmware so did:
sudo apt-get install libusb-1.0-0:i386
And after a couple of dock plug-inā€™s used:
~/flotilla-pre/linux$ ./update_firmware

To send new firmware to the dock.

So far so goodā€¦

Running the daemon from a terminal gets me this:

(trusty)simon@localhost:~/flotilla-daemon-vs/Flotilla/Debug$ ./flotilla -d
[2016/02/17 20:57:40] Flotilla startingā€¦
[2016/02/17 20:57:40] Discovery Service Enabled
[2016/02/17 20:57:40] Baud rate: 115200
[2016/02/17 20:57:40] WS Port: 9395
[2016/02/17 20:57:40] Flotilla ready to set sail
[2016/02/17 20:57:40] Discovered IPV4 address: 192.168.43.69
[2016/02/17 20:57:42] IPV4 Address 192.168.43.69 registered successfully

However when starting Rockpool either by:
~/flotilla-pre/linux/rockpool$ python rockpool.py
Or
~/flotilla-pre/linux$ ./launch_flotilla

I get a lot of good messages like:

[2016/02/17 21:12:11] Connection Opened
[2016/02/17 21:12:11] Connection Opened
[2016/02/17 21:12:11] Client Saying Hello!
[2016/02/17 21:12:11] Client Saying Hello!
[2016/02/17 21:12:11] Connection Closed
[2016/02/17 21:12:11] Connection Closed
[2016/02/17 21:12:11] IPV4 Address 192.168.43.69 registered successfully
[2016/02/17 21:12:16] Connection Opened

But the browser hangs at the ā€˜Connectingā€™ screen

I think Iā€™m kinda closeā€¦

I can try the whole end-to-end installation process tomorrow using just:
flotilla-pre
Now that I see you have amd64 daemon, firmware and dependencies.

Thank you all for everything.

no, thank you for your perseverance, itā€™s pushed me to look into this more closely.

I think dfu-programmer can be pulled from repo on Ubuntu 14.04, as itā€™s version 0.6.0, but I figured I might as well get the entire suite compiled and out there if it can help anyone.

oh, when you ran flotilla -d from the Debug folder, did you see any info about the dock? the daemon should be spitting out info about it if it does find it, such as the firmware version. We are currently at version 1.12 if I remember right (vs 0.1 if running the initial).

ā€¦ Iā€™ve had trouble myself on an Ubuntu box getting to talk to the dock, despite my user being correctly part of the dialout group. If necessary, try ā€˜sudo flotilla -dā€™ to see if it makes a difference.

Hi,

Nope, no difference.

~/flotilla-daemon-vs/Flotilla/Debug$ ./flotilla -d

[2016/02/18 08:22:24] Flotilla startingā€¦
[2016/02/18 08:22:24] Discovery Service Enabled
[2016/02/18 08:22:24] Baud rate: 115200
[2016/02/18 08:22:24] WS Port: 9395
[2016/02/18 08:22:24] Flotilla ready to set sail
[2016/02/18 08:22:24] Discovered IPV4 address: 10.156.26.176
[2016/02/18 08:22:24] IPV4 Address 10.156.26.176 registered successfully

~/flotilla-daemon-vs/Flotilla/Debug$ sudo ./flotilla -d

[2016/02/18 08:23:25] Flotilla startingā€¦
[2016/02/18 08:23:25] Discovery Service Enabled
[2016/02/18 08:23:25] Baud rate: 115200
[2016/02/18 08:23:25] WS Port: 9395
[2016/02/18 08:23:25] Flotilla ready to set sail
[2016/02/18 08:23:25] Discovered IPV4 address: 10.156.26.176
[2016/02/18 08:23:26] IPV4 Address 10.156.26.176 registered successfully

Though I seem to remember that using sudo, the first time I ran it it prompted me to add myself to the dialout group, even though I had checked I was already a member.

Hope that helps

Curious! Do you see the dock if you:

sudo lsusb -d 16d0:08c3

You should see something like:

Bus 002 Device 003: ID 16d0:08ce MCS

And:

sudo lsusb -vd 16d0:08c3 | grep iProduct

Should show something like:

  iProduct                2 Flotilla Dock

Yep, get this:

(trusty)simon@localhost:~$ sudo lsusb -d 16d0:08c3
Bus 001 Device 040: ID 16d0:08c3 MCS

Only get the second one if the daemon is running though.

(trusty)simon@localhost:~$ sudo lsusb -vd 16d0:08c3 | grep iProduct
iProduct 2 Flotilla Dock

Success!!

I unhitched myself from the flotilla-daemon-vs (get it).

Powerwashed the Chromebook and grabbed git and flotilla-pre.

Updated the dock firmware after installing usbutils, dfu-programmer and libusb-1.0-0:i386
(Not sure if I needed all of them, but hey.)

The new amd64 daemon starts and Rockpool launches.

All working well.

Thank you to everyone for their patience.

Got to say Iā€™m very impressed.

Within 15 minutes I had a dial controlling a matrix, number display and a rainbow hue.

Itā€™s a very intuitive and easy to pick up piece of engineering.

Thank you pirates all.

2 Likes

great to hear youā€™re enjoying the experience!

Man, you are determined. And it paid off. Reminds me of my late nights ( 5am argh ) tackling non-problems on Linux in my teens :D

Glad youā€™re up and running. Now weā€™ve just got to finish ShipShape and get another ~1500 people over to it :D