Mobile Line Of BusinessRichard Jones (MVP)http://geekswithblogs.net/MobileLOB/Default.aspxRichard Joneshttp://geekswithblogs.net/MobileLOB/Default.aspxSubtext2018-10-24T11:16:45Z15 seconds of farminghttp://geekswithblogs.net/MobileLOB/archive/2018/10/15/15-seconds-of-farming.aspx2018-10-15T23:01:1101:00:002018-10-24T11:16:45Z<p>So some great geek stuff with a customer of mine (Family Farms). We needed to integrate combine-harvester and tipper trucks on our iPad app. to record weights as combine tips to nearby truck. This was our saviour a little $50 bluetooth LE dongle.</p>
<p> </p>
<p><img title="dongle.png" src="https://gwb.blob.core.windows.net/mobilelob/dongle.png" alt="Dongle" width="285" height="282" border="0" /></p>
<p> </p>
<p>BLE, allows devices to just find each other (romantic I know). Unlike normal Bluetooth like you use say your handsfree kit; you don’t need to pair a BLE device. You simply say find any devices in range that offer a set of services, i.e. can transfer data. iOS and Android devices have had BLE capability for about 3 years now.</p>
<p><img title="NewImage.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImage.png" alt="NewImage" width="519" height="163" border="0" /><br /> <br />So why is all this exciting. This means a harvester can tip their harvest into a tipper truck which is equipped with a weigh cell connected to a dongle like this. As the combine drives by and tips, the iPad app. with the combine driver detects the BLE dongle and reads the tipped weight.</p>
<p>So we were able to prove that this can indeed be done. We have a scale simulator up and running in Harston. As POC addition to the FFG farming app. we can connect over BLE and get a reading from the scale simulator.<br /> <br />The advantage of using BLE is that you just create a temporary network in-field for just a few seconds between combine and tipper truck, you don’t need any other kind of WIFI or cellular network access.</p>
<p> <img title="Picture1.png" src="https://gwb.blob.core.windows.net/mobilelob/Picture1.png" alt="Picture1" width="300" height="150" border="0" /></p><img src="http://geekswithblogs.net/MobileLOB/aggbug/244731.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/244731.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/244731.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/244731.aspxVisual Studio Code - On Mac Talking to SQL Serverhttp://geekswithblogs.net/MobileLOB/archive/2018/05/07/244685.aspx2018-05-07T22:02:1401:00:002018-05-07T22:03:13Z<p>So, this has taken a while</p><p>Only tonights install of Visual Studio Code update (aka after Build Keynote???)...</p><p> </p><p>I can finally run SQL Server queries from Visual Studio Code on my Mac.</p><p> </p><p>I followed this guide to install/re-install</p><p> </p><p>https://sqldbawithabeard.com/2017/01/05/running-sql-queries-with-visual-studio-code/</p><p> </p><p>I then right clicked on my query to select Execute, the keyboard shortcut didn’t seem to work.</p><p> </p><p>Result - some data from SQL server !</p><p><img id="ctl00_pageContent_Editor_Edit_ctl00_uploadedImg" title="SQL_1894761088.png" src="https://gwb.blob.core.windows.net/mobilelob/Visual-Studio-Code---On-Mac-Talking-to-SQL-Server_244685/SQL_1894761088.png" /></p><p><br /></p><img src="http://geekswithblogs.net/MobileLOB/aggbug/244685.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/244685.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/244685.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/244685.aspxoData and Big Floatshttp://geekswithblogs.net/MobileLOB/archive/2018/05/01/odata-and-big-floats.aspx2018-05-01T20:01:4901:00:002018-05-01T20:02:51Z<p>Today, I made an interesting discovery.</p><p>I’m synchronising data to Microsoft NAV, from an iOS app, using oData.</p><p>My iOS app, makes JSON requests to pull/push records in and out of NAV.</p><p>Todays discovery was don’t send float numbers in scientific format, i.e 1e6, send them as fully expanded numbers, like 1000000. Only when numbers get big did I notice this issue. </p><img src="http://geekswithblogs.net/MobileLOB/aggbug/244681.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/244681.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/244681.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/244681.aspxPi Zero W - Streamer - Gains A Lego Casehttp://geekswithblogs.net/MobileLOB/archive/2017/07/07/pi-zero-w---streamer---gains-a-lego-case.aspx2017-07-07T20:26:1401:00:002017-07-07T20:26:14Z<p>So I’ve added a Lego Case To My Music Streamer </p>
<p> </p>
<p><img title="IMG_0356.JPG" src="https://gwb.blob.core.windows.net/mobilelob/IMG_0356.JPG" alt="IMG 0356" width="600" height="450" border="0" /></p>
<p> </p>
<p>Its working great. Our boys can wander in with their tablets/phones and just wirelessly play what they like. Music should just be like this. Accessible and easy sounds awesome too.</p>
<p> </p>
<p>Sum of parts. Raspberry Pi Zero W - Hifi-Berry DAC Board - Some Lego - Cambridge Audio Amp and Speakers. + Great Kids.</p><img src="http://geekswithblogs.net/MobileLOB/aggbug/244571.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/244571.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/244571.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/244571.aspxRaspberry Pi Zero W - Media Streamerhttp://geekswithblogs.net/MobileLOB/archive/2017/05/08/raspberry-pi-zero-w---media-streamer.aspx2017-05-08T11:35:2301:00:002017-05-08T11:35:23Z<p>So I’ve been wanting to update my media streamer for a while.</p>
<p>In our kitchen I have an amp and speakers, and I have a Raspberry Pi One acting as a media streamer, primarily for use with Air Play.</p>
<p><img title="IMG_0246.JPG" src="https://gwb.blob.core.windows.net/mobilelob/IMG_0246.JPG" alt="IMG 0246" width="600" height="450" border="0" /></p>
<p> </p>
<p>It sounds truly amazing. I did the build for around £30. </p>
<p> </p>
<p>Here is my build list -</p>
<p> </p>
<p>Software - http://Volumio.org</p>
<p>Hardware </p>
<p>Pi Zero W - Board only</p>
<p>https://shop.pimoroni.com/products/raspberry-pi-zero-w</p>
<p> </p>
<p>Hammer on - Header Board - this is genius</p>
<p>https://shop.pimoroni.com/products/gpio-hammer-header</p>
<p> </p>
<p>DAC Board - Gives the Pi Decent Sound capability</p>
<p>https://www.hifiberry.com/shop/boards/hifiberry-dac-zero/</p>
<p> </p>
<p>Metal stand-offs - These just look nice</p>
<p>https://www.hifiberry.com/shop/accessories/4-standoffs-m2-5x12mm-steel/</p>
<p> </p>
<p> </p>
<p>Parts I already had - </p>
<p>8 Gb Micro SD Card</p>
<p>Power Supply - Used an old phone charger</p>
<p>Micro USB Cable</p>
<p>RCA Cable</p>
<p>Amp + Speakers</p>
<p> </p>
<p> </p>
<p> </p><img src="http://geekswithblogs.net/MobileLOB/aggbug/244547.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/244547.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/244547.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/244547.aspxHiglightshttp://geekswithblogs.net/MobileLOB/archive/2016/11/27/higlights.aspx2016-11-27T21:56:3600:00:002016-11-27T23:25:11Z<p>This weekend…..</p>
<p> </p>
<p>I’ve realised the truth that Docker is the future. Please take a few moments to inhale docker.com</p>
<p> </p>
<p>I’ve built a MS SQL 2016, in Docker, connected to from another Container running Swift. </p><img src="http://geekswithblogs.net/MobileLOB/aggbug/203215.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/203215.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/203215.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/203215.aspxMy First Amazon Echo Skillhttp://geekswithblogs.net/MobileLOB/archive/2016/10/21/my-first-amazon-echo-skill.aspx2016-10-21T22:49:1601:00:002016-10-21T22:49:16Z<div>So excited. I've done it. First Amazon Echo Skill, all up and running. Will report back with full implementation details. Super easy and really great result.</div><div><br /></div><img src="http://geekswithblogs.net/MobileLOB/aggbug/199419.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/199419.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/199419.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/199419.aspxCaller ID on Raspberry Pihttp://geekswithblogs.net/MobileLOB/archive/2016/07/06/caller-id-on-raspberry-pi.aspx2016-07-06T22:29:4301:00:002016-07-06T23:44:18Z<p>So I have gotten myself another Raspberry Pi 1 Model B. (from eBay with case, power supply and 8GB SD for under £20).</p>
<p>I’ve plugged in an Edmiax WIFI USB Card. Plus the star purchase a £4 USB Conexant modem. This is a good news, as this modem can decode UK caller ID signals.</p>
<p><img title="NewImagecid.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImagecid.png" alt="NewImage" width="225" height="225" border="0" /></p>
<p> </p>
<p> So the goal is to broadcast who’s calling my home phone line and send who’s calling to my desktop Mac and various iOS devices.</p>
<p>The Pi, side of things took the longest. I decided to use the common established and old (all good things for reliability) NCID package. Getting this onto the Pi took the longest.</p>
<p>I ended up having to compile the source code, and then struggled to get the thing to start automatically.</p>
<p>In the end this was the best guide I found -</p>
<p>https://github.com/Phiplex/ncidhitta</p>
<p>I used the 1.4 version of NCID. </p>
<p>Once up and running, I used another terminal window to telnet to my Pi on port 3333 to check that when my home phone rings the Pi was decoding (via NCID) the incoming caller ID information.</p>
<p> You get something back like the following - </p>
<p><img title="NewImaget.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImaget.png" alt="NewImage" width="599" height="463" border="0" /></p>
<p> </p>
<p> </p>
<p>So good news, phone rings the telnet window updates, with who’s calling.</p>
<p> </p>
<p>The next step was to notify all Macs and iOS devices. I followed the guide here to ‘borrow’ how they collected output from NCID for their own purposes...</p>
<p><a style="font-family: 'Helvetica Neue'; font-size: 14px;" href="https://jimtech.wordpress.com/2012/04/09/getting-ncid-working-on-every-device-possible/">https://jimtech.wordpress.com/2012/04/09/getting-ncid-working-on-every-device-possible/</a></p>
<p> </p>
<p>My modification was to change the output command to curl a web request adapted to my own web server.</p>
<p> </p>
<p>As discussed previously I have managed to get Safari and iOS push notifications working, so I utilised that and a database of device tokens and a database of phone numbers to names, to send and Apple Push Notification.</p>
<p> </p>
<p>Net result, phone rings. All my devices go PING and instantly display who’s calling -</p>
<p> </p>
<p><img title="NewImageppp.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImageppp.png" alt="NewImage" width="597" height="149" border="0" /></p>
<p> </p>
<p>Click the notification and you can see/edit (in Safari) the name associated to the number and see last calls -</p>
<p><img title="NewImagerrr.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImagerrr.png" alt="NewImage" width="600" height="200" border="0" /></p>
<p>In iOS, it works similarly.</p>
<p> </p>
<p> </p><img src="http://geekswithblogs.net/MobileLOB/aggbug/184023.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/184023.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/184023.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/184023.aspxSafari Push Notifications - Workinghttp://geekswithblogs.net/MobileLOB/archive/2016/05/20/safari-push-notifications---working.aspx2016-05-20T20:25:3101:00:002016-05-20T20:27:05Z<p>So its taken me some time, but I finally have managed to enable Safari push notifications on my Bin Collections website. </p>
<p>Take a look at <a href="binaryrefinery.com/bincollections">http://binaryrefinery.com/bincollections</a></p>
<p>So now if you are a Mac user, using Safari and happen to live in the South Cambridgeshire area I can send you a notification when and which bin to put out.</p>
<p>I implemented the backend in ASP.NET using a handler to receive the messages that Apple pushes out as users sign up or remove themselves from the service.</p>
<p>Gotcha’s along the way. Apple uses a restful API, so you must get your handler to listen for all the relevant HTTP Verbs, GET,POST,DELETE.</p>
<p>Once I got this cracked and assembled a push package things started to work!</p>
<p> </p>
<p>Another thing to watch out for, Apple changed the intermediate developer certs. Make sure you have the latest set on your development machine before you start. I didn’t, and my keys all didn’t get signed correctly. Please look at - </p>
<p><a href="https://developer.apple.com/support/certificates/expiration/">https://developer.apple.com/support/certificates/expiration/</a></p>
<p> </p>
<p> </p>
<p>If you have an error, and Apple sends you a log to your Web-service complaining about a push package. I’ve found the only way to get things working again is to disable and enable push notification support for your website in Safari for the offending Mac that you tried to push the message too.</p>
<p>As well as sending weekly reminders, I also send via push if you change any of your alert settings</p>
<p><img title="NewImage.png" src="https://gwb.blob.core.windows.net/mobilelob/NewImage.png" alt="NewImage" width="597" height="162" border="0" /></p>
<p>I implemented much of the backend using a database of which certificates and keys to use, this should make it much easier to use Safari push for other projects and challenges. This database also logs to a table any logging or errors that Apple reports back.</p>
<p> </p>
<p>If your thinking about trying this yourself (I’m of course happy to assist). Please read and re-read the Apple guides. They do have everything there you should need. I also have found apple Developer support first rate in guiding me through which now appears like stupid errors. </p>
<p><a href="https://developer.apple.com/support/certificates/expiration/">https://developer.apple.com/notifications/safari-push-notifications/</a></p><img src="http://geekswithblogs.net/MobileLOB/aggbug/176900.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/176900.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/176900.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/176900.aspxCloudKit Server To Serverhttp://geekswithblogs.net/MobileLOB/archive/2016/02/12/cloudkit-server-to-server.aspx2016-02-12T01:41:1400:00:002016-02-12T01:41:14Z<p>Now this is quite a big deal for me.</p>
<p>I spend most of my time in the land of enterprise apps (as you know). Most of the effort it with building the infrastructure to have someones device talk back to one of our servers. I get wrapped up with issues, about connectivity/amount of bandwidth I’ve got and what happens if someone goes offline. iCloud has been a walled garden up until this point. Its great for syncing your photos/documents etc. but its a closed system for us Enterprise folks. Now I’ve got the ability to use iCloud to also host my enterprise data. I can pump data into iCloud; securely. iOS takes care of the synchronisation for me.</p>
<p>So use case. I can take a bunch of data, say a price catalogue and some tables to store quotes. Pump that over to iCloud. Then my mobile app. can just auto-magically just see all that data. I can quickly just build a UI to take customer orders and let iOS just do its thing to make sure all the data just synchronises. All I have to worry about is getting the data in and out of the iCloud servers. This is where the pretty comprehensive and secure (well it looks that way) new API comes in.</p>
<p>So you can do this now, and thanks to some kind help on the Apple Developer Forums, + I can do this all from (our own walled garden) from c#.</p>
<p>Announcement here</p>
<p>https://developer.apple.com/news/?id=02042016a</p>
<p> </p>
<p>Code to follow</p>
<div class="message_content " style="box-sizing: border-box; margin-left: 72px; margin-top: 1px;"><em class="copy_only" style="box-sizing: border-box; display: inline-block; vertical-align: baseline; height: 0px; background-size: 0px; font-size: 0px; color: transparent; float: left; text-rendering: auto; -webkit-user-select: none; background-repeat: no-repeat no-repeat;"><br style="box-sizing: border-box;" /></em></div>
<div class="message_gutter" style="box-sizing: border-box; text-align: right; position: absolute; top: 0px; left: 0px; width: 72px; padding-right: 10px;"><a class="timestamp ts_tip ts_tip_top ts_tip_float ts_tip_multiline ts_tip_delay_300" style="box-sizing: border-box; color: #9e9ea6; text-decoration: none; display: inline-block; position: relative; z-index: 1; font-size: 9pt; line-height: 18px; opacity: 0;" title="Today at 8:20:48 AM&lt;br&gt;Click to open in archives" href="https://britishtech.slack.com/archives/the-slackroom/p1455178848002511" target="new_1455231412527"><em class="copy_only" style="box-sizing: border-box; display: inline-block; vertical-align: baseline; height: 0px; background-size: 0px; font-size: 0px; color: transparent; float: left; text-rendering: auto; -webkit-user-select: none; background-repeat: no-repeat no-repeat;">[</em><span class="light_only" style="box-sizing: border-box; display: inline;">8:20</span></a></div><img src="http://geekswithblogs.net/MobileLOB/aggbug/172465.aspx" width="1" height="1" />http://geekswithblogs.net/MobileLOB/comments/172465.aspx0http://geekswithblogs.net/MobileLOB/comments/commentRss/172465.aspxhttp://geekswithblogs.net/MobileLOB/services/trackbacks/172465.aspx