Advanced search FAQ Register Login

It is currently Tue Feb 20, 2018 4:37 am

 

Postby nrg » Tue Jun 07, 2016 10:56 pm

Hi Jason,

No new info from my side I'm affraid :-( I don't know if Jake have any more solutions at the moment as have stopped responding.

nrg
n00b

Posts: 7

Joined: Thu May 19, 2016 9:47 pm

Postby Jake » Wed Jun 08, 2016 3:22 pm

Sorry gents, we've got staff off this week, so I've been dragged off usual tech. support to help with picking/packaging

I'm going to test Pi 3 with latest version + firmware so see what the issue could be, and I'll revert back

-- Jake

Jake
ModMyPi

User avatar

Posts: 1397

Joined: Thu Aug 27, 2015 3:57 pm

Forum Administrator & Technical Support

Postby Dave » Mon Jun 20, 2016 10:48 am

Right, got it working!! Here is how:

1. Make sure you use a fresh install of Raspbian, ideally installed via NOOBs 1.9.2 (latest version of NOOBs at time of writing) (https://www.raspberrypi.org/downloads/noobs/)

The following commands were performed on a FRESH INSTALL

2. Update your Pi's repo

Code: Select all

sudo apt-get update


3. Update your Raspberry Pi's OS and Firmware

Code: Select all

sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update


4. Reboot

Code: Select all

sudo reboot


5. Install/Update required packages

Code: Select all

sudo apt-get install python-rpi.gpio python-smbus i2c-tools


6. Enable I2C

Code: Select all

sudo raspi-config

Option 8

Option A6

Yes

Finish


Edit /etc/modules

Code: Select all

sudo nano /etc/modules


Add:

Code: Select all

i2c-bcm2708


7. Enable Serial - THIS STEP IS DIFFERENT TO THE USUAL PROCEDURE

Edit /boot/config.txt

Code: Select all

sudo nano /boot/config.txt


Add the following line

Code: Select all

enable_uart=1


Backup /boot/cmdline.txt

Code: Select all

sudo cp /boot/cmdline.txt /boot/cmdline.txt.backup


Edit /boot/cmdline.txt

Code: Select all

sudo nano /boot/cmdline.txt


Remove all reference of "console=***"

For example:

Replace:

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait


With:

Code: Select all

dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait


8. Reboot

Code: Select all

sudo reboot


9. Download the latest supporting files and firmware - http://www.modmypi.com/blog/ups-pico-un ... -downloads

Code: Select all

wget http://www.pimodules.com/_zip/UPS_PIco_Firmware_Update.zip
wget http://www.pimodules.com/_zip/UPS_PIco_Supporting_Files.zip


10. Extract download files

Code: Select all

unzip <filename.zip>


11. Edit picofu3.py

Code: Select all

nano picofu3.py


12. Find and replace

Find:

Code: Select all

port='/dev/ttyAMA0'


Replace:

Code: Select all

port='/dev/ttyS0'


Save and Exit

13. Invoke the PiCo bootloader

Press and hold the UPSR button
Continue to hold the UPSR button, and press and hold the KEYA button.
Release the UPSR button, but keep holding the KEYA button
Release the KEYA button
The big RED LED will light, and system will be able to receive the firmware update

14. Initiate FW update

Code: Select all

sudo python picofu3.py -v -f <firmware_file.hex>


15. Once the firmware has updated, revert the changes in the cmdline.txt file and config.txt file

Code: Select all

sudo cp /boot/cmdline.txt.backup /boot/cmdline.txt


Code: Select all

sudo nano /boot/config.txt


Remove:

Code: Select all

enable_uart=1

Dave
ModMyPi

User avatar

Posts: 2154

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support

Postby nrg » Tue Jun 21, 2016 4:54 pm

Hi Dave,

Thank you for this solution, I was finally able to flash UPS Pico but I needed to make small adjustments to make it work, it's probably because I don't have RPi 3 but RPi 2. To enable I2C it's option 9 not 8 in my raspi-config and than A6 and there is no ttyS0 device and this have to be changed to serial0, after that all went fine :)

nrg
n00b

Posts: 7

Joined: Thu May 19, 2016 9:47 pm

Postby Dave » Wed Jun 22, 2016 9:38 am

nrg wrote:Hi Dave,

Thank you for this solution, I was finally able to flash UPS Pico but I needed to make small adjustments to make it work, it's probably because I don't have RPi 3 but RPi 2. To enable I2C it's option 9 not 8 in my raspi-config and than A6 and there is no ttyS0 device and this have to be changed to serial0, after that all went fine :)



Ah yes, sorry the above instructions are aimed at the Raspberry Pi 3, because of the way the onboard bluetooth now uses the hardware serial.

Glad you got it working though :)

Dave
ModMyPi

User avatar

Posts: 2154

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support
Previous

Who is online

Users browsing this forum: No registered users and 1 guest

Board index

The teamDelete all board cookies • All times are UTC [ DST ]