Hi
Is it possible to copy the compiled app to the Pi’s memory card or is ssh the only way?
Thanks
Chris
Hi
Is it possible to copy the compiled app to the Pi’s memory card or is ssh the only way?
Thanks
Chris
FTPS should work fine as ssh is running
Most ftp clients supports it.
Hello,
You can use scp to copy your app. You can even copy automatically your app once the build process is finished. Pretty simple :
Install your ssh public key on the Rasp :
Install a script like the one below. Replace the ip address with the right one. Change the app path and user/group depending of your setup
Hope this helps
[code] Dim result As String
Dim cmd As String
// Stop the process
cmd = “ssh root@192.168.0.116 'pkill -f " + CurrentBuildAppName +”’"
result = DoShellCommand(cmd)
// Delete the app folder
cmd = “ssh root@192.168.0.116 'rm -rf /opt/myapp/” + CurrentBuildAppName + “’”
result = DoShellCommand(cmd)
// We copy the built binaries
cmd = “scp -r " + CurrentBuildLocation + " root@192.168.0.116:/opt/myapp/” + CurrentBuildAppName
result = DoShellCommand(cmd)
// We change the owner
cmd = “ssh root@192.168.0.116 'chown -R toto:toto /opt/myapp/” + CurrentBuildAppName + “’”
result = DoShellCommand(cmd)
// Relaunch the app if needed
[/code]
Thanks very much for the replies
Chris
It might be beneficial to instal SAMBA on the Pi?
I find it much more convenient to mount an SMB share to copy files, directly modify files, etc. You can then mount the share on your PC or Mac.
http://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/
just be aware that mounting it and then compiling an app TO that share may fail in glorious fashion
Esp if you are on OS X as there are some bugs in the SMB client that make SMB not work but AFP will work
It’s awesome
That’s sounds pretty good, if it works. Copying from Mac would be easier than copying from pi - just to be clear, it’s not really possible/convenient to stick the Pi’s memory stick into the Mac?
Thanks
You cn mount the Pi SD card on a Mac, but it is convoluted to set up and a PITA. You’d need MacFUSE, and Fuse-ext2 to access the Pi ext3 2nd partition. Not only a pain to setup, but also a pain to test your code. The Pi hates hard power offs, so you’d need to shut it down gracefully, plug the SD card in to the Mac, copy the binary, unmount the volume, put the SD card back in the Pi, power the Pi back up, test your binary.
Trust me, the SAMBA option works great.
I have not experienced the problems Norman mentions with compiling directly to the Pi SMB share. It is only an extra step to compile locally and drag the binary to the SMB share. Depending on where on the Pi you map the network share to, it gives many other benefits in being able to edit config files from the Mac/PC GUI etc.
I use an original Pi for a PABX at on my ranch, 9 phones. It has been running Asterisk and SAMBA for over a year without a reboot. Rock solid.
Install SAMBA, Instal VNC ( https://www.raspberrypi.org/documentation/remote-access/vnc/ ) if you don’t want the extra clutter of a separate monitor and keyboard for the Pi.
Easy workflow:
Compile your binary directly to the Pi SMB share (or compile locally and copy to the share)
Launch the binary via VNC
Marvel at all that a $35 ‘PC’ can do…
This bug report <https://xojo.com/issue/41546>
It may only be building OS X executables that experience this
But since it works via AFP and not as SMB it definitely leads us to suspect the SMB client in OS X
I was able to reproduce this using SAMBA on the Pi.
I thought it may be a problem with SMB2 on the Mac, but even forcing the share to mount as SMB1 exhibits the same problem.
Looks like you’d need to build locally, then copy to the share.
In that case its noted that using AFP works but SMB doesn’t
Xojo really doesn’t care about how a device is mounted - we dont use them at that level that it matters
So the fact it works under AFP and not SMB definitely points to bugs in SMB - we know there are some as these links show
(googled for ‘os x el capitan smb bugs’)
http://www.tweaking4all.com/os-tips-and-tricks/macosx-tips-and-tricks/smbup-mac-os-x-smb-fix/
https://discussions.apple.com/thread/7252103?tstart=0
http://serverfault.com/questions/728667/file-permissions-issue-on-os-x-el-capitan-and-smb-share
or you can also google for ‘os x 10.11 smb bugs’
you will find a fair amount of chatter about SMB on OS X 10.11
Similar results for 10.10 but with different bugs