LubikR / SynologyUploader

Upload photos from Sony cameras directly to Synology server
The Unlicense
22 stars 5 forks source link

Wifi connection #1

Closed TothCsanad closed 6 years ago

TothCsanad commented 6 years ago

Hi, I tried this app with Sony A5100. It seems that the wifi connection is only created when an app requires it. In STGUploader, wifi connection is established after app startup, but unfortunately this app does not connect. Please help! Thanks :-)

LubikR commented 6 years ago

Hello, the application doesn't include a code for wifi connection. If you want to use the application you need to establish wifi connection in another application, for example in OpenMemories:Tweak. I will add this funcionality in future release.

TothCsanad commented 6 years ago

Thanks! It works but unfortunately the connection fails with 401. This is probably due to my fault. Looking forward to the upgrade!

LubikR commented 6 years ago

According to SynologyAPI, 401 means "Account disabled"

TothCsanad commented 6 years ago

:-) Mysterious

TothCsanad commented 6 years ago

What protocol does it use? I can not see any refused connection in the log.

LubikR commented 6 years ago

HTTP at default port 5000. I think the API is little bit tricky because even I am logged-in I am not able to find any log or something else about it on Synology. During few days I will publish a release with possibility to use HTPPS and not only on default ports.

TothCsanad commented 6 years ago

Browsing the File Station API 401 can be either "Unknown error of file operation" :-(

LubikR commented 6 years ago

Ups, I see, I sent another API spec, sorry. But, error code 401 is different for different api calls. When the error were returned? During connectionin check in the Settings form or during uploading photos?

TothCsanad commented 6 years ago

At the beginning of upload.

LubikR commented 6 years ago

I have checked it many times and get only one error 414 - when file already exists on server. I will do some logging. Meanwhile please try new version and let me know. Thanks

TothCsanad commented 6 years ago

At the new version, pressing the Upload button immediately restarts the camera :-(

TothCsanad commented 6 years ago

I just noticed that in version 1.0, it creates a /photoo folder instead of /photo. Destination directory variable returns the last character twice. Maybe that was the reason for the 401 error.

LubikR commented 6 years ago

Logger added, please try new version 1.2 and send me a log file. Thanks.

TothCsanad commented 6 years ago

Unfortunately, right after the app started, the camera rebooted. Log is not generated either.

LubikR commented 6 years ago

I found one stupid issue that application would crash if Port not set. IMHO this issue should be raised for new users only, but please try new version and let me know. Thanks

TothCsanad commented 6 years ago

Again, it is restarted when uploading. No more log entries...

[INFO][SettingsActivity] Getting address : ****:5000 https:false [INFO][SettingsActivity] Got maxVersions: SYNO.API.Auth=6, SYNO.FileStation.CheckPermission=3 [INFO][SettingsActivity] Logged-in OK, sid=000000000000000000000000 [INFO][SettingsActivity] Check permission OK. Directory=photo [INFO][SettingsActivity] Logged-out [INFO][SettingsActivity] Saved and Go to MainActivity [INFO][MainActivity] Publish progress: Connecting to the server... [INFO][MainActivity] Getting address : ****:5000 https:false [INFO][MainActivity] Got maxVersions: SYNO.API.Auth=6, SYNO.FileStation.Upload=3 [INFO][MainActivity] Logged-in OK, sid=000000000000000000000000 [INFO][MainActivity] Publish progress: Uploading 1 / 592 [INFO][MainActivity] UploadVersion=3 [INFO][MainActivity] Path=/photo/ILCE-5100/06032018

LubikR commented 6 years ago

Hmm, I think the problem is OutOfMemoryException when creating the object to be uploaded. Your photos are big, right? More than 10MB per one photo?

TothCsanad commented 6 years ago

The average photo size is 5MB. After formatting, I tried to upload smaller images - with success. Unfortunately, the second upload failed again with 414, but this is obviously because of already uploaded images. Thank you for your help and patience! I see the light ... :-)

LubikR commented 6 years ago

5MB on my camera is OK, I have got a problem with bigger files than 10MB but my camera is not able to take so big photos. I made some tests and I successfully transfer 56MB file. So please try it. Thanks.

TothCsanad commented 6 years ago

The new version has flawlessly uploaded ~400MB of images. Only wifi connection is missing ...

LubikR commented 6 years ago

Great! Many thanks for your tests. I will do something with wifi.

LubikR commented 6 years ago

Wifi added and new version 1.5. published. Please test it and let me know. Thanks.

TothCsanad commented 6 years ago

It works perfectly! Great work! I'm also happy with the progress bar. Anyway, would not it be a better solution to show the whole process?

LubikR commented 6 years ago

Thank you for your feedback! There is always a better way :) And I know I am not designer and also not professional developer. It is fact. So what do you propose? Give me some hints :)

LubikR commented 6 years ago

The original problem has been solved in release 1.5 so I close this issue. If you have any suggestions please open another one. Thanks.