Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor issue with old versions of OPC firmware #16

Closed
paultanner opened this issue Jul 4, 2016 · 11 comments
Closed

Minor issue with old versions of OPC firmware #16

paultanner opened this issue Jul 4, 2016 · 11 comments

Comments

@paultanner
Copy link

I noticed that the version is not reported when the device sends back this string

OPC-N2 FirmwareVer=OPC-017b...............................BD

You mention this in the code but not in the READ.ME; I patched it to address this. I'll do it properly when the project is further along.

BTW. Thx for doing this. Your code is a lot more readable than the device documentation ;-)

@dhhagan
Copy link
Owner

dhhagan commented Jul 4, 2016

Hi Paul!

I'll take a look at that. I made some changes when firmware v18 came out which includes a method for firmware version...Alphasense also changed the way they do firmware versioning from number.letter to major.minor as seen here which is a bit frustrating. Depending on what your use case is, the firmware version should be held in a class method OPCN2.firmware which returns a python dictionary that contains the major, minor, and combined versions. Basically, the information string is parsed on initialization. Is that sufficient for what you need? I don't pay attention to the letter because there aren't any major differences in the firmware between versions.

@paultanner
Copy link
Author

Probably not good use of your time to fix. Maybe just tell people to use another way to find the version. It functions OK as is because major version shows up as zero which does not break anything else. Most people will probably upgrade to >=18 anyway.

@dhhagan
Copy link
Owner

dhhagan commented Jul 4, 2016

Ahhh. What version of the library are you using? I thought I fixed that
issue in the past minor release...I believe it was 1.0.1
On Mon, Jul 4, 2016 at 10:41 AM Paul Tanner notifications@github.com
wrote:

Probably not good use of your time to fix. Maybe just tell people to use
another way to find the version. It functions OK as is because major
version shows up as zero which does not break anything else. Most people
will probably upgrade to >=18 anyway.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#16 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AEKwSElyRmzhcF5Xu5j5lyThD687OIN4ks5qSRt-gaJpZM4JEMo1
.

Regards,

David H Hagan
PhD Student | Atmospheric Chemistry & Physics
Department of Civil & Environmental Engineering
Massachusetts Institute of Technology
Cambridge, MA 02139
707.227.6695 | dhagan@mit.edu | https://www.davidhagan.me

@dhhagan
Copy link
Owner

dhhagan commented Jul 4, 2016

Wait a sec...haha For some reason I thought this was an issue with the Python Library...I'll take a look at this in the next 48 hours or so. Curious...which device are you using this library with? A particle photon/electron? Or an Arduino?

@paultanner
Copy link
Author

I downloaded it from github in the last few days. I do not see a version number in opcn2.cpp.
the examples .cpp file indicates that it was updated in June 2016. I got it working OK on a Photon (apart from the firmware version).

@dhhagan
Copy link
Owner

dhhagan commented Jul 4, 2016

Ahh okay. The version number is usually in the spark.json file. It should also be able to be downloaded straight from the library management tool within the Particle Build IDE. Let me know if it's not!

@paultanner
Copy link
Author

BTW. With a small change (Serial1 instead of Serial) it also runs on Bluz. All good :-)
And yes, "version": "0.3.2" is in spark.json (which I had not downloaded).

@dhhagan
Copy link
Owner

dhhagan commented Jul 4, 2016

Awesome! It looks like anytime I make an update to the library, the Particle IDE makes the library private again, which is pretty obnoxious. They told me it would be fixed when they release their new library management system soon.

@dhhagan
Copy link
Owner

dhhagan commented Jul 5, 2016

@paultanner I think I patched it last night with v0.3.3. Do you mind checking to see if it worked with your OPC? I don't have any with firmware < 18.2

@paultanner
Copy link
Author

thx @dhhagan.
This now comes back with 17.0 which is near enough to 17b.
All your good work is much appreciated :-)

@dhhagan
Copy link
Owner

dhhagan commented Jul 5, 2016

Awesome! I'll go ahead and close this then!

@dhhagan dhhagan closed this as completed Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants