How to keep samba connection with TOSMBClient Library - ios

I'm following TOSMBClient library link:TOSMBClient to share file from pc to my iPhone,This library is working to connect and copy file to my iPhone. But it takes very long time to connect to host and every time when copy file is done samba will disconnect. I want to keep samba connection.
Have anyone have idea or used to work with TOSMBClient library please help or suggest idea.

I'm the original developer of TOSMBClient. :)
The library is a thin Objective-C wrapper around another library called libdsm. The process of connecting to a host is at libdsm's level, so if your particular connection is slow, there's not a lot that can be done on the TOSMBClient level. It might be worth reporting an issue on libdsm's Github repo describing your hardware setup.
The connection dropping after a file copy operation is complete is curious. I can't be sure where that issue might be happening. Again, more information would be required. A complete set of steps to reproduce would be great. If you get the chance, feel free to file another issue on the GitHub!

Related

Installed program is removed automatically everytime when server restarts from windows server 2012 R2 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I created one service in C# and created installer for that.Installer is working fine and service is installed properly on server. But here is one problem. When server restarts the program connected to service automatically getting deleted from C:\ProgrameFiles location, but service is still there and when restarting this service. I am getting prompt like "windows can not find specified program path". Can somebody help me what I am missing here or what is potential cause for this problem?
I know the the scope of this question is too broad to answer but still I want some hints or any solution to resolve this issue. I tried to searching many forums but unfortuanatly no luck. please consider while vote to closing this question. I can edit more to clarify this scenario.
Thanks.
What kind of server is this? Terminal server?
UPDATE: It isn't a virtual machine is it? If so, are the disks set fully persistent? See 9.
If you run repair on the MSI in question, does the file come back?
What happens if you check the file directly with your malware scanner?
If you shut down the service manually, is the file still there? (just to be sure). Try repeatedly stopping and starting the service a few times.
Did you verify that the service runs from where you expect after installation? (have to ask)
Do you install per-machine or per-user?
Debugging
Check the event viewer and the MSI log files:
MSI Logging: Installsite: MSI log "how-to" and / or More MSI logging information.
Event Viewer: Hold down Windows Key, tap R, type eventvwr.msc and press Enter. Go to Windows Logs => Applications. Look for MsiInstaller events. Check the other logs too (Security, System, Configuration).
Deployment Mnemonic: And a "deployment mnemonic" (yellow section) - some heuristics to think about deployment problems.
Some Ideas
Loose Cannon: While we wait for feedback from you, let's fire off a list of suggestions shooting from the hip. Some of these are bad or
eliminated as causes, let's just list all to remember the bad ones
too:
1) Quarantined malware? (real or false positive, doesn't matter which). The file gets quarantined on every reboot? Upload file(s) to virustotal.com to check binaries that are missing. Do an administrative installation if you need to get hold of the files.
2) Upgrade Problem? (not the cause in this case, but MSI major upgrade can cause this kind of problem - for example when you attempt to downgrade a file to a lower version).
3) System policies? Not really familiar with what policies that could delete files - if any at all. Just mentioning that a lot of policies can affect Windows in general. Check the event logs. Some registry keys are periodically overwritten for example with defined AD settings.
4) Cleanup Scripts? Anything is possible here, but it would be strange to delete a pinpointed executable? Check what runs on boot? Autoruns. Run that tool and have a look at auto-starting binaries - there are a lot on most systems.
5) System Restore? Not relevant here as far as I can tell, but system restore can do VERY strange things such as delete single files from somewhere unexpected out of the blue. Yes, I have seen it (not a fanboyism - I was there - in the fires of mount Doom - it really happened).
6) Recovery hardware? Some computers have hardware devices that restore the system to earlier states on reboot with various options to allow some persistence here and there. No idea how prevailing these are now, but I expect their use for quick malware recovery and stuff like that. Talk to your system administrators?
7) Permissions? Does the package apply ACL permissions to the folder in question? It shouldn't cause this problem, but maybe check it. The service should never be able to start at all if permissioning is wrong.
8) Disk Corruption? An issue that one must always check for.
9) Virtual Machine? One issue that came to mind is whether this server is running as a virtual machine and if so whether the disk setup is one of full persistence? Not sure what is technically possible here at the current day and time.
10) Hidden Icons? One more issue - added in a hurry - some icons can be hidden in the Windows start menu from Windows 8 upwards (I believe, details fuzzy). I suppose this can yield the impression that a product has been uninstalled, when it is just hidden. Almost certainly not relevant for your situation.
Questions
PendingFileRenameOperations: After installation, are there entries in PendingFileRenameOperations? Check BEFORE installation as well.
Are there pending operations waiting for a reboot?
Location: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
Rollback: Even more obscure, is rollback disabled for Windows Installer? I can't see how that would cause this problem, but it is possible to do and what it triggers and makes possible I am not sure of.
Bitness Confusion: It is possible that people just think that files are missing, because they are looking in the wrong folder (x86 instead of x64 or vice versa). Not relevant here (then the service would start - unless there is something else wrong), but listed to remember it for other, similar cases.
"Out There": This is C:\Program Files\ right? Not C:\ProgramData\? Are there any mounted disks on the NTFS partition? Any symbolic links? Roaming profiles? Do you install per-machine or per-user?

Is it possible to update NodeMCU Lua files OTA?

