If you are preparing to fight a potential restriction requirement, review the possible methods of restriction in Chapter 800 of the MPEP and draft your claims to avoid the criteria for proper restriction according to any possible manners described in that chapter.
According to MPEP 803 I, to properly restrict the inventions, the Examiner must show:
1. serious burden
2. independence or distinctness
To avoid serious burden (1), make sure that the claims-you-want-to-avoid-restricting:
A. are classified in the same subclasses of the USPTO classification (not hard)
B. have the same status in the art within the same classification
C. have the same field of search using the same keywords to the extent possible / reasonable
See MPEP 808.02 ("Establishing Burden")
To avoid independence or distinctness (2), first note that only distinctness applies to your case, and to most patent applications, because your device and software are related to each other.
Since we are dealing with distinctness, note that MPEP 806.05 ("Related Inventions") and the following sections 806.05(a)-(j) describe different ways that inventions can be distinct and properly restricted. Examiners virtually always use these "templates" for distinctness and the accompanying form paragraphs from the MPEP. These types of distinctness are:
(a)-(c) combination and subcombination
(d) subcombinations usable together
(e) process and apparatus for its practice
(f) process of making and apparatus made
(g) apparatus and product made
(h) product and process of using
(i) product, process of making, and process of using
(j) related products, related processes
Here, you want to review the possible categories to figure out which one fits best. Then, draft your claims and specification to avoid the examiner from making a proper showing for restriction.
For example, it is not clear if you are claiming "software" in method or product (i.e. computer readable medium) form. If you use method form, then the most likely templates of distinctness are probably (e) and (h), with (e) seeming more appropriate than (h) (because your device seems more like an apparatus than a product in the colloquial sense).
MPEP 806.05(e) reads in part:
Process and apparatus for its practice can be shown to be distinct inventions, if either or both of the following can be shown: (A) that the process as claimed can be practiced by another materially different apparatus or by hand; or (B) that the apparatus as claimedcan be used to practice another materially different process.
The burden is on the examiner to provide reasonable examples that recite material differences.
If applicant proves or provides convincing argument that there is no material difference or that a process cannot be performed by hand (if examiner so argued), the burden is on the examiner to document another materially different process or apparatus or withdraw the requirement.
Thus, you want to prevent the Examiner from being able to prove (A) or (B) in the MPEP quote above. You can do this by carefully drafting your claims and specification to avoid these potential arguments by the Examiner.
Good luck.