Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 15 13:42

    mariobehling on apk

    Travis build pushed to [develop… (compare)

  • Apr 15 13:42

    mariobehling on apk

    Travis build pushed to [develop… (compare)

  • Apr 14 18:50
    mariobehling commented #119
  • Apr 14 16:51
    nkpro2000sr edited #179
  • Apr 13 16:39
    nkpro2000sr edited #179
  • Apr 13 16:19
    nkpro2000sr edited #179
  • Apr 13 16:05
    nkpro2000sr edited #179
  • Apr 13 15:41
    CloudyPadmal synchronize #65
  • Apr 13 09:09
    nkpro2000sr edited #179
  • Apr 13 09:06
    nkpro2000sr opened #179
  • Apr 12 23:04
    CloudyPadmal synchronize #65
  • Apr 12 22:57
    CloudyPadmal synchronize #65
  • Apr 12 22:53
    CloudyPadmal opened #65
  • Apr 12 22:52

    CloudyPadmal on master

    Document serial protocol ADC co… (compare)

  • Apr 12 22:52
    CloudyPadmal closed #64
  • Apr 12 20:19

    CloudyPadmal on bootloader

    init: setup initial project for… (compare)

  • Apr 12 19:47

    CloudyPadmal on bootloader

    init: setup readme and bootload… (compare)

  • Apr 12 14:40
    CloudyPadmal synchronize #119
  • Apr 12 14:29
    CloudyPadmal opened #119
  • Apr 11 18:15
    CodeWithSouma commented #2149
Abhinavtdk
@Abhinavtdk

@mariobehling Thanks for reviewing. There's a month left for the bonding period to start. By then, I'll be well versed with the codebase. The past 15 days, I didn't have much time because of my college exams. I don't know much about Sigrok as of now, will learn more about it in the coming days and then come up with ideas on how to integrate PSLab. Since there's only a day left to apply, can I submit this proposal and update it later in the next few days. I'll be discussing my progress here and you could decide based on the new proposal I'll share later?

Half of what I've written in the proposal, I can be able to finish in this month itself. So, I'll have time to work with Sigrok.

Mario Behling
@mariobehling
Ok, definitely add this info. Thanks
CyReVolt
@CyReVolt:matrix.org
[m]
After a bunch of additional rabbit holes, including npm v7 shenanigans, I have figured things out. I could upgrade to Electron 10 thus far.
@cynthi8 I could not yet get to Electron 12 because of some new interop issues, haven't tried 11 (time...), but at least this is now another step further. Thank you so much for taking care if the migration away from remote; I just had to do the same for the bridges in background_tasks/ and could use your work for orientation. Are you occasionally available for some exchange maybe? I'd like to bring the app forward to current versions of the direct dependecies again, such as React 17 and Electron 12, could use some brainstorming. :)
11 replies
NAVEEN S R
@nkpro2000sr

Hi,
I am Naveen, pursuing B.E. computer science and engineering (3rd year), from INDIA.

I would like to participate in GSoC.

My Idea : To develop applications for multiple platforms from a single codebase.

currently there are two pslab-desktop and pslab-android, in which some features in one not implemented in others [1]. Also the same implementation are written again in different languages.

By my idea it is possible to build executables from different platforms from same code [2], using flutter and dart (Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase).

I also build a demo app for all platform with the same code [3].

[1] fossasia/pslab-desktop#405
[2] https://github.com/nkpro2000sr/serial-flutter-demo/tree/pslab-demo
[3] https://github.com/nkpro2000sr/serial-flutter-demo/releases/tag/v0.0.1

Please reply your opinion.

@CloudyPadmal @mariobehling @bessman @orangecms

Alexander Bessman
@bessman

@nkpro2000sr A unified code base would definitely be very valuable. However, reimplementing everything a third time in a new language is not a viable solution, in my opinion.

There is currently an effort to create a common back end for instruments via sigrok, which is a step towards unifying the code base. We will also need a common back end for things sigrok does not provide, such as the board's serial buses (UART, I2C, SPI). This back end should use libserialport (which sigrok also uses) in order to limit the number of dependencies.

Above these layers, we need higher-level functionality and specific sensor implementations. We don't have the resources to implement and support a large number of sensors ourselves, so this layer should be written in a language for which there already exists a large number of sensor libraries. That means Python, or possibly C++.

Finally, we have the front end/UI. I don't have enough experience with front end development to say what the best way forward is here, but it seems like a waste to discard what has already been done in pslab-desktop and pslab-android. You mentioned that you want to use Dart. I have no experience with Dart, but I understand it can compile JavaScript. Do you think it would be possible to deploy pslab-desktop to Android and web using Dart? I so, I think that would be an interesting project.

NAVEEN S R
@nkpro2000sr
@bessman compile Dart code to JavaScript/C is possible but i don't know js to dart is possible (which required to deploy pslab-desktop to android).
Alexander Bessman
@bessman
@nkpro2000sr I see, I misunderstood how Dart works. I read the Wikipedia entry ("Dart can compile to either native code or JavaScript") too quickly. That won't work, then.
NAVEEN S R
@nkpro2000sr

@bessman Regarding Project 2: Circuitpython busio compatibility layer for pslab-python

Is the aim of the project to create a fake busio module which internally calls pslab-pythons modules to do the required job?

Example: like busio.I2C which creates I2CSlave object.

Alexander Bessman
@bessman
@nkpro2000sr Yes, that's precisely the idea.
NAVEEN S R
@nkpro2000sr

@bessman Regarding Project 1: Add support for PSLab to sigrok

Is the aim of the project to create a python wrapper to call sigrok apis with its share library libsigrok (usign ctypes) ?

I don't know how to do the same in android.

Alexander Bessman
@bessman
sigrok provides Python and Java bindings. The idea is to use those.
NAVEEN S R
@nkpro2000sr

@bessman i got some errors while installing pysigrok.

currently i am happy to do project 2 .

Alexander Bessman
@bessman
@nkpro2000sr Great! I think doing it for just I2C is too small a project for GSoC though, so the proposal should also include refactoring the SPI and UART interfaces and doing the same for them.
NAVEEN S R
@nkpro2000sr
Ok, definitely i add these too. Thanks
Kartikay Sharma
@kartikaysharma01

There is currently an effort to create a common back end for instruments via sigrok, which is a step towards unifying the code base. We will also need a common back end for things sigrok does not provide, such as the board's serial buses (UART, I2C, SPI). This back end should use libserialport (which sigrok also uses) in order to limit the number of dependencies.

Above these layers, we need higher-level functionality and specific sensor implementations. We don't have the resources to implement and support a large number of sensors ourselves, so this layer should be written in a language for which there already exists a large number of sensor libraries. That means Python, or possibly C++.

@bessman Once we are done with sigrok integration, what will the project structure look like?
This is what I had in mind

Mario Behling
@mariobehling
@kartikaysharma01 Please drag and drop images into this chat here directly.
Kartikay Sharma
@kartikaysharma01
Pslab flow.jpg
Kartikay Sharma
@kartikaysharma01
For the external sensors (such as moisture and temperature sensor), the support can be provided through sigrok i believe. Is that something we have considered?
CyReVolt
@CyReVolt:matrix.org
[m]
Ah, one final thing: Please also try connecting the PSLab device before starting the app. It doesn't work for me currently when running the app first. That bridging approach is a little fragile and I'll see what I can do to rework it - which is necessary for newer versions of Electron anyway, as it seems. 😩
4 replies
Alexander Bessman
@bessman
back end arch.png
12 replies
@kartikaysharma01 Here's how I imagine the project architecture after moving to sigrok.
pslab-python and pslab-android in this figure are much smaller beasts than they are today, with as much of the instrument code as possible having been moved to sigrok.
Alexander Bessman
@bessman
Regarding using sigrok as a back end for sensors, I do not think sigrok supports the type of sensors that can be used together with PSLab. Sigrok supports standalone devices like https://sigrok.org/wiki/APPA_55II, while PSLab communicates with sensors over I2C, SPI, UART, or directly on analog/digital inputs.
Kartikay Sharma
@kartikaysharma01

Please review my draft GSoC Proposal : https://docs.google.com/document/d/1TFl1_0obrcRcIAG2SFgEq36CL2SnedAhGIj1hxcfLwY/edit?usp=sharing

@mariobehling @bessman @CyReVolt:matrix.org @nielek2 Any suggestion with the timeline or any other area of improvement?

CyReVolt
@CyReVolt:matrix.org
[m]
(... just saw that I wrongly declared Electron as a dependency there and can remove it now; I had built from source before we had CI set up to build, so it's a legacy thing)
Mario Behling
@mariobehling
@CloudyPadmal Please upload the latest version of the hardware to the repo, if possible. If it is not ready yet maybe share a temp version link elsewhere. I would like to invite @RafaelLeeImg to review and give feedback. What do you think?
1 reply
NAVEEN S R
@nkpro2000sr

Please review my GSoC proposal.
https://docs.google.com/document/d/14flk591eItsGqA1Big6lFZIgr7xAcaPTL2S98CGU208/edit?usp=sharing

and please reply for any suggestions.
@bessman @mariobehling

Alexander Bessman
@bessman
@kartikaysharma01 Your timeline is quite ambitious. I think you be underestimating the amount of work required to reimplement the instruments in C.
You have "Implement a new backend that uses sigrok as a dependency" as part of your timeline. In my view, sigrok is the new backend.
2 replies
@nkpro2000sr Looks good to me :thumbsup:
Mario Behling
@mariobehling
@bessman @kartikaysharma01 Maybe mark in the doc what would be minimum version and max version. We do not have to exactly stick to every single thing outlined in the proposals. It gives us a general idea. What we are looking for are contributors who are continuously fully dedicated to the project over the summer and do not take on other commitments preferably. Ambitious is good, but make relevant contributions before in order to show that you can solve at least the minimum of what you mention in your proposal.
CyReVolt
@CyReVolt:matrix.org
[m]
Yes, this environment there is definitely not available to the globally installed app. Clicking the app icon can only look things up in your system.
Before setting PYTHONPATH, see what it currently points to; just echo $PYTHONPATH
Christian Voigt
@chrvoigt

@CyReVolt:matrix.org I did some digging …

Unfortunately setting PYTHONPATH in .bash_profile didn’t work, good thing is it explained why not … according to stackoverfow friends, basically the issues is that on OS X, command line applications and GUI applications are treated differently.
“Note that you may see here and there recommendations to either put environment variable definitions in ~/.bashrc or always launch login shells in terminals. Both are bad ideas. The most common problem with either of these ideas is that your environment variables will only be set in programs launched via the terminal, not in programs started directly with an icon or menu or keyboard shortcut.”
https://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile

then I tried the ‘ setenv variable value’ in ~/Library/LaunchAgents/environment.plist
https://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite?noredirect=1&lq=1

But apparently this is quite specific to several Mac Versions (I have Mojave 10.14 and earlier versions require edits in /etc/launchd.conf )

There are tools I can check out, though I am not sure it’s a practical approach, especially if it changes with macOS versions. One tool I found accidentially is this one https://github.com/ersiner/osx-env-sync

Maybe the most pragmatic solution is to say ‘you need to open PSLab from the cmd line’.

one question (to be safe) PYTHONPATH is to make the PSLAB files findable so they can be imported, correct? So at the moment I just point to the pip folder
/usr/local/lib/python3.9/site-packages/pslab
with the usual PSLab files, e.g. 99-pslab.rules, bus, instrument, sciencelab.py etc

So in general, if we can limit it to a two step process (a) pip install pslab + (b) download the .app
That would be a good installation, fiddling with setup files probably not ..

What do you think - should we just stick to the start from the cmd line approach?

2 replies
CyReVolt
@CyReVolt:matrix.org
[m]
We could still suggest people to attempt launching from their terminal if clicking the icon didn't work. They would have used their commandline shell to install then Python module anyway.
I'd say let's add that to the docs. My point is that if we default to launching from command line, this could cause trouble again. So here's another idea: Can you figure out the system lookup path for Python on macOS? Does it ship with Python 3 anyway, i.e., is there /usr/bin/python[3] and /usr/bin/pip[3]?
Christian Voigt
@chrvoigt
yes definitely - if ppl do 'brew install python' they get what you point out .. just that I need multiple python versions for different IDEs hence my set-up is more messy than the average
Christian Voigt
@chrvoigt

… just testing the process on a non-dev laptop where you get out of the box

  • Python 2.7
  • no pip
  • no brew
    what I think an average user could still manage
  • I went with the python installer ver 3.9 from python.org => Calling python still gets you 2.7 ; python3 and pip3 are good to go;
    ‘which python3’ points you to /Library/Frameworks/Python.framework/Version/3.9 … etc
  • pip3 install pslab .. installs automatically in that framework, so starting python3 and importing pslab works
  • However, without any tinkering - when launching the app via icon or from the terminal, it wouldn’t connect with the device …

So maybe we have to ‘educate’ the average user :-)

4 replies
oops the bold letters weren't intentionally used
or the Homebrew formula .. but until we have that, it's good to know what works
Mario Behling
@mariobehling
@Freddiscr_gitlab Hi, great to see you here. I added the Open Spectrometer topic to the meeting notes for Saturday. Could you help your friend to join this channel as well, please?
CyReVolt
@CyReVolt:matrix.org
[m]
Here's an interesting story I heard from Dave on The Amp Hour: A project, 9 months in, switched from a PIC32 to an ST Arm MCU, and 3 weeks later, they had a working prototype again, and they were able to port quite some C code. Is anyone else following the podcast? I can recommend it. :)
Frederik Schroeder
@Freddiscr_gitlab
:point_up: 14. April 2021 20:12 Hi, yes, I'm going to introduce him to this platform
CyReVolt
@CyReVolt:matrix.org
[m]
I received the breakout board from Esben today :)
4 replies
Mario Behling
@mariobehling
@CyReVolt:matrix.org Cool. So, we also need the sensor. Do you know what is the best place to order it?
CyReVolt
@CyReVolt:matrix.org
[m]
I will see what I can find, not from the top of my head. I'm an aspiring AliExpress Diamond Member. Usually it takes a month to get things from China. :-)
Anisha_Singh0118
@AnishaSingh0118
Hello everyone, this is Anisha Singh not a Gsoc participant but I always wanted to get involved with fossasia, and I enjoy making apps as I am comfortable with java and kotlin. Through this message I wanted to ask that I want to apply for fossasia's internship Can anyone guide me how can I do so?
it is mentioned in the form that for this program they particularly looking for developers who are already active in the community or have made prior contributions, but this is my first time contributing to it.
And also i dont have GSoC proposal can i still participate?
Mario Behling
@mariobehling
@AnishaSingh0118 Yes, please join. You can get involved step by step and learn about the project. Once you are familiar with it and have some merged PR we can discuss the steps to an internship.