I would love to be able to update my NodeMCU ESP8266-01 OTA, since they're located in awkward spots. I'm by no means an expert regarding the ESP or NodeMCU, but I haven't been able to find anything recent about OTA updates. I found some discussions about it going back to 2015, but it never seems to have been implemented.
I use my ESP with NodeMCU to control a PWM dimmer. I upload a precompiled version of NodeMCU with the NodeMCU Firmware FLasher, and then use ESPlorer to upload a custom lua file called 'init.lua'. I'm not even sure if this is the proper way to do stuff, but it works.
So the main question: Has OTA updating been implemented, or is it possible in some way?
Just to clarify, I don't think I want to update the firmware. As I understand it, firmware is what you build yourself, or on a website like https://nodemcu-build.com. I want to update the lua files that run on the ESP, that you normally upload through a program like ESPlorer.
I found some discussions about it going back to 2015, but it never seems to have been implemented.
Indeed, firmware OTA is not available yet. However, as you probably know, the need for firmware OTA is much lower with the NodeMCU firmware than e.g. with the Arduino platform. I'd argue that you're much less likely in need to replace/upgrade/extend the firmware with its built-in modules than the application code that runs on top of it.
Fortunately, it's quite simple to replace one or several Lua scripts (compiled or uncompiled) on the device and reboot it. All the web and cloud IDEs listed at https://frightanic.com/iot/tools-ides-nodemcu/ offer this. There's even a pending PR that'll bring FTP support to NodeMCU.
For a complete Lua provisioning system take a look at what #TerryE provided at https://github.com/nodemcu/nodemcu-firmware/tree/master/lua_examples/luaOTA
I've attempted to use the two Web IDEs listed in the link provided in Marcel Stör's answer, but I honestly failed to understand how to use either IDE. they also seemed like they weren't exactly what I was looking for, and required a server to connect to, or an extra program, which I wanted to avoid.
Edit: Apparently, I did end up using one of the two Web IDEs in the list. Since it's been a while since I did all this, it's a bit fuzzy in my head.
I eventually stumbled upon this GitHub page, which seemed to provide exactly what I was looking for: The ability to access the Lua files on the ESP through a webbrowser. I have personally changed the ide.lua file around completely, since I needed to call functions from it in the init.lua script. However, I think you can just upload the ide.lua script to the ESP, and add a line containing dofile("ide.lua") to your init.lua file.
If anyone is interested in my changes to, or my implementation of the ide.lua script, you can take a look at my repo Timmiej93 / QuinLED / Program code.
In fact there's a class for that to implement OTA i the NodeMCU its called the ESPhttpUpdate you can refer to ESPhttpUpdate for further details.

Compiling an Xcode project from a network folder

I'm trying to compile an iOS project in xcode from a network folder and I get all sorts of issues, most of them about files not being found on the first build command.
Most of the time it just says it hasn't found the headers inside other headers. If I hit Build again, the previous errors go away and new ones appear. Other times it just says "xxx.h" Resource temporarily unavailable. Hitting build again, ofcourse that is available but some other header is now unavailable, and it just makes things very frustrating.
PS: I am connected to a network folder from a Windows System using SMB. Sometimes if I disconnect, and reconnect to the network folder it briefly works flawlessly for like 3 seconds, and then starts spewing off resource unavailable errors. Unfortunately my build process lasts longer than 3 seconds :|.
UPDATE : It seems like the cause was disk access latency. I am running an OS X Virtual Machine and connecting to my real machine's HDD. I have now moved the entire VM to an SSD drive and everything works much smoother and it seems I don't have these issues anymore, so disk access times make all the difference :).
UPDATE 2 : For some reason I'm getting this error again. No idea what changed the situation.
Seems like it could be referenced files that aren't copied to project folder. I have lots of projects that are located on a server resource and as long as all the resources used by the project are included in the project it works fine.
That said, my personal choice these days is to house all of my projects in Dropbox. Still have to be careful of forgetting to copy any added files into the project folder, but it is lots easier for me to manage working on these apps on the various machines I work from.
In my experience, trying to work with an Xcode project that resides on a network share is completely hopeless. As you say, all sorts of random errors, some of the time, but not all the time. I simply have a "special" folder on the Mac that is instead shared to the OTHER machines on my network, and anytime I want to work on an Xcode project, I copy the project over into that "local" folder (and back when done). Highly inefficient and error-prone, but in my experience the only thing that works reliably (pretty sad really!)

Connecting to sFTP from within an iOS App

I'm new to Objective C and Xcode, but was wondering how to connect to a SFTP within my application. I've successfully connected to FTPs before, but was hoping to keep more secure in the future. When connecting with a regular computer you need a special SFTP client, so I wasn't sure what steps I'd have to take to connect within an iOS App.
Also, what are your opinions of SSH FTPs Vs. SFTPs?
There are plenty of open source libraries like NMSSH or DLSFTPClient. Please, don't use proprietary components, support open source.
Your best bet is to download a library and put that into your app. I would recommend Chilkat. He has wrote a lot of stuff for sftp.
Good luck.
look at some of these (http://www.example-code.com/ios/sftp.asp)

How to connect to network share drive programmatically?

I would like to write a program on iPad to connect network share drive (similar to FileBrowser application). However, I cannot find many resources and sample code on the Web. Does anyone know how to do it? Any website for reference? Thanks so much!
Connecting to an SMB shared drive would be the same as connecting to any SMB server. Now I've googled a bit and found that SMB was developed by Windows, and not given free, but that it has been successfully reversed engineered and that it has been ported to Linux, Unix, whatever by the name Samba.
I dug a bit deeper and easily found this link: Windows Filesharing library for iOS. It provides a link to an iOS framework which enables you to connect to a Samba/SMB drive.
Since I never tried to connect to a SMB/Samba server, I don't know if the framework will work, I've never tested it. But by copying some source files to your own project you normally should get it working.
Note: Check the license of any third-party framework you use.

Resources