Using bluetooth to add my own files or rewrite files to a bluetooth connected cnc - api

I have a bluetooth enabled CNC(key cutter) that I control it from my phone via an app(ios but an equivalent is available for android). I need to be able to gain access to the machine directly with bluetooth or usb(already tried on pc) so I can try to find the correct memory offsets and values so I can change precoded names, values, for already existing "cutting profiles"(Not sure if these files are in the CNC or the app).
Trying to reverse engineer the app seems like a waste of time until I can at LEAST discern which files to expect are kept on the cnc, and which files are kept within the app.
I have experience with memory editors such as cheat engine, a little C / C++.
I have tried searching for solutions based in Bluetooth, but that is only getting be basic file transfer explanations. The app gives no direct access to files of any kind.
ANY help pointing me in the right direction for where to start with this problem, or reference material you think would be relevant would be helpful.

Related

Applying Non-Standard Power Assertions & Creating Virtual HIDs

I've got a big ask here, but I am hoping someone might be able to help me. If there's another site you think this should be posted on, please let me know.
I'm the developer of the free app Amphetamine for macOS and I'm hoping to add a new feature to the app - keeping a Mac awake while in closed-display (clamshell) mode while not having a keyboard/mouse/power adapter/display connected to the Mac. I get requests to add this feature on an almost daily basis.
I've been working on a solution (and it's mostly ready) which uses a non-App Store helper app that must be download and installed separately. I could still go with that solution, but I want to explore one more option before pushing the separate app solution out to the world.
An Amphetamine user tipped me off that another app, AntiSleep can keep a Mac awake while in closed-display mode, while not meeting Apple's requirements. I've tested this claim, and it's true. After doing a bit of digging into how AntiSleep might be accomplishing this, I've come up with 2 possible theories so far (though there may be more to it):
In addition to the standard power assertion types, it looks like AntiSleep is using (a) private framework(s) to apply non-standard power assertions. The following non-standard power assertion types are active when AntiSleep is keeping a Mac awake: DenySystemSleep, UserIsActive, RequiresDisplayAudio, & InternalPreventDisplaySleep. I haven't been able to find much information on these power assertion types beyond what appears in IOPMLibPrivate.h. I'm not familiar at all with using private frameworks, but I assume I could theoretically add the IOPMLibPrivate header file to a project and then create these power assertion types. I understand that would likely result in an App Store review rejection for Amphetamine, of course. What about non-App Store apps? Would Apple notarize an app using this? Beyond that, could someone help me confirm that the only way to apply these non-standard power assertions is to use a private framework?
I suspect that AntiSleep may also be creating a virtual keyboard and mouse. Certainly, the idea of creating a virtual keyboard and mouse to get around Apple's requirement of having a keyboard and mouse connected to the Mac when using closed-display mode is an intriguing idea. After doing some searching, I found foohid. However, I ran into all kinds of errors trying to add and use the foohid files in a test project. Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app? I'm not asking for code help with that (yet). I'd just like some help determining whether it might be possible to do.
Thank you in advance for taking a look.
Would Apple notarize an app using this?
I haven't seen any issues with notarising code that uses private APIs. Currently, Apple only seems to use notarisation for scanning for inclusion of known malware.
Would someone be willing to take a look at the foohid project and help me understand whether it is theoretically possible to include this functionality in an App Store compatible app?
Taking a quick glance at the code of that project, it's clear it implements a kernel extension (kext). Those are not allowed on the App Store.
However, since macOS 10.15 Catalina, there's a new way to write HID drivers, using DriverKit. The idea is that the APIs are very similar to the kernel APIs, although I suspect it'll be a rewrite of the kext as a DriverKit driver, rather than a simple port.
DriverKit drivers are permitted to be included in App Store apps.
I don't know if a DriverKit based HID driver will solve your specific power management issue.
If you go with a DriverKit solution, this will only work on 10.15+.
I suspect that AntiSleep may also be creating a virtual keyboard and mouse.
I haven't looked at AntiSleep, but I do know that in addition to writing an outright HID driver, it's possible to generate HID events using user space APIs such as IOHIDPostEvent(). I don't know if those are allowed on the App Store, but as far as I'm aware, IOKitLib is generally fine.
It's possible you might be able to implement your virtual input device using those.

Registering a network video stream as a virtual camera

