Jump to content
  • 0

Nanopi Neo Air as a peripheral USB


Rami

Question

Hello,

 

I am working on a project in which we need to use a Nanopi Neo Air (based on SoC Allwinner H3). In this project we need to use the USB serial interface to communicate with another part of the project. We need to configure the Nanopi Neo Air USB interface as a peripheral USB .

Nanopi Neo Air's USB serial interface is configured by default as a USB host, and in "armbian-config" there is no way to change this configuration.

The USB host (which is the other part of the project) will send data to the Nanopi Neo Air whenever there is new data.

 

Is it possible to configure the Nanopi Neo Air as a peripheral USB? How can we do this configuration (if you have documentation please)?

 

Thanks in advance,

Best regards,

Rami.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
2 hours ago, Rami said:

s it possible to configure the Nanopi Neo Air as a peripheral USB? How can we do this configuration (if you have documentation please)?

The Nanopi Neo Air seems to support an OTG USB port. So you are looking for the USB gadget framework.
Because you are too inaccurate which peripheral protocol you want to use, you may start here.

Link to comment
Share on other sites

Help us fund some #badass gear for our continuous integration build framework

  • 0
17 hours ago, usual user said:

Because you are too inaccurate which peripheral protocol you want to use, you may start here.

Thank you for your response.

 

The USB host will write data that is read from sensors to the Nanopi Neo Air via the USB interface. On the Nanopi Neo Air we need to read this data sent by the USB host and we need to process it (e.g. the USB host write a temperature value to the Nanopi Neo Air via USB, an algorithm running on the Nanopi Neo Air needs to read this temperature value, process it and then send it via wireless communication).  
Can you help me determine the right peripheral protocol for my application and how I can do it please?

 

Link to comment
Share on other sites

  • 0

You certainly want a two-way connection.
But since I don't know what implementation requirements you have at either side of the connection you have to chose what ever fits your needs.
A serial function can be enough if you implement the comunication yourself, or you can use a network function with a full network stack above it.
The configuration principle from the point of view of USB gadget is the same in any case. You must fill configfs with the appropriate files.
The details are described in the companion files in the directory I have already referenced.
You can even configure multiple USB functions as long as your USB OTG hardware provides the required endpoints.
E.g an Ethernet interface and a mass-storage to serve the suitable Windows Ethernet driver.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...