WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Model A+  (Read 4752 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Model A+
« on: November 10, 2014, 10:59:43 PM »
Hi,

there is again a new version introduced, A+



Let us know if you got one and running piCore on it.

More info: http://www.raspberrypi.org/blog/#raspberry-pi-model-a-plus-on-sale
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Model A+
« Reply #1 on: November 23, 2014, 09:02:09 PM »
Got two Model A+ today.
Robotics, battery powered uses?

6.00 beta working
Basic, SSH and X versions boot ok.

Not sure why I'm bothering with SSH version yet on the A+:)
Anyone know some cheap USB to Ethernet dongles?

Ok SSH version has mc etc, standard TC is a real basic OS.

Model A+ with the basic TC for robotics?
Last few weeks been learning how much can be done with the kernel, busybox plus script files.

Need to try a USB/FTDI uart in console mode, blue tooth BLE uart?

Offline spore

  • Newbie
  • *
  • Posts: 4
Re: Model A+
« Reply #2 on: November 24, 2014, 01:46:12 PM »
Hi
I'm having issue with i2c.
I have a python script which starts automatically via bootlocal.sh and it says "write error" when accessing my i2c device.
I2c-detect shows the correct peripherals with their corresponding addresses
When I switch to root, I get a message like "permission denied"!!

If I take this sd card and put it in a rpi model B,  this script works fine,  no issue with i2c.

Still investigating...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Model A+
« Reply #3 on: November 24, 2014, 01:52:16 PM »
Which piCore version? Do you execute script as root?

Add few second delay (sleep) before executing your script.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline spore

  • Newbie
  • *
  • Posts: 4
Re: Model A+
« Reply #4 on: November 24, 2014, 02:02:03 PM »
Yes sorry just noticed I missed a few information  :-[
I'm using Picore 5.3 and my script is run as root.

I insert a few delay and will tell you.

Edit:
I was too quick.  Actually the message "permission denied"  was not related to i2c and has nothing to see with i2c.
I inserted a delay before starting my script but no luck, still the same : "OSError: [Errno 51] Input/output error" 
Don't think it's a problem but I'm using Python 3.3.5 with quick2wire module.
« Last Edit: November 24, 2014, 02:19:15 PM by spore »

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Model A+
« Reply #5 on: November 24, 2014, 04:37:12 PM »
Been using Python for lots of i2c sensor stuff for years.

Trick is to write the code that errors don't matter.
One day I will figure out why I get so many errors, but right now with error checks and retries it seems to work good enough.
Mostly for one off prototypes or quick jobs.

But it is one reason I am now doing i2c sensoring in shell scripts and for graphical projects moving towards Java.
For control system stuff perhaps C/C++ would be best.

I also find chmod files to 4755 solves a lot of permission issues, too.

Offline spore

  • Newbie
  • *
  • Posts: 4
Re: Model A+
« Reply #6 on: November 25, 2014, 01:03:01 PM »
I tried with TC 6 Beta and I have the same problem. Although it works (almost) fine on a B+. Still searching  ???

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Model A+
« Reply #7 on: November 26, 2014, 09:30:43 PM »
I have a 20 sec boot delay before running my scripts and doing i2c stuff.
Mainly for ntp date to get set from local time server as I log i2c temp sensor data to file and need a correct timestamp.
This is on B+ model, not test on A+ as I'm using the network.

Working on A+ version with i2c sensors and LCD will test that soon.
Need to use the A+ more, but have not found much difference yet.

Offline spore

  • Newbie
  • *
  • Posts: 4
Re: Model A+
« Reply #8 on: November 27, 2014, 01:05:17 AM »
I solved my issue.

As mentionned there: https://github.com/quick2wire/quick2wire-python-api/issues/43
Board revision detection is not accurate.

To summarize, Quick2wire checks for the last digit on the rpi revision number in /proc/cpuinfo. If it's '2' then the I2C default bus returned is 0.
Unfortunately, the A+ has a revision number of 12 which causes quick2wire to use i2c bus 0, the wrong one.
By forcing quick2wire to stick on default bus 1, this solved the problem.

board_revision.py:
def revision():
    try:
        with open('/proc/cpuinfo','r') as f:
            for line in f:
                if line.startswith('Revision'):
                    return 1 if line.rstrip()[-1] in ['2','3'] else 2
            else:
                return 0
    except:
        return 0


part of i2c.py:
from quick2wire.board_revision import revision
...
default_bus = 1 if revision() > 1 else 0
...


Board revision:
Model B  : 000e
Model B+: 0010
Model A+: 0012
« Last Edit: November 27, 2014, 02:48:04 AM by spore »

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: Model A+
« Reply #9 on: November 27, 2014, 04:32:44 PM »
That would explain why i2c shell scripts worked, not using the Q2W library.

Offline sodface

  • Jr. Member
  • **
  • Posts: 90
Re: Model A+
« Reply #10 on: December 24, 2014, 02:15:53 PM »
Hi bmarkus,

I've had an A+ for several weeks and finally made some time to test with it.  I wasn't sure which beta to try and was in the release_candidates directory and saw the 6.0beta354 appear and downloaded that (it's since been deleted??).

Also saw the post about following the 3.12 stable branch - is that why beta354 appeared?

Anyway, the 6.0beta354:
Linux box 3.12.35-piCore+ #1 PREEMPT Wed Dec 24 01:06:38 CET 2014 armv6l GNU/Linux

seems to be running well on my A+ with SSH working via the Edimax EW-7811Un USB wifi module.

Which release do you recommend using?  If you will be focusing on the 3.12 branch do you think you could post the w1 module for it?

Thanks!

//edit
also, a minor thing, but http://repo.tinycorelinux.net/6.x/armv6/release_candidates/RELEASES has a typo in it - "Nidnight Commander"
« Last Edit: December 24, 2014, 02:18:39 PM by sodface »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Model A+
« Reply #11 on: December 25, 2014, 02:58:43 AM »
Hi,

thanks for trying it and noting the typo, I will fix it.

Try the beta35x line. It is based on the 3.12.35 kernel, same as Raspbian is using with few config changes after bad experience with 3.17.y/3.18.y

beta354 was removed because few modules were missing from base preventing to work athk9 wireless module and will be added in 355, but no change in kernel, just rearranging modules. If 354 is working for you, keep it till 355 comes later today.

I added few modules for 3.12.35 kernel including w1, ipv6, filesystems and raid-dm.

Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sodface

  • Jr. Member
  • **
  • Posts: 90
Re: Model A+
« Reply #12 on: December 25, 2014, 06:29:57 AM »
Thanks bmarkus!

Happy to report that my DS1820B temp sensor is working as expected with the w1 module you posted.  Have not tested audio.

Really like the form factor of the A+.

Thanks again for the effort and support, I see 355 is up  :)