So I've tried to tackle this problem for the last couple of weeks but come to a bit of a standstill. I'm trying to registering an RTSP stream from an IP address as a virtual webcam for use in another application (could be skype or similar). What I need is for my computer to add a virtual webcam to its device list. This should preferably be done through a C# script as devices could be added dynamically through a .NET program.
I have found similar questions on StackOverflow, but many of these are outdated, use Linux, or receives another stream format/protocol.
My approach so far has been using DirectShow filters and so far that has worked to a degree. Using Graphedit I can see my incoming stream by using an RTSP source filter. However, there are some problems:
The source filter was a trial, the full version is paid and pretty expensive
I have no experience with DirectShow filter programming
I only showed the stream through GraphEdit, there was no virtual driver registered so e.g Skype couldn't use the stream
So I guess my question boils down to:
Is my approach with DirectShow the only way to acheive what I'd like?
Is a filter the correct approach to use if Windows should list the stream as a webcam device?
Is vcam still the best example to look at to implement something like this?
Does any one know of similar, open source programs that acheive what I describe?
Anyway, I appreciate any help I can get!
Thanks.
The diagram below explains the applicability of virtual cameras:
You are trying to somehow mount a lower green or blue box so that it reads data from RTSP.
Note that more and more applications like new Skype are Media Foundation based (top right box on the diagram) and your filter based source is less and less applicable.
Creating a virtual camera which is recognized by various software assumes you are supplying a driver (red box). Even though such packages exist, I am not aware of any open source or even free which let you quickly start on this route.
DirectShow filter based sources (and you are yet to implement RTSP client there) will only be see by DirectShow based applications of the same bitness.

How to test a VB program which will run on a network

I am a self-taught programmer and have only delved into new areas of programming as the need arises. I have never done any network programming, everything I have written has been for a single computer. I have written a program for an old board game and it runs great. But, now I want to try to write it to run for multiple players across a local network. I have an idea of what has happen in terms of constantly checking a specified folder/file for changes. But... how do you test this without actually building/compiling the program and installing it on another computer every time you make any changes? I have tried to search various forms of what I have as the title here, but all that comes up is about testing network connections, or socket programming (would this be easier/needed) or systemfilewatcher (which may be an option too if it will run on Windows 7 and 10... but, I find nothing about testing programs to actually access the network and simulating 2 copies of the program running. Any suggestions, links, etc. would be greatly appreciated.
I think you will be disappointed in the performance of a file-based network game unless reaction or refresh time is of little consequence for your "board" game. You may also need to work out potential concurrency issues (ie, someone updating a file you've just read). If you have any desire to do other games in the future you should be using sockets (most likely UDP unless you have a good reason not to) to create a client server system.
As to your question, yes, you should be able to test it. You just need to run both a compiled exe and the source in VS debug mode, accessing the same folder on your drive. If you go with the socket-based option, you would use your PC's loopback address 127.0.0.1 (sometimes known as localhost), but the 2 different parts will need to communicate on different ports.

Missing driver LabVIEW

I'm trying to run a program written by someone else in LabVIEW. The program records voltage. However it won't open because it is missing subVIs.
Initially I thought that only one was missing and the rest weren't working becuase they were attached to it but after someone on this forum kindly found it for me the rest of the VIs still won't work so I think I need to download them again. However there are too many off them to get separately, also I tried googling them to no avail.
The subVIs are : Magnet Id, Hardware check, Plot Data and Print, Make Plot Lables, Plot it, Relabel It, Write File header, Record Analog Info, Fix Column Heading, Make Igor Label etc etc (this is not a complete list).
I feel that I should download a DAQ from The National Instruments Website but I am not sure which one. I am using 64 bit LabVIEW 2010 on Windows. Can someone please help me pick out the correct driver?
Thanks!
Just going from memory, those aren't NI VIs that I recognize, especially if the misspellings are in the original.
What hardware is this interfacing with?
You should still be able to open the main VI. It will not compile or run, since the subVIs are missing, but you should be able to open it and maybe get some clues about what it's doing.
The SubVIs all appear to be in the llb file so they should be available. I'm not sure how you can access the subVIs directly from the llb file so you may want to convert this to a project folder (this is the new way of creating libraries since version 8 I think). There are some pages on the NI website that may help, try Converting an LLB to a Project Library and then add this Project Library to your project.
From what I can see the VIs make use of the VISA drivers to communicate with the individual instruments so you should make sure you have this installed. You don't mention what version of LabVIEW 2010 you have but I think they should be provided even the Basic version, I know they are provided with the Professional Development System version.

What do I need to have to be ready to write a Compact Framework application communicating with GPS?

Simply I am asked to write an application for a smart device (smart cell phone), which will get the GPS coordinates from the device itself.
I have no smart device at all. And I am kind of lost among questions like how can I check if the device have a gps by using the code, if it has how can I obtain them in a "standard" way, do I need to be using frameworks like GeoFrameWork?
So, may somebody list the must or most required things I need to have ready?
Geoframeworks GPS.NET is free these days and it's pretty comprehensive so there's no point reinventing the wheel. It's also friendly to beginners which helps. I strongly recommend downloading it and playing with some of the sample apps. It's a bit tricky if you don't have a physical device to play around with but it does have GPS emulation classes that you can use.
All you need is a copy of VS2008 Pro with the Smart Device SDK installed.